From 4f98175416df53761a5ee7a239ac44e6445683b6 Mon Sep 17 00:00:00 2001 From: Erik Hove Date: Tue, 19 Dec 2023 16:58:57 -0600 Subject: [PATCH] regenerate zap --- .../all-clusters-app.matter | 89 +- .../data_model/controller-clusters.matter | 64 - .../data_model/controller-clusters.zap | 3 +- .../chip/devicecontroller/ChipClusters.java | 13763 ++- .../devicecontroller/ChipEventStructs.java | 1426 +- .../chip/devicecontroller/ChipStructs.java | 3533 +- .../devicecontroller/ClusterIDMapping.java | 3122 +- .../devicecontroller/ClusterInfoMapping.java | 6410 +- .../devicecontroller/ClusterReadMapping.java | 1985 +- .../devicecontroller/ClusterWriteMapping.java | 268 +- .../chip/devicecontroller/cluster/files.gni | 61 +- .../CHIPAttributeTLVValueDecoder.cpp | 9623 ++- .../java/zap-generated/CHIPClientCallbacks.h | 142 +- .../CHIPEventTLVValueDecoder.cpp | 2217 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 1117 +- .../java/zap-generated/CHIPInvokeCallbacks.h | 100 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 17571 ++-- .../python/chip/clusters/CHIPClusters.py | 1440 +- .../python/chip/clusters/Objects.py | 18743 ++-- .../python/chip/clusters/__init__.py | 4 +- .../MTRAttributeSpecifiedCheck.mm | 598 +- .../MTRAttributeTLVValueDecoder.mm | 2278 +- .../CHIP/zap-generated/MTRBaseClusters.h | 3187 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 14271 +++- .../CHIP/zap-generated/MTRClusterConstants.h | 470 +- .../CHIP/zap-generated/MTRClusters.h | 984 +- .../CHIP/zap-generated/MTRClusters.mm | 6357 +- .../zap-generated/MTRCommandPayloadsObjc.h | 2850 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 10945 ++- .../MTRCommandPayloads_Internal.h | 318 +- .../zap-generated/MTRCommandTimedCheck.mm | 161 +- .../zap-generated/MTREventTLVValueDecoder.mm | 1105 +- .../CHIP/zap-generated/MTRStructsObjc.h | 533 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 2362 +- .../zap-generated/attributes/Accessors.cpp | 5379 +- .../zap-generated/attributes/Accessors.h | 702 +- .../app-common/zap-generated/callback.h | 1276 +- .../zap-generated/cluster-enums-check.h | 656 +- .../app-common/zap-generated/cluster-enums.h | 933 +- .../zap-generated/cluster-objects.cpp | 11361 ++- .../zap-generated/cluster-objects.h | 21492 +++-- .../app-common/zap-generated/ids/Attributes.h | 682 +- .../app-common/zap-generated/ids/Clusters.h | 37 +- .../app-common/zap-generated/ids/Commands.h | 262 +- .../app-common/zap-generated/ids/Events.h | 158 +- .../app-common/zap-generated/print-cluster.h | 87 +- .../zap-generated/cluster/Commands.h | 14166 ++-- .../cluster/logging/DataModelLogger.cpp | 9553 ++- .../cluster/logging/DataModelLogger.h | 176 +- .../zap-generated/cluster/Commands.h | 70315 ++++++++++------ 50 files changed, 186518 insertions(+), 78817 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 81d2b1617b2a18..ef812e743a7b5d 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2786,7 +2786,9 @@ cluster BooleanState = 69 { } /** This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -server cluster OvenOperationalState = 72 { +provisional cluster OvenCavityOperationalState = 72 { + revision 1; + enum ErrorStateEnum : enum8 { kNoError = 0; kUnableToStartOrResume = 1; @@ -2795,10 +2797,10 @@ server cluster OvenOperationalState = 72 { } enum OperationalStateEnum : enum8 { - kPreheating = 64; - kPreheated = 65; - kCoolingDown = 66; - kSelfCleaning = 67; + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; } struct ErrorStateStruct { @@ -2824,8 +2826,9 @@ server cluster OvenOperationalState = 72 { readonly attribute nullable char_string phaseList[] = 0; readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; - readonly attribute enum8 operationalState = 4; + readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2833,6 +2836,75 @@ server cluster OvenOperationalState = 72 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +provisional cluster OvenMode = 73 { + revision 1; + + enum ModeTag : enum16 { + kBake = 16384; + kConvection = 16385; + kGrill = 16386; + kRoast = 16387; + kClean = 16388; + kConvectionBake = 16389; + kConvectionRoast = 16390; + kWarming = 16391; + kProofing = 16392; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ @@ -7088,7 +7160,7 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster OvenOperationalState { + server cluster OvenCavityOperationalState { callback attribute phaseList; callback attribute currentPhase; callback attribute operationalStateList; @@ -7102,8 +7174,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } -<<<<<<< HEAD -======= server cluster OvenMode { callback attribute supportedModes; callback attribute currentMode; @@ -7115,7 +7185,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } ->>>>>>> ba1a248920 (oven mode is responding appropriately) server cluster ModeSelect { ram attribute description default = "Coffee"; ram attribute standardNamespace default = 0; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 605ba684c11760..e37e3563dfc567 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3036,70 +3036,6 @@ provisional cluster OvenCavityOperationalState = 72 { command Resume(): OperationalCommandResponse = 3; } -/** This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ -client cluster OvenOperationalState = 72 { - enum ErrorStateEnum : enum8 { - kNoError = 0; - kUnableToStartOrResume = 1; - kUnableToCompleteOperation = 2; - kCommandInvalidInState = 3; - } - - enum OperationalStateEnum : enum8 { - kPreheating = 64; - kPreheated = 65; - kCoolingDown = 66; - kSelfCleaning = 67; - } - - struct ErrorStateStruct { - enum8 errorStateID = 0; - optional char_string<64> errorStateLabel = 1; - optional char_string<64> errorStateDetails = 2; - } - - struct OperationalStateStruct { - enum8 operationalStateID = 0; - optional char_string<64> operationalStateLabel = 1; - } - - critical event OperationalError = 0 { - ErrorStateStruct errorState = 0; - } - - info event OperationCompletion = 1 { - enum8 completionErrorCode = 0; - optional nullable elapsed_s totalOperationalTime = 1; - optional nullable elapsed_s pausedTime = 2; - } - - readonly attribute nullable char_string phaseList[] = 0; - readonly attribute nullable int8u currentPhase = 1; - readonly attribute optional nullable elapsed_s countdownTime = 2; - readonly attribute OperationalStateStruct operationalStateList[] = 3; - readonly attribute enum8 operationalState = 4; - readonly attribute ErrorStateStruct operationalError = 5; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - response struct OperationalCommandResponse = 4 { - ErrorStateStruct commandResponseState = 0; - } - - /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ - command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; - /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ - command Resume(): OperationalCommandResponse = 3; -} - /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster OvenMode = 73 { revision 1; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 69b6d52c188dbf..af9b4d241ada01 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1992,6 +1992,7 @@ "define": "OPERATIONAL_STATE_OVEN_CLUSTER", "side": "client", "enabled": 1, + "apiMaturity": "provisional", "attributes": [ { "name": "FeatureMap", @@ -2061,7 +2062,7 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 60b398000f7535..a7b89fa3b5d7eb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -120,7 +120,7 @@ protected void readAttribute( boolean isFabricFiltered) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); + ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); } protected void writeAttribute( @@ -141,7 +141,7 @@ protected void subscribeAttribute( int maxInterval) { ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); + ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); } protected void invoke( @@ -1012,7 +1012,7 @@ public static class ScenesCluster extends BaseChipCluster { private static final long NAME_SUPPORT_ATTRIBUTE_ID = 4L; private static final long LAST_CONFIGURED_BY_ATTRIBUTE_ID = 5L; private static final long SCENE_TABLE_SIZE_ATTRIBUTE_ID = 6L; - private static final long REMAINING_CAPACITY_ATTRIBUTE_ID = 7L; + private static final long FABRIC_SCENE_INFO_ATTRIBUTE_ID = 7L; 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; @@ -1600,6 +1600,10 @@ public interface LastConfiguredByAttributeCallback extends BaseAttributeCallback void onSuccess(@Nullable Long value); } + public interface FabricSceneInfoAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -1791,29 +1795,34 @@ public void onSuccess(byte[] tlv) { }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readRemainingCapacityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_CAPACITY_ATTRIBUTE_ID); + public void readFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback) { + readFabricSceneInfoAttributeWithFabricFilter(callback, true); + } + + public void readFabricSceneInfoAttributeWithFabricFilter( + FabricSceneInfoAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REMAINING_CAPACITY_ATTRIBUTE_ID, true); + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, isFabricFiltered); } - public void subscribeRemainingCapacityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_CAPACITY_ATTRIBUTE_ID); + public void subscribeFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REMAINING_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -5773,6 +5782,8 @@ public static class BasicInformationCluster extends BaseChipCluster { private static final long UNIQUE_I_D_ATTRIBUTE_ID = 18L; private static final long CAPABILITY_MINIMA_ATTRIBUTE_ID = 19L; private static final long PRODUCT_APPEARANCE_ATTRIBUTE_ID = 20L; + private static final long SPECIFICATION_VERSION_ATTRIBUTE_ID = 21L; + private static final long MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID = 22L; 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; @@ -6382,109 +6393,9 @@ public void onSuccess(byte[] tlv) { }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, EVENT_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( + public void readSpecificationVersionAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -6492,24 +6403,24 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( + public void subscribeSpecificationVersionAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( + public void readMaxPathsPerInvokeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -6517,236 +6428,386 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( + public void subscribeMaxPathsPerInvokeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 41L; - - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { - queryImage(callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, 0); - } - - public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long vendorIDFieldID = 0L; - BaseTLVType vendorIDtlvValue = new UIntType(vendorID); - elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); - - final long productIDFieldID = 1L; - BaseTLVType productIDtlvValue = new UIntType(productID); - elements.add(new StructElement(productIDFieldID, productIDtlvValue)); - - final long softwareVersionFieldID = 2L; - BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); - elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); - - final long protocolsSupportedFieldID = 3L; - BaseTLVType protocolsSupportedtlvValue = ArrayType.generateArrayType(protocolsSupported, (elementprotocolsSupported) -> new UIntType(elementprotocolsSupported)); - elements.add(new StructElement(protocolsSupportedFieldID, protocolsSupportedtlvValue)); - - final long hardwareVersionFieldID = 4L; - BaseTLVType hardwareVersiontlvValue = hardwareVersion.map((nonOptionalhardwareVersion) -> new UIntType(nonOptionalhardwareVersion)).orElse(new EmptyType()); - elements.add(new StructElement(hardwareVersionFieldID, hardwareVersiontlvValue)); - - final long locationFieldID = 5L; - BaseTLVType locationtlvValue = location.map((nonOptionallocation) -> new StringType(nonOptionallocation)).orElse(new EmptyType()); - elements.add(new StructElement(locationFieldID, locationtlvValue)); - - final long requestorCanConsentFieldID = 6L; - BaseTLVType requestorCanConsenttlvValue = requestorCanConsent.map((nonOptionalrequestorCanConsent) -> new BooleanType(nonOptionalrequestorCanConsent)).orElse(new EmptyType()); - elements.add(new StructElement(requestorCanConsentFieldID, requestorCanConsenttlvValue)); - - final long metadataForProviderFieldID = 7L; - BaseTLVType metadataForProvidertlvValue = metadataForProvider.map((nonOptionalmetadataForProvider) -> new ByteArrayType(nonOptionalmetadataForProvider)).orElse(new EmptyType()); - elements.add(new StructElement(metadataForProviderFieldID, metadataForProvidertlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long delayedActionTimeFieldID = 1L; - Optional delayedActionTime = Optional.empty(); - final long imageURIFieldID = 2L; - Optional imageURI = Optional.empty(); - final long softwareVersionFieldID = 3L; - Optional softwareVersion = Optional.empty(); - final long softwareVersionStringFieldID = 4L; - Optional softwareVersionString = Optional.empty(); - final long updateTokenFieldID = 5L; - Optional updateToken = Optional.empty(); - final long userConsentNeededFieldID = 6L; - Optional userConsentNeeded = Optional.empty(); - final long metadataForRequestorFieldID = 7L; - Optional metadataForRequestor = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == delayedActionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - delayedActionTime = Optional.of(castingValue.value(Long.class)); - } - } else if (element.contextTagNum() == imageURIFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - imageURI = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == softwareVersionFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - softwareVersion = Optional.of(castingValue.value(Long.class)); - } - } else if (element.contextTagNum() == softwareVersionStringFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - softwareVersionString = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == updateTokenFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - updateToken = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == userConsentNeededFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { - BooleanType castingValue = element.value(BooleanType.class); - userConsentNeeded = Optional.of(castingValue.value(Boolean.class)); - } - } else if (element.contextTagNum() == metadataForRequestorFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - metadataForRequestor = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, updateToken, userConsentNeeded, metadataForRequestor); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { - applyUpdateRequest(callback, updateToken, newVersion, 0); - } - - public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long updateTokenFieldID = 0L; - BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); - elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); - - final long newVersionFieldID = 1L; - BaseTLVType newVersiontlvValue = new UIntType(newVersion); - elements.add(new StructElement(newVersionFieldID, newVersiontlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long actionFieldID = 0L; - Integer action = null; - final long delayedActionTimeFieldID = 1L; - Long delayedActionTime = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == actionFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - action = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == delayedActionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - delayedActionTime = castingValue.value(Long.class); - } - } - } - callback.onSuccess(action, delayedActionTime); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { - notifyUpdateApplied(callback, updateToken, softwareVersion, 0); - } - - public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - final long updateTokenFieldID = 0L; - BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); - elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); - - final long softwareVersionFieldID = 1L; - BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); - elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface QueryImageResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); - } - - public interface ApplyUpdateResponseCallback extends BaseClusterCallback { - void onSuccess(Integer action, Long delayedActionTime); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 41L; + + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { + queryImage(callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, 0); + } + + public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long vendorIDFieldID = 0L; + BaseTLVType vendorIDtlvValue = new UIntType(vendorID); + elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); + + final long productIDFieldID = 1L; + BaseTLVType productIDtlvValue = new UIntType(productID); + elements.add(new StructElement(productIDFieldID, productIDtlvValue)); + + final long softwareVersionFieldID = 2L; + BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); + elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); + + final long protocolsSupportedFieldID = 3L; + BaseTLVType protocolsSupportedtlvValue = ArrayType.generateArrayType(protocolsSupported, (elementprotocolsSupported) -> new UIntType(elementprotocolsSupported)); + elements.add(new StructElement(protocolsSupportedFieldID, protocolsSupportedtlvValue)); + + final long hardwareVersionFieldID = 4L; + BaseTLVType hardwareVersiontlvValue = hardwareVersion.map((nonOptionalhardwareVersion) -> new UIntType(nonOptionalhardwareVersion)).orElse(new EmptyType()); + elements.add(new StructElement(hardwareVersionFieldID, hardwareVersiontlvValue)); + + final long locationFieldID = 5L; + BaseTLVType locationtlvValue = location.map((nonOptionallocation) -> new StringType(nonOptionallocation)).orElse(new EmptyType()); + elements.add(new StructElement(locationFieldID, locationtlvValue)); + + final long requestorCanConsentFieldID = 6L; + BaseTLVType requestorCanConsenttlvValue = requestorCanConsent.map((nonOptionalrequestorCanConsent) -> new BooleanType(nonOptionalrequestorCanConsent)).orElse(new EmptyType()); + elements.add(new StructElement(requestorCanConsentFieldID, requestorCanConsenttlvValue)); + + final long metadataForProviderFieldID = 7L; + BaseTLVType metadataForProvidertlvValue = metadataForProvider.map((nonOptionalmetadataForProvider) -> new ByteArrayType(nonOptionalmetadataForProvider)).orElse(new EmptyType()); + elements.add(new StructElement(metadataForProviderFieldID, metadataForProvidertlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long delayedActionTimeFieldID = 1L; + Optional delayedActionTime = Optional.empty(); + final long imageURIFieldID = 2L; + Optional imageURI = Optional.empty(); + final long softwareVersionFieldID = 3L; + Optional softwareVersion = Optional.empty(); + final long softwareVersionStringFieldID = 4L; + Optional softwareVersionString = Optional.empty(); + final long updateTokenFieldID = 5L; + Optional updateToken = Optional.empty(); + final long userConsentNeededFieldID = 6L; + Optional userConsentNeeded = Optional.empty(); + final long metadataForRequestorFieldID = 7L; + Optional metadataForRequestor = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == delayedActionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + delayedActionTime = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == imageURIFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + imageURI = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == softwareVersionFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + softwareVersion = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == softwareVersionStringFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + softwareVersionString = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == updateTokenFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + updateToken = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == userConsentNeededFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + userConsentNeeded = Optional.of(castingValue.value(Boolean.class)); + } + } else if (element.contextTagNum() == metadataForRequestorFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + metadataForRequestor = Optional.of(castingValue.value(byte[].class)); + } + } + } + callback.onSuccess(status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, updateToken, userConsentNeeded, metadataForRequestor); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { + applyUpdateRequest(callback, updateToken, newVersion, 0); + } + + public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long updateTokenFieldID = 0L; + BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); + elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); + + final long newVersionFieldID = 1L; + BaseTLVType newVersiontlvValue = new UIntType(newVersion); + elements.add(new StructElement(newVersionFieldID, newVersiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long actionFieldID = 0L; + Integer action = null; + final long delayedActionTimeFieldID = 1L; + Long delayedActionTime = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == actionFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + action = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == delayedActionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + delayedActionTime = castingValue.value(Long.class); + } + } + } + callback.onSuccess(action, delayedActionTime); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { + notifyUpdateApplied(callback, updateToken, softwareVersion, 0); + } + + public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + final long updateTokenFieldID = 0L; + BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); + elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); + + final long softwareVersionFieldID = 1L; + BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); + elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface QueryImageResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); + } + + public interface ApplyUpdateResponseCallback extends BaseClusterCallback { + void onSuccess(Integer action, Long delayedActionTime); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public void readGeneratedCommandListAttribute( @@ -11000,29 +11061,29 @@ public void timeSnapshot(TimeSnapshotResponseCallback callback, int timedInvokeT invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long systemTimeUsFieldID = 0L; - Long systemTimeUs = null; - final long UTCTimeUsFieldID = 1L; - @Nullable Long UTCTimeUs = null; + final long systemTimeMsFieldID = 0L; + Long systemTimeMs = null; + final long posixTimeMsFieldID = 1L; + @Nullable Long posixTimeMs = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == systemTimeUsFieldID) { + if (element.contextTagNum() == systemTimeMsFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - systemTimeUs = castingValue.value(Long.class); + systemTimeMs = castingValue.value(Long.class); } - } else if (element.contextTagNum() == UTCTimeUsFieldID) { + } else if (element.contextTagNum() == posixTimeMsFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - UTCTimeUs = castingValue.value(Long.class); + posixTimeMs = castingValue.value(Long.class); } } } - callback.onSuccess(systemTimeUs, UTCTimeUs); + callback.onSuccess(systemTimeMs, posixTimeMs); }}, commandId, value, timedInvokeTimeoutMs); } public interface TimeSnapshotResponseCallback extends BaseClusterCallback { - void onSuccess(Long systemTimeUs, @Nullable Long UTCTimeUs); + void onSuccess(Long systemTimeMs, @Nullable Long posixTimeMs); } public interface NetworkInterfacesAttributeCallback extends BaseAttributeCallback { @@ -19033,11 +19094,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void stayActiveRequest(DefaultClusterCallback callback) { + public void stayActiveRequest(StayActiveResponseCallback callback) { stayActiveRequest(callback, 0); } - public void stayActiveRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void stayActiveRequest(StayActiveResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 3L; ArrayList elements = new ArrayList<>(); @@ -19045,7 +19106,17 @@ public void stayActiveRequest(DefaultClusterCallback callback, int timedInvokeTi invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long promisedActiveDurationFieldID = 0L; + Long promisedActiveDuration = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == promisedActiveDurationFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + promisedActiveDuration = castingValue.value(Long.class); + } + } + } + callback.onSuccess(promisedActiveDuration); }}, commandId, value, timedInvokeTimeoutMs); } @@ -19053,6 +19124,10 @@ public interface RegisterClientResponseCallback extends BaseClusterCallback { void onSuccess(Long ICDCounter); } + public interface StayActiveResponseCallback extends BaseClusterCallback { + void onSuccess(Long promisedActiveDuration); + } + public interface RegisteredClientsAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -19429,7 +19504,348 @@ public void onSuccess(byte[] tlv) { } } - public static class OvenOperationalStateCluster extends BaseChipCluster { + public static class TimerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 71L; + + private static final long SET_TIME_ATTRIBUTE_ID = 0L; + private static final long TIME_REMAINING_ATTRIBUTE_ID = 1L; + private static final long TIMER_STATE_ATTRIBUTE_ID = 2L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public TimerCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void setTimer(DefaultClusterCallback callback, Long newTime) { + setTimer(callback, newTime, 0); + } + + public void setTimer(DefaultClusterCallback callback, Long newTime, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long newTimeFieldID = 0L; + BaseTLVType newTimetlvValue = new UIntType(newTime); + elements.add(new StructElement(newTimeFieldID, newTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void resetTimer(DefaultClusterCallback callback) { + resetTimer(callback, 0); + } + + public void resetTimer(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void addTime(DefaultClusterCallback callback, Long additionalTime) { + addTime(callback, additionalTime, 0); + } + + public void addTime(DefaultClusterCallback callback, Long additionalTime, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long additionalTimeFieldID = 0L; + BaseTLVType additionalTimetlvValue = new UIntType(additionalTime); + elements.add(new StructElement(additionalTimeFieldID, additionalTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void reduceTime(DefaultClusterCallback callback, Long timeReduction) { + reduceTime(callback, timeReduction, 0); + } + + public void reduceTime(DefaultClusterCallback callback, Long timeReduction, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long timeReductionFieldID = 0L; + BaseTLVType timeReductiontlvValue = new UIntType(timeReduction); + elements.add(new StructElement(timeReductionFieldID, timeReductiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readSetTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SET_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SET_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeSetTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SET_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SET_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTimeRemainingAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIME_REMAINING_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TIME_REMAINING_ATTRIBUTE_ID, true); + } + + public void subscribeTimeRemainingAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIME_REMAINING_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TIME_REMAINING_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTimerStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIMER_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TIMER_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeTimerStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIMER_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TIMER_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class OvenCavityOperationalStateCluster extends BaseChipCluster { public static final long CLUSTER_ID = 72L; private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; @@ -19445,7 +19861,7 @@ public static class OvenOperationalStateCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OvenOperationalStateCluster(long devicePtr, int endpointId) { + public OvenCavityOperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -19468,12 +19884,12 @@ public void pause(OperationalCommandResponseCallback callback, int timedInvokeTi @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OvenOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -19494,12 +19910,12 @@ public void stop(OperationalCommandResponseCallback callback, int timedInvokeTim @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OvenOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -19520,12 +19936,12 @@ public void start(OperationalCommandResponseCallback callback, int timedInvokeTi @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OvenOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -19546,12 +19962,12 @@ public void resume(OperationalCommandResponseCallback callback, int timedInvokeT @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OvenOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -19560,7 +19976,7 @@ public void onResponse(StructType invokeStructValue) { } public interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState); + void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState); } public interface PhaseListAttributeCallback extends BaseAttributeCallback { @@ -19576,11 +19992,11 @@ public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { } public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.OvenOperationalStateClusterErrorStateStruct value); + void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -19681,7 +20097,7 @@ public void readOperationalStateListAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); @@ -19694,7 +20110,7 @@ public void subscribeOperationalStateListAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -19731,7 +20147,7 @@ public void readOperationalErrorAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.OvenOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); @@ -19744,7 +20160,7 @@ public void subscribeOperationalErrorAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.OvenOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -19900,15 +20316,13 @@ public void onSuccess(byte[] tlv) { } } - public static class ModeSelectCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 80L; + public static class OvenModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 73L; - private static final long DESCRIPTION_ATTRIBUTE_ID = 0L; - private static final long STANDARD_NAMESPACE_ATTRIBUTE_ID = 1L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 2L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 3L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 4L; - private static final long ON_MODE_ATTRIBUTE_ID = 5L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; 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; @@ -19916,7 +20330,7 @@ public static class ModeSelectCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ModeSelectCluster(long devicePtr, int endpointId) { + public OvenModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -19926,11 +20340,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(DefaultClusterCallback callback, Integer newMode) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { changeToMode(callback, newMode, 0); } - public void changeToMode(DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -19942,16 +20356,33 @@ public void changeToMode(DefaultClusterCallback callback, Integer newMode, int t invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, value, timedInvokeTimeoutMs); } - public interface StandardNamespaceAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface StartUpModeAttributeCallback extends BaseAttributeCallback { @@ -19978,56 +20409,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readDescriptionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DESCRIPTION_ATTRIBUTE_ID, true); - } - - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, STANDARD_NAMESPACE_ATTRIBUTE_ID, true); - } - - public void subscribeStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, STANDARD_NAMESPACE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readSupportedModesAttribute( SupportedModesAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); @@ -20035,7 +20416,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -20048,7 +20429,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -20297,13 +20678,11 @@ public void onSuccess(byte[] tlv) { } } - public static class LaundryWasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 81L; + public static class LaundryDryerControlsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 74L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long SUPPORTED_DRYNESS_LEVELS_ATTRIBUTE_ID = 0L; + private static final long SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID = 1L; 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; @@ -20311,7 +20690,7 @@ public static class LaundryWasherModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LaundryWasherModeCluster(long devicePtr, int endpointId) { + public LaundryDryerControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -20321,56 +20700,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { - changeToMode(callback, newMode, 0); - } - - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long newModeFieldID = 0L; - BaseTLVType newModetlvValue = new UIntType(newMode); - elements.add(new StructElement(newModeFieldID, newModetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); - } - - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedDrynessLevelsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public interface OnModeAttributeCallback extends BaseAttributeCallback { + public interface SelectedDrynessLevelAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Integer value); } @@ -20390,93 +20724,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readSupportedDrynessLevelsAttribute( + SupportedDrynessLevelsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_DRYNESS_LEVELS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_MODE_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, START_UP_MODE_ATTRIBUTE_ID, true); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); + }, SUPPORTED_DRYNESS_LEVELS_ATTRIBUTE_ID, true); } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + public void subscribeSupportedDrynessLevelsAttribute( + SupportedDrynessLevelsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_DRYNESS_LEVELS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_DRYNESS_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void readSelectedDrynessLevelAttribute( + SelectedDrynessLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -20484,28 +20759,28 @@ public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_MODE_ATTRIBUTE_ID, true); + }, SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID, true); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); + public void writeSelectedDrynessLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSelectedDrynessLevelAttribute(callback, value, 0); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + public void writeSelectedDrynessLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + writeAttribute(new WriteAttributesCallbackImpl(callback), SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void subscribeSelectedDrynessLevelAttribute( + SelectedDrynessLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SELECTED_DRYNESS_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -20659,13 +20934,15 @@ public void onSuccess(byte[] tlv) { } } - public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 82L; + public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 80L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long DESCRIPTION_ATTRIBUTE_ID = 0L; + private static final long STANDARD_NAMESPACE_ATTRIBUTE_ID = 1L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 2L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 3L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 4L; + private static final long ON_MODE_ATTRIBUTE_ID = 5L; 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; @@ -20673,7 +20950,7 @@ public static class RefrigeratorAndTemperatureControlledCabinetModeCluster exten private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { + public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -20683,11 +20960,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + public void changeToMode(DefaultClusterCallback callback, Integer newMode) { changeToMode(callback, newMode, 0); } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + public void changeToMode(DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -20699,33 +20976,16 @@ public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); + public interface StandardNamespaceAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface StartUpModeAttributeCallback extends BaseAttributeCallback { @@ -20752,6 +21012,56 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } + public void readDescriptionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DESCRIPTION_ATTRIBUTE_ID, true); + } + + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STANDARD_NAMESPACE_ATTRIBUTE_ID, true); + } + + public void subscribeStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STANDARD_NAMESPACE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readSupportedModesAttribute( SupportedModesAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); @@ -20759,7 +21069,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -20772,7 +21082,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -21021,13 +21331,13 @@ public void onSuccess(byte[] tlv) { } } - public static class LaundryWasherControlsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 83L; + public static class LaundryWasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 81L; - private static final long SPIN_SPEEDS_ATTRIBUTE_ID = 0L; - private static final long SPIN_SPEED_CURRENT_ATTRIBUTE_ID = 1L; - private static final long NUMBER_OF_RINSES_ATTRIBUTE_ID = 2L; - private static final long SUPPORTED_RINSES_ATTRIBUTE_ID = 3L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; 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; @@ -21035,7 +21345,7 @@ public static class LaundryWasherControlsCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LaundryWasherControlsCluster(long devicePtr, int endpointId) { + public LaundryWasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21045,16 +21355,57 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface SpinSpeedsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); } - public interface SpinSpeedCurrentAttributeCallback extends BaseAttributeCallback { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface StartUpModeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Integer value); } - public interface SupportedRinsesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -21073,122 +21424,122 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SPIN_SPEEDS_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SPIN_SPEEDS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); + public void readCurrentModeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, true); - } - - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { - writeSpinSpeedCurrentAttribute(callback, value, 0); - } - - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), SPIN_SPEED_CURRENT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNumberOfRinsesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, NUMBER_OF_RINSES_ATTRIBUTE_ID, true); + }, START_UP_MODE_ATTRIBUTE_ID, true); } - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { - writeNumberOfRinsesAttribute(callback, value, 0); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(callback, value, 0); } - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), NUMBER_OF_RINSES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeNumberOfRinsesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, NUMBER_OF_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_RINSES_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -21342,11 +21693,12 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcRunModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 84L; + public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 82L; private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; @@ -21355,7 +21707,7 @@ public static class RvcRunModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcRunModeCluster(long devicePtr, int endpointId) { + public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21407,7 +21759,11 @@ public interface ChangeToModeResponseCallback extends BaseClusterCallback { } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); + } + + public interface StartUpModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface OnModeAttributeCallback extends BaseAttributeCallback { @@ -21437,7 +21793,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -21450,7 +21806,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -21480,6 +21836,40 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, START_UP_MODE_ATTRIBUTE_ID, true); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(callback, value, 0); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readOnModeAttribute( OnModeAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); @@ -21665,12 +22055,13 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcCleanModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 85L; + public static class LaundryWasherControlsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 83L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long SPIN_SPEEDS_ATTRIBUTE_ID = 0L; + private static final long SPIN_SPEED_CURRENT_ATTRIBUTE_ID = 1L; + private static final long NUMBER_OF_RINSES_ATTRIBUTE_ID = 2L; + private static final long SUPPORTED_RINSES_ATTRIBUTE_ID = 3L; 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; @@ -21678,7 +22069,7 @@ public static class RvcCleanModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcCleanModeCluster(long devicePtr, int endpointId) { + public LaundryWasherControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21688,53 +22079,16 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { - changeToMode(callback, newMode, 0); - } - - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long newModeFieldID = 0L; - BaseTLVType newModetlvValue = new UIntType(newMode); - elements.add(new StructElement(newModeFieldID, newModetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); + public interface SpinSpeedsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SpinSpeedCurrentAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedRinsesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -21753,88 +22107,122 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); + }, SPIN_SPEEDS_ATTRIBUTE_ID, true); } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void subscribeSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPIN_SPEEDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentModeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void readSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { + writeSpinSpeedCurrentAttribute(callback, value, 0); + } + + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPIN_SPEED_CURRENT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void readNumberOfRinsesAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_MODE_ATTRIBUTE_ID, true); + }, NUMBER_OF_RINSES_ATTRIBUTE_ID, true); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { + writeNumberOfRinsesAttribute(callback, value, 0); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), NUMBER_OF_RINSES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void subscribeNumberOfRinsesAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, NUMBER_OF_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_RINSES_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -21988,15 +22376,12 @@ public void onSuccess(byte[] tlv) { } } - public static class TemperatureControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 86L; + public static class RvcRunModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 84L; - private static final long TEMPERATURE_SETPOINT_ATTRIBUTE_ID = 0L; - private static final long MIN_TEMPERATURE_ATTRIBUTE_ID = 1L; - private static final long MAX_TEMPERATURE_ATTRIBUTE_ID = 2L; - private static final long STEP_ATTRIBUTE_ID = 3L; - private static final long SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID = 4L; - private static final long SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID = 5L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; 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; @@ -22004,7 +22389,7 @@ public static class TemperatureControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public TemperatureControlCluster(long devicePtr, int endpointId) { + public RvcRunModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22014,32 +22399,53 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel) { - setTemperature(callback, targetTemperature, targetTemperatureLevel, 0); + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); } - public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel, int timedInvokeTimeoutMs) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long targetTemperatureFieldID = 0L; - BaseTLVType targetTemperaturetlvValue = targetTemperature.map((nonOptionaltargetTemperature) -> new IntType(nonOptionaltargetTemperature)).orElse(new EmptyType()); - elements.add(new StructElement(targetTemperatureFieldID, targetTemperaturetlvValue)); - - final long targetTemperatureLevelFieldID = 1L; - BaseTLVType targetTemperatureLeveltlvValue = targetTemperatureLevel.map((nonOptionaltargetTemperatureLevel) -> new UIntType(nonOptionaltargetTemperatureLevel)).orElse(new EmptyType()); - elements.add(new StructElement(targetTemperatureLevelFieldID, targetTemperatureLeveltlvValue)); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, value, timedInvokeTimeoutMs); } - public interface SupportedTemperatureLevelsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -22058,84 +22464,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readTemperatureSetpointAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, true); - } - - public void subscribeTemperatureSetpointAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMinTemperatureAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MIN_TEMPERATURE_ATTRIBUTE_ID, true); - } - - public void subscribeMinTemperatureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, MIN_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMaxTemperatureAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_TEMPERATURE_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeMaxTemperatureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStepAttribute( + public void readCurrentModeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -22143,69 +22499,53 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STEP_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeStepAttribute( + public void subscribeCurrentModeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STEP_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); } - public void readSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, true); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -22359,12 +22699,12 @@ public void onSuccess(byte[] tlv) { } } - public static class RefrigeratorAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 87L; + public static class RvcCleanModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 85L; - private static final long MASK_ATTRIBUTE_ID = 0L; - private static final long STATE_ATTRIBUTE_ID = 2L; - private static final long SUPPORTED_ATTRIBUTE_ID = 3L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; 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; @@ -22372,7 +22712,7 @@ public static class RefrigeratorAlarmCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { + public RvcCleanModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22382,6 +22722,55 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); + } + + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22398,79 +22787,88 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMaskAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MASK_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeMaskAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStateAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void readCurrentModeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATE_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeStateAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeSupportedAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -22624,13 +23022,15 @@ public void onSuccess(byte[] tlv) { } } - public static class DishwasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 89L; + public static class TemperatureControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 86L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long TEMPERATURE_SETPOINT_ATTRIBUTE_ID = 0L; + private static final long MIN_TEMPERATURE_ATTRIBUTE_ID = 1L; + private static final long MAX_TEMPERATURE_ATTRIBUTE_ID = 2L; + private static final long STEP_ATTRIBUTE_ID = 3L; + private static final long SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID = 4L; + private static final long SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID = 5L; 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; @@ -22638,7 +23038,7 @@ public static class DishwasherModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public DishwasherModeCluster(long devicePtr, int endpointId) { + public TemperatureControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22648,57 +23048,32 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { - changeToMode(callback, newMode, 0); + public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel) { + setTemperature(callback, targetTemperature, targetTemperatureLevel, 0); } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long newModeFieldID = 0L; - BaseTLVType newModetlvValue = new UIntType(newMode); - elements.add(new StructElement(newModeFieldID, newModetlvValue)); - + final long targetTemperatureFieldID = 0L; + BaseTLVType targetTemperaturetlvValue = targetTemperature.map((nonOptionaltargetTemperature) -> new IntType(nonOptionaltargetTemperature)).orElse(new EmptyType()); + elements.add(new StructElement(targetTemperatureFieldID, targetTemperaturetlvValue)); + + final long targetTemperatureLevelFieldID = 1L; + BaseTLVType targetTemperatureLeveltlvValue = targetTemperatureLevel.map((nonOptionaltargetTemperatureLevel) -> new UIntType(nonOptionaltargetTemperatureLevel)).orElse(new EmptyType()); + elements.add(new StructElement(targetTemperatureLevelFieldID, targetTemperatureLeveltlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); - } - - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedTemperatureLevelsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -22717,34 +23092,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readTemperatureSetpointAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); + }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, true); } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void subscribeTemperatureSetpointAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); + }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentModeAttribute( + public void readMinTemperatureAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -22752,87 +23127,119 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, MIN_TEMPERATURE_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( + public void subscribeMinTemperatureAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + public void readMaxTemperatureAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, START_UP_MODE_ATTRIBUTE_ID, true); + }, MAX_TEMPERATURE_ATTRIBUTE_ID, true); } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); + public void subscribeMaxTemperatureAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void readStepAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STEP_ATTRIBUTE_ID, true); } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + public void subscribeStepAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, STEP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void readSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_MODE_ATTRIBUTE_ID, true); + }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, true); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); + public void subscribeSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void readSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, true); } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void subscribeSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -22986,10 +23393,12 @@ public void onSuccess(byte[] tlv) { } } - public static class AirQualityCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 91L; + public static class RefrigeratorAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 87L; - private static final long AIR_QUALITY_ATTRIBUTE_ID = 0L; + private static final long MASK_ATTRIBUTE_ID = 0L; + private static final long STATE_ATTRIBUTE_ID = 2L; + private static final long SUPPORTED_ATTRIBUTE_ID = 3L; 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; @@ -22997,7 +23406,7 @@ public static class AirQualityCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public AirQualityCluster(long devicePtr, int endpointId) { + public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -23023,29 +23432,79 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readAirQualityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); + public void readMaskAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, AIR_QUALITY_ATTRIBUTE_ID, true); + }, MASK_ATTRIBUTE_ID, true); } - public void subscribeAirQualityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); + public void subscribeMaskAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, AIR_QUALITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATE_ATTRIBUTE_ID, true); + } + + public void subscribeStateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -23199,22 +23658,13 @@ public void onSuccess(byte[] tlv) { } } - public static class SmokeCoAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 92L; + public static class DishwasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 89L; - private static final long EXPRESSED_STATE_ATTRIBUTE_ID = 0L; - private static final long SMOKE_STATE_ATTRIBUTE_ID = 1L; - private static final long C_O_STATE_ATTRIBUTE_ID = 2L; - private static final long BATTERY_ALERT_ATTRIBUTE_ID = 3L; - private static final long DEVICE_MUTED_ATTRIBUTE_ID = 4L; - private static final long TEST_IN_PROGRESS_ATTRIBUTE_ID = 5L; - private static final long HARDWARE_FAULT_ALERT_ATTRIBUTE_ID = 6L; - private static final long END_OF_SERVICE_ALERT_ATTRIBUTE_ID = 7L; - private static final long INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID = 8L; - private static final long INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID = 9L; - private static final long CONTAMINATION_STATE_ATTRIBUTE_ID = 10L; - private static final long SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 11L; - private static final long EXPIRY_DATE_ATTRIBUTE_ID = 12L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; 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; @@ -23222,7 +23672,7 @@ public static class SmokeCoAlarmCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public SmokeCoAlarmCluster(long devicePtr, int endpointId) { + public DishwasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -23232,22 +23682,59 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void selfTestRequest(DefaultClusterCallback callback) { - selfTestRequest(callback, 0); + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); } - public void selfTestRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, value, timedInvokeTimeoutMs); } + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface StartUpModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -23264,34 +23751,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readExpressedStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EXPRESSED_STATE_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeExpressedStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EXPRESSED_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSmokeStateAttribute( + public void readCurrentModeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -23299,199 +23786,217 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SMOKE_STATE_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeSmokeStateAttribute( + public void subscribeCurrentModeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SMOKE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCOStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, C_O_STATE_ATTRIBUTE_ID, true); + }, START_UP_MODE_ATTRIBUTE_ID, true); } - public void subscribeCOStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(callback, value, 0); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, C_O_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatteryAlertAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BATTERY_ALERT_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeBatteryAlertAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BATTERY_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDeviceMutedAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEVICE_MUTED_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeDeviceMutedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEVICE_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readTestInProgressAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TEST_IN_PROGRESS_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeTestInProgressAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TEST_IN_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readHardwareFaultAlertAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeHardwareFaultAlertAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEndOfServiceAlertAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, END_OF_SERVICE_ALERT_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, END_OF_SERVICE_ALERT_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeEndOfServiceAlertAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, END_OF_SERVICE_ALERT_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, END_OF_SERVICE_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInterconnectSmokeAlarmAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeInterconnectSmokeAlarmAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInterconnectCOAlarmAttribute( + public void readClusterRevisionAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -23499,103 +24004,82 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeInterconnectCOAlarmAttribute( + public void subscribeClusterRevisionAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readContaminationStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONTAMINATION_STATE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CONTAMINATION_STATE_ATTRIBUTE_ID, true); - } + public static class AirQualityCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 91L; - public void subscribeContaminationStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONTAMINATION_STATE_ATTRIBUTE_ID); + private static final long AIR_QUALITY_ATTRIBUTE_ID = 0L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CONTAMINATION_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + public AirQualityCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); } - public void readSmokeSensitivityLevelAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; } - public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeSmokeSensitivityLevelAttribute(callback, value, 0); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeSmokeSensitivityLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readExpiryDateAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPIRY_DATE_ATTRIBUTE_ID); + public void readAirQualityAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EXPIRY_DATE_ATTRIBUTE_ID, true); + }, AIR_QUALITY_ATTRIBUTE_ID, true); } - public void subscribeExpiryDateAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPIRY_DATE_ATTRIBUTE_ID); + public void subscribeAirQualityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EXPIRY_DATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, AIR_QUALITY_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -23749,13 +24233,22 @@ public void onSuccess(byte[] tlv) { } } - public static class DishwasherAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 93L; + public static class SmokeCoAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 92L; - private static final long MASK_ATTRIBUTE_ID = 0L; - private static final long LATCH_ATTRIBUTE_ID = 1L; - private static final long STATE_ATTRIBUTE_ID = 2L; - private static final long SUPPORTED_ATTRIBUTE_ID = 3L; + private static final long EXPRESSED_STATE_ATTRIBUTE_ID = 0L; + private static final long SMOKE_STATE_ATTRIBUTE_ID = 1L; + private static final long C_O_STATE_ATTRIBUTE_ID = 2L; + private static final long BATTERY_ALERT_ATTRIBUTE_ID = 3L; + private static final long DEVICE_MUTED_ATTRIBUTE_ID = 4L; + private static final long TEST_IN_PROGRESS_ATTRIBUTE_ID = 5L; + private static final long HARDWARE_FAULT_ALERT_ATTRIBUTE_ID = 6L; + private static final long END_OF_SERVICE_ALERT_ATTRIBUTE_ID = 7L; + private static final long INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID = 8L; + private static final long INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID = 9L; + private static final long CONTAMINATION_STATE_ATTRIBUTE_ID = 10L; + private static final long SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 11L; + private static final long EXPIRY_DATE_ATTRIBUTE_ID = 12L; 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; @@ -23763,7 +24256,7 @@ public static class DishwasherAlarmCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public DishwasherAlarmCluster(long devicePtr, int endpointId) { + public SmokeCoAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -23773,38 +24266,14 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void reset(DefaultClusterCallback callback, Long alarms) { - reset(callback, alarms, 0); + public void selfTestRequest(DefaultClusterCallback callback) { + selfTestRequest(callback, 0); } - public void reset(DefaultClusterCallback callback, Long alarms, int timedInvokeTimeoutMs) { + public void selfTestRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long alarmsFieldID = 0L; - BaseTLVType alarmstlvValue = new UIntType(alarms); - elements.add(new StructElement(alarmsFieldID, alarmstlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void modifyEnabledAlarms(DefaultClusterCallback callback, Long mask) { - modifyEnabledAlarms(callback, mask, 0); - } - - public void modifyEnabledAlarms(DefaultClusterCallback callback, Long mask, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - final long maskFieldID = 0L; - BaseTLVType masktlvValue = new UIntType(mask); - elements.add(new StructElement(maskFieldID, masktlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -23829,234 +24298,234 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMaskAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void readExpressedStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MASK_ATTRIBUTE_ID, true); + }, EXPRESSED_STATE_ATTRIBUTE_ID, true); } - public void subscribeMaskAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void subscribeExpressedStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + }, EXPRESSED_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLatchAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + public void readSmokeStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LATCH_ATTRIBUTE_ID, true); + }, SMOKE_STATE_ATTRIBUTE_ID, true); } - public void subscribeLatchAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + public void subscribeSmokeStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LATCH_ATTRIBUTE_ID, minInterval, maxInterval); + }, SMOKE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStateAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void readCOStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATE_ATTRIBUTE_ID, true); + }, C_O_STATE_ATTRIBUTE_ID, true); } - public void subscribeStateAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void subscribeCOStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, C_O_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void readBatteryAlertAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_ATTRIBUTE_ID, true); + }, BATTERY_ALERT_ATTRIBUTE_ID, true); } - public void subscribeSupportedAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void subscribeBatteryAlertAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, BATTERY_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readDeviceMutedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, DEVICE_MUTED_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeDeviceMutedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, DEVICE_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readTestInProgressAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, TEST_IN_PROGRESS_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeTestInProgressAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, TEST_IN_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readHardwareFaultAlertAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeHardwareFaultAlertAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readEndOfServiceAlertAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, END_OF_SERVICE_ALERT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, END_OF_SERVICE_ALERT_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeEndOfServiceAlertAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, END_OF_SERVICE_ALERT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, END_OF_SERVICE_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readInterconnectSmokeAlarmAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void subscribeInterconnectSmokeAlarmAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( + public void readInterconnectCOAlarmAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -24064,112 +24533,103 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( + public void subscribeInterconnectCOAlarmAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class MicrowaveOvenModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 94L; - - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - 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; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public MicrowaveOvenModeCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + }, INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void readContaminationStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONTAMINATION_STATE_ATTRIBUTE_ID); - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CONTAMINATION_STATE_ATTRIBUTE_ID, true); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeContaminationStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONTAMINATION_STATE_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CONTAMINATION_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readSmokeSensitivityLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); + }, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSmokeSensitivityLevelAttribute(callback, value, 0); + } + + public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSmokeSensitivityLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); + }, SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentModeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void readExpiryDateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPIRY_DATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, EXPIRY_DATE_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void subscribeExpiryDateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPIRY_DATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, EXPIRY_DATE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -24323,14 +24783,13 @@ public void onSuccess(byte[] tlv) { } } - public static class MicrowaveOvenControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 95L; + public static class DishwasherAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 93L; - private static final long COOK_TIME_ATTRIBUTE_ID = 1L; - private static final long POWER_SETTING_ATTRIBUTE_ID = 2L; - private static final long MIN_POWER_ATTRIBUTE_ID = 3L; - private static final long MAX_POWER_ATTRIBUTE_ID = 4L; - private static final long POWER_STEP_ATTRIBUTE_ID = 5L; + private static final long MASK_ATTRIBUTE_ID = 0L; + private static final long LATCH_ATTRIBUTE_ID = 1L; + private static final long STATE_ATTRIBUTE_ID = 2L; + private static final long SUPPORTED_ATTRIBUTE_ID = 3L; 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; @@ -24338,7 +24797,7 @@ public static class MicrowaveOvenControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public MicrowaveOvenControlCluster(long devicePtr, int endpointId) { + public DishwasherAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -24348,25 +24807,17 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting) { - setCookingParameters(callback, cookMode, cookTime, powerSetting, 0); + public void reset(DefaultClusterCallback callback, Long alarms) { + reset(callback, alarms, 0); } - public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, int timedInvokeTimeoutMs) { + public void reset(DefaultClusterCallback callback, Long alarms, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long cookModeFieldID = 0L; - BaseTLVType cookModetlvValue = cookMode.map((nonOptionalcookMode) -> new UIntType(nonOptionalcookMode)).orElse(new EmptyType()); - elements.add(new StructElement(cookModeFieldID, cookModetlvValue)); - - final long cookTimeFieldID = 1L; - BaseTLVType cookTimetlvValue = cookTime.map((nonOptionalcookTime) -> new UIntType(nonOptionalcookTime)).orElse(new EmptyType()); - elements.add(new StructElement(cookTimeFieldID, cookTimetlvValue)); - - final long powerSettingFieldID = 2L; - BaseTLVType powerSettingtlvValue = powerSetting.map((nonOptionalpowerSetting) -> new UIntType(nonOptionalpowerSetting)).orElse(new EmptyType()); - elements.add(new StructElement(powerSettingFieldID, powerSettingtlvValue)); + final long alarmsFieldID = 0L; + BaseTLVType alarmstlvValue = new UIntType(alarms); + elements.add(new StructElement(alarmsFieldID, alarmstlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -24376,17 +24827,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd) { - addMoreTime(callback, timeToAdd, 0); + public void modifyEnabledAlarms(DefaultClusterCallback callback, Long mask) { + modifyEnabledAlarms(callback, mask, 0); } - public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd, int timedInvokeTimeoutMs) { + public void modifyEnabledAlarms(DefaultClusterCallback callback, Long mask, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long timeToAddFieldID = 0L; - BaseTLVType timeToAddtlvValue = new UIntType(timeToAdd); - elements.add(new StructElement(timeToAddFieldID, timeToAddtlvValue)); + final long maskFieldID = 0L; + BaseTLVType masktlvValue = new UIntType(mask); + elements.add(new StructElement(maskFieldID, masktlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -24412,9 +24863,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readCookTimeAttribute( + public void readMaskAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -24422,119 +24873,94 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COOK_TIME_ATTRIBUTE_ID, true); + }, MASK_ATTRIBUTE_ID, true); } - public void subscribeCookTimeAttribute( + public void subscribeMaskAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COOK_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPowerSettingAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + public void readLatchAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_SETTING_ATTRIBUTE_ID, true); - } - - public void subscribePowerSettingAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMinPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_POWER_ATTRIBUTE_ID, true); + }, LATCH_ATTRIBUTE_ID, true); } - public void subscribeMinPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); + public void subscribeLatchAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, LATCH_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); + public void readStateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_POWER_ATTRIBUTE_ID, true); + }, STATE_ATTRIBUTE_ID, true); } - public void subscribeMaxPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); + public void subscribeStateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPowerStepAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + public void readSupportedAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POWER_STEP_ATTRIBUTE_ID, true); + }, SUPPORTED_ATTRIBUTE_ID, true); } - public void subscribePowerStepAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + public void subscribeSupportedAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -24688,15 +25114,11 @@ public void onSuccess(byte[] tlv) { } } - public static class OperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 96L; + public static class MicrowaveOvenModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 94L; - private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; - private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; - private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; - private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; - private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; 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; @@ -24704,7 +25126,7 @@ public static class OperationalStateCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OperationalStateCluster(long devicePtr, int endpointId) { + public MicrowaveOvenModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -24714,132 +25136,8 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void pause(OperationalCommandResponseCallback callback) { - pause(callback, 0); - } - - public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void stop(OperationalCommandResponseCallback callback) { - stop(callback, 0); - } - - public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void start(OperationalCommandResponseCallback callback) { - start(callback, 0); - } - - public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void resume(OperationalCommandResponseCallback callback) { - resume(callback, 0); - } - - public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); - } - - public interface PhaseListAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable List value); - } - - public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value); + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -24858,109 +25156,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readPhaseListAttribute( - PhaseListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PHASE_LIST_ATTRIBUTE_ID, true); - } - - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_PHASE_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); - } - - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateAttribute( + public void readCurrentModeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -24968,44 +25191,19 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateAttribute( + public void subscribeCurrentModeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOperationalErrorAttribute( - OperationalErrorAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); - } - - public void subscribeOperationalErrorAttribute( - OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25159,15 +25357,14 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcOperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 97L; + public static class MicrowaveOvenControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 95L; - private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; - private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; - private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; - private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; - private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; + private static final long COOK_TIME_ATTRIBUTE_ID = 1L; + private static final long POWER_SETTING_ATTRIBUTE_ID = 2L; + private static final long MIN_POWER_ATTRIBUTE_ID = 3L; + private static final long MAX_POWER_ATTRIBUTE_ID = 4L; + private static final long POWER_STEP_ATTRIBUTE_ID = 5L; 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; @@ -25175,7 +25372,7 @@ public static class RvcOperationalStateCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcOperationalStateCluster(long devicePtr, int endpointId) { + public MicrowaveOvenControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25185,134 +25382,54 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void pause(OperationalCommandResponseCallback callback) { - pause(callback, 0); + public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting) { + setCookingParameters(callback, cookMode, cookTime, powerSetting, 0); } - public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } + final long cookModeFieldID = 0L; + BaseTLVType cookModetlvValue = cookMode.map((nonOptionalcookMode) -> new UIntType(nonOptionalcookMode)).orElse(new EmptyType()); + elements.add(new StructElement(cookModeFieldID, cookModetlvValue)); - public void stop(OperationalCommandResponseCallback callback) { - stop(callback, 0); - } + final long cookTimeFieldID = 1L; + BaseTLVType cookTimetlvValue = cookTime.map((nonOptionalcookTime) -> new UIntType(nonOptionalcookTime)).orElse(new EmptyType()); + elements.add(new StructElement(cookTimeFieldID, cookTimetlvValue)); - public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; + final long powerSettingFieldID = 2L; + BaseTLVType powerSettingtlvValue = powerSetting.map((nonOptionalpowerSetting) -> new UIntType(nonOptionalpowerSetting)).orElse(new EmptyType()); + elements.add(new StructElement(powerSettingFieldID, powerSettingtlvValue)); - ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void start(OperationalCommandResponseCallback callback) { - start(callback, 0); + public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd) { + addMoreTime(callback, timeToAdd, 0); } - public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; + public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd, int timedInvokeTimeoutMs) { + final long commandId = 1L; ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void resume(OperationalCommandResponseCallback callback) { - resume(callback, 0); - } - - public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; + final long timeToAddFieldID = 0L; + BaseTLVType timeToAddtlvValue = new UIntType(timeToAdd); + elements.add(new StructElement(timeToAddFieldID, timeToAddtlvValue)); - ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); - } - - public interface PhaseListAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable List value); - } - - public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -25329,109 +25446,84 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readPhaseListAttribute( - PhaseListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void readCookTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHASE_LIST_ATTRIBUTE_ID, true); + }, COOK_TIME_ATTRIBUTE_ID, true); } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void subscribeCookTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, COOK_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_PHASE_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void readPowerSettingAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + }, POWER_SETTING_ATTRIBUTE_ID, true); } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void subscribePowerSettingAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void readMinPowerAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + }, MIN_POWER_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void subscribeMinPowerAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateAttribute( + public void readMaxPowerAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25439,44 +25531,44 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + }, MAX_POWER_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateAttribute( + public void subscribeMaxPowerAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalErrorAttribute( - OperationalErrorAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void readPowerStepAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + }, POWER_STEP_ATTRIBUTE_ID, true); } - public void subscribeOperationalErrorAttribute( - OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void subscribePowerStepAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25630,15 +25722,15 @@ public void onSuccess(byte[] tlv) { } } - public static class HepaFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 113L; + public static class OperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 96L; - private static final long CONDITION_ATTRIBUTE_ID = 0L; - private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; - private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; - private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; - private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; - private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; + private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; + private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; + private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; + private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; 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; @@ -25646,7 +25738,7 @@ public static class HepaFilterMonitoringCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { + public OperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25656,11 +25748,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void resetCondition(DefaultClusterCallback callback) { - resetCondition(callback, 0); + public void pause(OperationalCommandResponseCallback callback) { + pause(callback, 0); } - public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -25668,16 +25760,120 @@ public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeo invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); }}, commandId, value, timedInvokeTimeoutMs); } - public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + public void stop(OperationalCommandResponseCallback callback) { + stop(callback, 0); + } + + public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void start(OperationalCommandResponseCallback callback) { + start(callback, 0); + } + + public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void resume(OperationalCommandResponseCallback callback) { + resume(callback, 0); + } + + public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface OperationalCommandResponseCallback extends BaseClusterCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); + } + + public interface PhaseListAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); + } + + public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } - public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -25696,163 +25892,154 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readConditionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + public void readPhaseListAttribute( + PhaseListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CONDITION_ATTRIBUTE_ID, true); + }, PHASE_LIST_ATTRIBUTE_ID, true); } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); + }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDegradationDirectionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); + }, CURRENT_PHASE_ATTRIBUTE_ID, true); } - public void subscribeDegradationDirectionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readChangeIndicationAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, true); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); } - public void subscribeChangeIndicationAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInPlaceIndicatorAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); } - public void subscribeInPlaceIndicatorAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + public void readOperationalStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { - writeLastChangedTimeAttribute(callback, value, 0); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); } - public void subscribeLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + public void readOperationalErrorAttribute( + OperationalErrorAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); } - public void subscribeReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + public void subscribeOperationalErrorAttribute( + OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -26006,15 +26193,15 @@ public void onSuccess(byte[] tlv) { } } - public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 114L; + public static class RvcOperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 97L; - private static final long CONDITION_ATTRIBUTE_ID = 0L; - private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; - private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; - private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; - private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; - private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; + private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; + private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; + private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; + private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; 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; @@ -26022,7 +26209,7 @@ public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipClust private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { + public RvcOperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -26032,11 +26219,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void resetCondition(DefaultClusterCallback callback) { - resetCondition(callback, 0); + public void pause(OperationalCommandResponseCallback callback) { + pause(callback, 0); } - public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -26044,16 +26231,120 @@ public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeo invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long commandResponseStateFieldID = 0L; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); }}, commandId, value, timedInvokeTimeoutMs); } - public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + public void stop(OperationalCommandResponseCallback callback) { + stop(callback, 0); + } + + public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void start(OperationalCommandResponseCallback callback) { + start(callback, 0); + } + + public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void resume(OperationalCommandResponseCallback callback) { + resume(callback, 0); + } + + public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface OperationalCommandResponseCallback extends BaseClusterCallback { + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); + } + + public interface PhaseListAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); + } + + public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } - public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -26072,24 +26363,391 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readConditionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + public void readPhaseListAttribute( + PhaseListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CONDITION_ATTRIBUTE_ID, true); + }, PHASE_LIST_ATTRIBUTE_ID, true); } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalErrorAttribute( + OperationalErrorAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalErrorAttribute( + OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class HepaFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 113L; + + private static final long CONDITION_ATTRIBUTE_ID = 0L; + private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; + private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; + private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; + private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; + private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void resetCondition(DefaultClusterCallback callback) { + resetCondition(callback, 0); + } + + public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readConditionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CONDITION_ATTRIBUTE_ID, true); + } + + public void subscribeConditionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); @@ -26213,7 +26871,7 @@ public void readReplacementProductListAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); @@ -26226,7 +26884,7 @@ public void subscribeReplacementProductListAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -26382,45 +27040,15 @@ public void onSuccess(byte[] tlv) { } } - public static class DoorLockCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 257L; + public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 114L; - private static final long LOCK_STATE_ATTRIBUTE_ID = 0L; - private static final long LOCK_TYPE_ATTRIBUTE_ID = 1L; - private static final long ACTUATOR_ENABLED_ATTRIBUTE_ID = 2L; - private static final long DOOR_STATE_ATTRIBUTE_ID = 3L; - private static final long DOOR_OPEN_EVENTS_ATTRIBUTE_ID = 4L; - private static final long DOOR_CLOSED_EVENTS_ATTRIBUTE_ID = 5L; - private static final long OPEN_PERIOD_ATTRIBUTE_ID = 6L; - private static final long NUMBER_OF_TOTAL_USERS_SUPPORTED_ATTRIBUTE_ID = 17L; - private static final long NUMBER_OF_P_I_N_USERS_SUPPORTED_ATTRIBUTE_ID = 18L; - private static final long NUMBER_OF_R_F_I_D_USERS_SUPPORTED_ATTRIBUTE_ID = 19L; - private static final long NUMBER_OF_WEEK_DAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 20L; - private static final long NUMBER_OF_YEAR_DAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 21L; - private static final long NUMBER_OF_HOLIDAY_SCHEDULES_SUPPORTED_ATTRIBUTE_ID = 22L; - private static final long MAX_P_I_N_CODE_LENGTH_ATTRIBUTE_ID = 23L; - private static final long MIN_P_I_N_CODE_LENGTH_ATTRIBUTE_ID = 24L; - private static final long MAX_R_F_I_D_CODE_LENGTH_ATTRIBUTE_ID = 25L; - private static final long MIN_R_F_I_D_CODE_LENGTH_ATTRIBUTE_ID = 26L; - private static final long CREDENTIAL_RULES_SUPPORT_ATTRIBUTE_ID = 27L; - private static final long NUMBER_OF_CREDENTIALS_SUPPORTED_PER_USER_ATTRIBUTE_ID = 28L; - private static final long LANGUAGE_ATTRIBUTE_ID = 33L; - private static final long L_E_D_SETTINGS_ATTRIBUTE_ID = 34L; - private static final long AUTO_RELOCK_TIME_ATTRIBUTE_ID = 35L; - private static final long SOUND_VOLUME_ATTRIBUTE_ID = 36L; - private static final long OPERATING_MODE_ATTRIBUTE_ID = 37L; - private static final long SUPPORTED_OPERATING_MODES_ATTRIBUTE_ID = 38L; - private static final long DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_ID = 39L; - private static final long ENABLE_LOCAL_PROGRAMMING_ATTRIBUTE_ID = 40L; - private static final long ENABLE_ONE_TOUCH_LOCKING_ATTRIBUTE_ID = 41L; - private static final long ENABLE_INSIDE_STATUS_L_E_D_ATTRIBUTE_ID = 42L; - private static final long ENABLE_PRIVACY_MODE_BUTTON_ATTRIBUTE_ID = 43L; - private static final long LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_ID = 44L; - private static final long WRONG_CODE_ENTRY_LIMIT_ATTRIBUTE_ID = 48L; - private static final long USER_CODE_TEMPORARY_DISABLE_TIME_ATTRIBUTE_ID = 49L; - private static final long SEND_P_I_N_OVER_THE_AIR_ATTRIBUTE_ID = 50L; - private static final long REQUIRE_P_I_NFOR_REMOTE_OPERATION_ATTRIBUTE_ID = 51L; - private static final long EXPIRING_USER_TIMEOUT_ATTRIBUTE_ID = 53L; + private static final long CONDITION_ATTRIBUTE_ID = 0L; + private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; + private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; + private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; + private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; + private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; 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; @@ -26428,7 +27056,7 @@ public static class DoorLockCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public DoorLockCluster(long devicePtr, int endpointId) { + public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -26438,15 +27066,14 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void resetCondition(DefaultClusterCallback callback) { + resetCondition(callback, 0); + } - public void lockDoor(DefaultClusterCallback callback, Optional PINCode, int timedInvokeTimeoutMs) { + public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long PINCodeFieldID = 0L; - BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); - elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -26455,59 +27082,3894 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } - public void unlockDoor(DefaultClusterCallback callback, Optional PINCode, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - final long PINCodeFieldID = 0L; - BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); - elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - public void unlockWithTimeout(DefaultClusterCallback callback, Integer timeout, Optional PINCode, int timedInvokeTimeoutMs) { - final long commandId = 3L; + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - ArrayList elements = new ArrayList<>(); - final long timeoutFieldID = 0L; - BaseTLVType timeouttlvValue = new UIntType(timeout); - elements.add(new StructElement(timeoutFieldID, timeouttlvValue)); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long PINCodeFieldID = 1L; - BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); - elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + public void readConditionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void setWeekDaySchedule(DefaultClusterCallback callback, Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute) { - setWeekDaySchedule(callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, 0); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CONDITION_ATTRIBUTE_ID, true); } - public void setWeekDaySchedule(DefaultClusterCallback callback, Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute, int timedInvokeTimeoutMs) { - final long commandId = 11L; + public void subscribeConditionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long weekDayIndexFieldID = 0L; - BaseTLVType weekDayIndextlvValue = new UIntType(weekDayIndex); - elements.add(new StructElement(weekDayIndexFieldID, weekDayIndextlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long userIndexFieldID = 1L; - BaseTLVType userIndextlvValue = new UIntType(userIndex); - elements.add(new StructElement(userIndexFieldID, userIndextlvValue)); + public void readDegradationDirectionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); + } + + public void subscribeDegradationDirectionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readChangeIndicationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CHANGE_INDICATION_ATTRIBUTE_ID, true); + } + + public void subscribeChangeIndicationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readInPlaceIndicatorAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); + } + + public void subscribeInPlaceIndicatorAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { + writeLastChangedTimeAttribute(callback, value, 0); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class BooleanStateConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 128L; + + private static final long CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID = 1L; + private static final long DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 2L; + private static final long ALARMS_ACTIVE_ATTRIBUTE_ID = 3L; + private static final long ALARMS_SUPPRESSED_ATTRIBUTE_ID = 4L; + private static final long ALARMS_ENABLED_ATTRIBUTE_ID = 5L; + private static final long ALARMS_SUPPORTED_ATTRIBUTE_ID = 6L; + private static final long SENSOR_FAULT_ATTRIBUTE_ID = 7L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public BooleanStateConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void suppressAlarm(DefaultClusterCallback callback, Integer alarmsToSuppress) { + suppressAlarm(callback, alarmsToSuppress, 0); + } + + public void suppressAlarm(DefaultClusterCallback callback, Integer alarmsToSuppress, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long alarmsToSuppressFieldID = 0L; + BaseTLVType alarmsToSuppresstlvValue = new UIntType(alarmsToSuppress); + elements.add(new StructElement(alarmsToSuppressFieldID, alarmsToSuppresstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void enableDisableAlarm(DefaultClusterCallback callback, Integer alarmsToEnableDisable) { + enableDisableAlarm(callback, alarmsToEnableDisable, 0); + } + + public void enableDisableAlarm(DefaultClusterCallback callback, Integer alarmsToEnableDisable, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long alarmsToEnableDisableFieldID = 0L; + BaseTLVType alarmsToEnableDisabletlvValue = new UIntType(alarmsToEnableDisable); + elements.add(new StructElement(alarmsToEnableDisableFieldID, alarmsToEnableDisabletlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readCurrentSensitivityLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeCurrentSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeCurrentSensitivityLevelAttribute(callback, value, 0); + } + + public void writeCurrentSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeCurrentSensitivityLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedSensitivityLevelsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedSensitivityLevelsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultSensitivityLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); + } + + public void subscribeDefaultSensitivityLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAlarmsActiveAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ACTIVE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALARMS_ACTIVE_ATTRIBUTE_ID, true); + } + + public void subscribeAlarmsActiveAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ACTIVE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALARMS_ACTIVE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAlarmsSuppressedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPRESSED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALARMS_SUPPRESSED_ATTRIBUTE_ID, true); + } + + public void subscribeAlarmsSuppressedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPRESSED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALARMS_SUPPRESSED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAlarmsEnabledAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALARMS_ENABLED_ATTRIBUTE_ID, true); + } + + public void subscribeAlarmsEnabledAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALARMS_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAlarmsSupportedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALARMS_SUPPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeAlarmsSupportedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALARMS_SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSensorFaultAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSOR_FAULT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SENSOR_FAULT_ATTRIBUTE_ID, true); + } + + public void subscribeSensorFaultAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSOR_FAULT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SENSOR_FAULT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class ValveConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 129L; + + private static final long OPEN_DURATION_ATTRIBUTE_ID = 0L; + private static final long DEFAULT_OPEN_DURATION_ATTRIBUTE_ID = 1L; + private static final long AUTO_CLOSE_TIME_ATTRIBUTE_ID = 2L; + private static final long REMAINING_DURATION_ATTRIBUTE_ID = 3L; + private static final long CURRENT_STATE_ATTRIBUTE_ID = 4L; + private static final long TARGET_STATE_ATTRIBUTE_ID = 5L; + private static final long CURRENT_LEVEL_ATTRIBUTE_ID = 6L; + private static final long TARGET_LEVEL_ATTRIBUTE_ID = 7L; + private static final long DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID = 8L; + private static final long VALVE_FAULT_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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ValveConfigurationAndControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void open(DefaultClusterCallback callback, @Nullable Optional openDuration, Optional targetLevel) { + open(callback, openDuration, targetLevel, 0); + } + + public void open(DefaultClusterCallback callback, @Nullable Optional openDuration, Optional targetLevel, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long openDurationFieldID = 0L; + BaseTLVType openDurationtlvValue = openDuration != null ? openDuration.map((nonOptionalopenDuration) -> new UIntType(nonOptionalopenDuration)).orElse(new EmptyType()) : new NullType(); + elements.add(new StructElement(openDurationFieldID, openDurationtlvValue)); + + final long targetLevelFieldID = 1L; + BaseTLVType targetLeveltlvValue = targetLevel.map((nonOptionaltargetLevel) -> new UIntType(nonOptionaltargetLevel)).orElse(new EmptyType()); + elements.add(new StructElement(targetLevelFieldID, targetLeveltlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void close(DefaultClusterCallback callback) { + close(callback, 0); + } + + public void close(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface OpenDurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface DefaultOpenDurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface AutoCloseTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface RemainingDurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface CurrentStateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface TargetStateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface CurrentLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface TargetLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readOpenDurationAttribute( + OpenDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPEN_DURATION_ATTRIBUTE_ID, true); + } + + public void subscribeOpenDurationAttribute( + OpenDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPEN_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultOpenDurationAttribute( + DefaultOpenDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_OPEN_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_OPEN_DURATION_ATTRIBUTE_ID, true); + } + + public void writeDefaultOpenDurationAttribute(DefaultClusterCallback callback, Long value) { + writeDefaultOpenDurationAttribute(callback, value, 0); + } + + public void writeDefaultOpenDurationAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_OPEN_DURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDefaultOpenDurationAttribute( + DefaultOpenDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_OPEN_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_OPEN_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_CLOSE_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AUTO_CLOSE_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_CLOSE_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, AUTO_CLOSE_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readRemainingDurationAttribute( + RemainingDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, REMAINING_DURATION_ATTRIBUTE_ID, true); + } + + public void subscribeRemainingDurationAttribute( + RemainingDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, REMAINING_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentStateAttribute( + CurrentStateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentStateAttribute( + CurrentStateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTargetStateAttribute( + TargetStateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TARGET_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeTargetStateAttribute( + TargetStateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TARGET_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentLevelAttribute( + CurrentLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_LEVEL_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentLevelAttribute( + CurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTargetLevelAttribute( + TargetLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TARGET_LEVEL_ATTRIBUTE_ID, true); + } + + public void subscribeTargetLevelAttribute( + TargetLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TARGET_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultOpenLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeDefaultOpenLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeDefaultOpenLevelAttribute(callback, value, 0); + } + + public void writeDefaultOpenLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDefaultOpenLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_OPEN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readValveFaultAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VALVE_FAULT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VALVE_FAULT_ATTRIBUTE_ID, true); + } + + public void subscribeValveFaultAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VALVE_FAULT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VALVE_FAULT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class ElectricalEnergyMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 145L; + + private static final long ACCURACY_ATTRIBUTE_ID = 0L; + private static final long CUMULATIVE_ENERGY_IMPORTED_ATTRIBUTE_ID = 1L; + private static final long CUMULATIVE_ENERGY_EXPORTED_ATTRIBUTE_ID = 2L; + private static final long PERIODIC_ENERGY_IMPORTED_ATTRIBUTE_ID = 3L; + private static final long PERIODIC_ENERGY_EXPORTED_ATTRIBUTE_ID = 4L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ElectricalEnergyMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public interface AccuracyAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct value); + } + + public interface CumulativeEnergyImportedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value); + } + + public interface CumulativeEnergyExportedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value); + } + + public interface PeriodicEnergyImportedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value); + } + + public interface PeriodicEnergyExportedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readAccuracyAttribute( + AccuracyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCURACY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCURACY_ATTRIBUTE_ID, true); + } + + public void subscribeAccuracyAttribute( + AccuracyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCURACY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCURACY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCumulativeEnergyImportedAttribute( + CumulativeEnergyImportedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CUMULATIVE_ENERGY_IMPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CUMULATIVE_ENERGY_IMPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeCumulativeEnergyImportedAttribute( + CumulativeEnergyImportedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CUMULATIVE_ENERGY_IMPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CUMULATIVE_ENERGY_IMPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCumulativeEnergyExportedAttribute( + CumulativeEnergyExportedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CUMULATIVE_ENERGY_EXPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CUMULATIVE_ENERGY_EXPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeCumulativeEnergyExportedAttribute( + CumulativeEnergyExportedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CUMULATIVE_ENERGY_EXPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CUMULATIVE_ENERGY_EXPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPeriodicEnergyImportedAttribute( + PeriodicEnergyImportedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PERIODIC_ENERGY_IMPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PERIODIC_ENERGY_IMPORTED_ATTRIBUTE_ID, true); + } + + public void subscribePeriodicEnergyImportedAttribute( + PeriodicEnergyImportedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PERIODIC_ENERGY_IMPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PERIODIC_ENERGY_IMPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPeriodicEnergyExportedAttribute( + PeriodicEnergyExportedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PERIODIC_ENERGY_EXPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PERIODIC_ENERGY_EXPORTED_ATTRIBUTE_ID, true); + } + + public void subscribePeriodicEnergyExportedAttribute( + PeriodicEnergyExportedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PERIODIC_ENERGY_EXPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PERIODIC_ENERGY_EXPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class DemandResponseLoadControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 150L; + + private static final long LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 0L; + private static final long NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 1L; + private static final long EVENTS_ATTRIBUTE_ID = 2L; + private static final long ACTIVE_EVENTS_ATTRIBUTE_ID = 3L; + private static final long NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID = 4L; + private static final long NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID = 5L; + private static final long DEFAULT_RANDOM_START_ATTRIBUTE_ID = 6L; + private static final long DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID = 7L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public DemandResponseLoadControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void registerLoadControlProgramRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct loadControlProgram) { + registerLoadControlProgramRequest(callback, loadControlProgram, 0); + } + + public void registerLoadControlProgramRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct loadControlProgram, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long loadControlProgramFieldID = 0L; + BaseTLVType loadControlProgramtlvValue = loadControlProgram.encodeTlv(); + elements.add(new StructElement(loadControlProgramFieldID, loadControlProgramtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void unregisterLoadControlProgramRequest(DefaultClusterCallback callback, byte[] loadControlProgramID) { + unregisterLoadControlProgramRequest(callback, loadControlProgramID, 0); + } + + public void unregisterLoadControlProgramRequest(DefaultClusterCallback callback, byte[] loadControlProgramID, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long loadControlProgramIDFieldID = 0L; + BaseTLVType loadControlProgramIDtlvValue = new ByteArrayType(loadControlProgramID); + elements.add(new StructElement(loadControlProgramIDFieldID, loadControlProgramIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void addLoadControlEventRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct event) { + addLoadControlEventRequest(callback, event, 0); + } + + public void addLoadControlEventRequest(DefaultClusterCallback callback, ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct event, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long eventFieldID = 0L; + BaseTLVType eventtlvValue = event.encodeTlv(); + elements.add(new StructElement(eventFieldID, eventtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void removeLoadControlEventRequest(DefaultClusterCallback callback, byte[] eventID, Integer cancelControl) { + removeLoadControlEventRequest(callback, eventID, cancelControl, 0); + } + + public void removeLoadControlEventRequest(DefaultClusterCallback callback, byte[] eventID, Integer cancelControl, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long eventIDFieldID = 0L; + BaseTLVType eventIDtlvValue = new ByteArrayType(eventID); + elements.add(new StructElement(eventIDFieldID, eventIDtlvValue)); + + final long cancelControlFieldID = 1L; + BaseTLVType cancelControltlvValue = new UIntType(cancelControl); + elements.add(new StructElement(cancelControlFieldID, cancelControltlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void clearLoadControlEventsRequest(DefaultClusterCallback callback) { + clearLoadControlEventsRequest(callback, 0); + } + + public void clearLoadControlEventsRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface LoadControlProgramsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ActiveEventsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readLoadControlProgramsAttribute( + LoadControlProgramsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, true); + } + + public void subscribeLoadControlProgramsAttribute( + LoadControlProgramsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfLoadControlProgramsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfLoadControlProgramsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventsAttribute( + EventsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENTS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENTS_ATTRIBUTE_ID, true); + } + + public void subscribeEventsAttribute( + EventsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENTS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readActiveEventsAttribute( + ActiveEventsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_EVENTS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_EVENTS_ATTRIBUTE_ID, true); + } + + public void subscribeActiveEventsAttribute( + ActiveEventsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_EVENTS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACTIVE_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfEventsPerProgramAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfEventsPerProgramAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfTransitionsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfTransitionsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultRandomStartAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_START_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_RANDOM_START_ATTRIBUTE_ID, true); + } + + public void writeDefaultRandomStartAttribute(DefaultClusterCallback callback, Integer value) { + writeDefaultRandomStartAttribute(callback, value, 0); + } + + public void writeDefaultRandomStartAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_RANDOM_START_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDefaultRandomStartAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_START_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_RANDOM_START_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultRandomDurationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID, true); + } + + public void writeDefaultRandomDurationAttribute(DefaultClusterCallback callback, Integer value) { + writeDefaultRandomDurationAttribute(callback, value, 0); + } + + public void writeDefaultRandomDurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDefaultRandomDurationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class DeviceEnergyManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 152L; + + private static final long E_S_A_TYPE_ATTRIBUTE_ID = 0L; + private static final long E_S_A_CAN_GENERATE_ATTRIBUTE_ID = 1L; + private static final long E_S_A_STATE_ATTRIBUTE_ID = 2L; + private static final long ABS_MIN_POWER_ATTRIBUTE_ID = 3L; + private static final long ABS_MAX_POWER_ATTRIBUTE_ID = 4L; + private static final long POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID = 5L; + private static final long FORECAST_ATTRIBUTE_ID = 6L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public DeviceEnergyManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration) { + powerAdjustRequest(callback, power, duration, 0); + } + + public void powerAdjustRequest(DefaultClusterCallback callback, Long power, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long powerFieldID = 0L; + BaseTLVType powertlvValue = new IntType(power); + elements.add(new StructElement(powerFieldID, powertlvValue)); + + final long durationFieldID = 1L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void cancelPowerAdjustRequest(DefaultClusterCallback callback) { + cancelPowerAdjustRequest(callback, 0); + } + + public void cancelPowerAdjustRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime) { + startTimeAdjustRequest(callback, requestedStartTime, 0); + } + + public void startTimeAdjustRequest(DefaultClusterCallback callback, Long requestedStartTime, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long requestedStartTimeFieldID = 0L; + BaseTLVType requestedStartTimetlvValue = new UIntType(requestedStartTime); + elements.add(new StructElement(requestedStartTimeFieldID, requestedStartTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void pauseRequest(DefaultClusterCallback callback, Long duration) { + pauseRequest(callback, duration, 0); + } + + public void pauseRequest(DefaultClusterCallback callback, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long durationFieldID = 0L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void resumeRequest(DefaultClusterCallback callback) { + resumeRequest(callback, 0); + } + + public void resumeRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments) { + modifyForecastRequest(callback, forecastId, slotAdjustments, 0); + } + + public void modifyForecastRequest(DefaultClusterCallback callback, Long forecastId, ArrayList slotAdjustments, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long forecastIdFieldID = 0L; + BaseTLVType forecastIdtlvValue = new UIntType(forecastId); + elements.add(new StructElement(forecastIdFieldID, forecastIdtlvValue)); + + final long slotAdjustmentsFieldID = 1L; + BaseTLVType slotAdjustmentstlvValue = ArrayType.generateArrayType(slotAdjustments, (elementslotAdjustments) -> elementslotAdjustments.encodeTlv()); + elements.add(new StructElement(slotAdjustmentsFieldID, slotAdjustmentstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints) { + requestConstraintBasedForecast(callback, constraints, 0); + } + + public void requestConstraintBasedForecast(DefaultClusterCallback callback, ArrayList constraints, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long constraintsFieldID = 0L; + BaseTLVType constraintstlvValue = ArrayType.generateArrayType(constraints, (elementconstraints) -> elementconstraints.encodeTlv()); + elements.add(new StructElement(constraintsFieldID, constraintstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface PowerAdjustmentCapabilityAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); + } + + public interface ForecastAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.DeviceEnergyManagementClusterForecastStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readESATypeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_TYPE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, E_S_A_TYPE_ATTRIBUTE_ID, true); + } + + public void subscribeESATypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_TYPE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, E_S_A_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readESACanGenerateAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_CAN_GENERATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, E_S_A_CAN_GENERATE_ATTRIBUTE_ID, true); + } + + public void subscribeESACanGenerateAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_CAN_GENERATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, E_S_A_CAN_GENERATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readESAStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, E_S_A_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeESAStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, E_S_A_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, E_S_A_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAbsMinPowerAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ABS_MIN_POWER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ABS_MIN_POWER_ATTRIBUTE_ID, true); + } + + public void subscribeAbsMinPowerAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ABS_MIN_POWER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ABS_MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAbsMaxPowerAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ABS_MAX_POWER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ABS_MAX_POWER_ATTRIBUTE_ID, true); + } + + public void subscribeAbsMaxPowerAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ABS_MAX_POWER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ABS_MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPowerAdjustmentCapabilityAttribute( + PowerAdjustmentCapabilityAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID, true); + } + + public void subscribePowerAdjustmentCapabilityAttribute( + PowerAdjustmentCapabilityAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readForecastAttribute( + ForecastAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FORECAST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.DeviceEnergyManagementClusterForecastStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FORECAST_ATTRIBUTE_ID, true); + } + + public void subscribeForecastAttribute( + ForecastAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FORECAST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.DeviceEnergyManagementClusterForecastStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FORECAST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class EnergyEvseCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 153L; + + private static final long STATE_ATTRIBUTE_ID = 0L; + private static final long SUPPLY_STATE_ATTRIBUTE_ID = 1L; + private static final long FAULT_STATE_ATTRIBUTE_ID = 2L; + private static final long CHARGING_ENABLED_UNTIL_ATTRIBUTE_ID = 3L; + private static final long DISCHARGING_ENABLED_UNTIL_ATTRIBUTE_ID = 4L; + private static final long CIRCUIT_CAPACITY_ATTRIBUTE_ID = 5L; + private static final long MINIMUM_CHARGE_CURRENT_ATTRIBUTE_ID = 6L; + private static final long MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID = 7L; + private static final long MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID = 8L; + private static final long USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID = 9L; + private static final long RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID = 10L; + private static final long NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID = 33L; + private static final long NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID = 34L; + private static final long NEXT_CHARGE_START_TIME_ATTRIBUTE_ID = 35L; + private static final long NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID = 36L; + private static final long NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID = 37L; + private static final long NEXT_CHARGE_TARGET_SO_C_ATTRIBUTE_ID = 38L; + private static final long APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID = 39L; + private static final long STATE_OF_CHARGE_ATTRIBUTE_ID = 48L; + private static final long BATTERY_CAPACITY_ATTRIBUTE_ID = 49L; + private static final long VEHICLE_I_D_ATTRIBUTE_ID = 50L; + private static final long SESSION_I_D_ATTRIBUTE_ID = 64L; + private static final long SESSION_DURATION_ATTRIBUTE_ID = 65L; + private static final long SESSION_ENERGY_CHARGED_ATTRIBUTE_ID = 66L; + private static final long SESSION_ENERGY_DISCHARGED_ATTRIBUTE_ID = 67L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public EnergyEvseCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + + public void disable(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void enableCharging(DefaultClusterCallback callback, @Nullable Long chargingEnabledUntil, Long minimumChargeCurrent, Long maximumChargeCurrent, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long chargingEnabledUntilFieldID = 0L; + BaseTLVType chargingEnabledUntiltlvValue = chargingEnabledUntil != null ? new UIntType(chargingEnabledUntil) : new NullType(); + elements.add(new StructElement(chargingEnabledUntilFieldID, chargingEnabledUntiltlvValue)); + + final long minimumChargeCurrentFieldID = 1L; + BaseTLVType minimumChargeCurrenttlvValue = new IntType(minimumChargeCurrent); + elements.add(new StructElement(minimumChargeCurrentFieldID, minimumChargeCurrenttlvValue)); + + final long maximumChargeCurrentFieldID = 2L; + BaseTLVType maximumChargeCurrenttlvValue = new IntType(maximumChargeCurrent); + elements.add(new StructElement(maximumChargeCurrentFieldID, maximumChargeCurrenttlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void enableDischarging(DefaultClusterCallback callback, @Nullable Long dischargingEnabledUntil, Long maximumDischargeCurrent, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long dischargingEnabledUntilFieldID = 0L; + BaseTLVType dischargingEnabledUntiltlvValue = dischargingEnabledUntil != null ? new UIntType(dischargingEnabledUntil) : new NullType(); + elements.add(new StructElement(dischargingEnabledUntilFieldID, dischargingEnabledUntiltlvValue)); + + final long maximumDischargeCurrentFieldID = 1L; + BaseTLVType maximumDischargeCurrenttlvValue = new IntType(maximumDischargeCurrent); + elements.add(new StructElement(maximumDischargeCurrentFieldID, maximumDischargeCurrenttlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void startDiagnostics(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void setTargets(DefaultClusterCallback callback, Integer dayOfWeekforSequence, ArrayList chargingTargets, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long dayOfWeekforSequenceFieldID = 0L; + BaseTLVType dayOfWeekforSequencetlvValue = new UIntType(dayOfWeekforSequence); + elements.add(new StructElement(dayOfWeekforSequenceFieldID, dayOfWeekforSequencetlvValue)); + + final long chargingTargetsFieldID = 1L; + BaseTLVType chargingTargetstlvValue = ArrayType.generateArrayType(chargingTargets, (elementchargingTargets) -> elementchargingTargets.encodeTlv()); + elements.add(new StructElement(chargingTargetsFieldID, chargingTargetstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void getTargets(GetTargetsResponseCallback callback, Integer daysToReturn, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long daysToReturnFieldID = 0L; + BaseTLVType daysToReturntlvValue = new UIntType(daysToReturn); + elements.add(new StructElement(daysToReturnFieldID, daysToReturntlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long dayOfWeekforSequenceFieldID = 0L; + Integer dayOfWeekforSequence = null; + final long chargingTargetsFieldID = 1L; + ArrayList chargingTargets = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == dayOfWeekforSequenceFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + dayOfWeekforSequence = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == chargingTargetsFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + chargingTargets = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetStruct.decodeTlv(elementcastingValue)); + } + } + } + callback.onSuccess(dayOfWeekforSequence, chargingTargets); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void clearTargets(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GetTargetsResponseCallback extends BaseClusterCallback { + void onSuccess(Integer dayOfWeekforSequence, ArrayList chargingTargets); + } + + public interface StateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface ChargingEnabledUntilAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface DischargingEnabledUntilAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface NextChargeStartTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface NextChargeTargetTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface NextChargeRequiredEnergyAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface NextChargeTargetSoCAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface ApproximateEVEfficiencyAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface StateOfChargeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface BatteryCapacityAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface VehicleIDAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable String value); + } + + public interface SessionIDAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SessionDurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SessionEnergyChargedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SessionEnergyDischargedAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readStateAttribute( + StateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATE_ATTRIBUTE_ID, true); + } + + public void subscribeStateAttribute( + StateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupplyStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPLY_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPLY_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeSupplyStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPLY_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPLY_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFaultStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FAULT_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FAULT_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeFaultStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FAULT_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FAULT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readChargingEnabledUntilAttribute( + ChargingEnabledUntilAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHARGING_ENABLED_UNTIL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CHARGING_ENABLED_UNTIL_ATTRIBUTE_ID, true); + } + + public void subscribeChargingEnabledUntilAttribute( + ChargingEnabledUntilAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHARGING_ENABLED_UNTIL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CHARGING_ENABLED_UNTIL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDischargingEnabledUntilAttribute( + DischargingEnabledUntilAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DISCHARGING_ENABLED_UNTIL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DISCHARGING_ENABLED_UNTIL_ATTRIBUTE_ID, true); + } + + public void subscribeDischargingEnabledUntilAttribute( + DischargingEnabledUntilAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DISCHARGING_ENABLED_UNTIL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DISCHARGING_ENABLED_UNTIL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCircuitCapacityAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CIRCUIT_CAPACITY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CIRCUIT_CAPACITY_ATTRIBUTE_ID, true); + } + + public void subscribeCircuitCapacityAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CIRCUIT_CAPACITY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CIRCUIT_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMinimumChargeCurrentAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MINIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MINIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, true); + } + + public void subscribeMinimumChargeCurrentAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MINIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MINIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaximumChargeCurrentAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, true); + } + + public void subscribeMaximumChargeCurrentAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaximumDischargeCurrentAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID, true); + } + + public void subscribeMaximumDischargeCurrentAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUserMaximumChargeCurrentAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, true); + } + + public void writeUserMaximumChargeCurrentAttribute(DefaultClusterCallback callback, Long value) { + writeUserMaximumChargeCurrentAttribute(callback, value, 0); + } + + public void writeUserMaximumChargeCurrentAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new IntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeUserMaximumChargeCurrentAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readRandomizationDelayWindowAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID, true); + } + + public void writeRandomizationDelayWindowAttribute(DefaultClusterCallback callback, Long value) { + writeRandomizationDelayWindowAttribute(callback, value, 0); + } + + public void writeRandomizationDelayWindowAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeRandomizationDelayWindowAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfWeeklyTargetsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfWeeklyTargetsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfDailyTargetsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfDailyTargetsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNextChargeStartTimeAttribute( + NextChargeStartTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeNextChargeStartTimeAttribute( + NextChargeStartTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNextChargeTargetTimeAttribute( + NextChargeTargetTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeNextChargeTargetTimeAttribute( + NextChargeTargetTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNextChargeRequiredEnergyAttribute( + NextChargeRequiredEnergyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID, true); + } + + public void subscribeNextChargeRequiredEnergyAttribute( + NextChargeRequiredEnergyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNextChargeTargetSoCAttribute( + NextChargeTargetSoCAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_TARGET_SO_C_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NEXT_CHARGE_TARGET_SO_C_ATTRIBUTE_ID, true); + } + + public void subscribeNextChargeTargetSoCAttribute( + NextChargeTargetSoCAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_TARGET_SO_C_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NEXT_CHARGE_TARGET_SO_C_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readApproximateEVEfficiencyAttribute( + ApproximateEVEfficiencyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID, true); + } + + public void writeApproximateEVEfficiencyAttribute(DefaultClusterCallback callback, Integer value) { + writeApproximateEVEfficiencyAttribute(callback, value, 0); + } + + public void writeApproximateEVEfficiencyAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeApproximateEVEfficiencyAttribute( + ApproximateEVEfficiencyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, APPROXIMATE_E_V_EFFICIENCY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStateOfChargeAttribute( + StateOfChargeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_OF_CHARGE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATE_OF_CHARGE_ATTRIBUTE_ID, true); + } + + public void subscribeStateOfChargeAttribute( + StateOfChargeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_OF_CHARGE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STATE_OF_CHARGE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readBatteryCapacityAttribute( + BatteryCapacityAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_CAPACITY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BATTERY_CAPACITY_ATTRIBUTE_ID, true); + } + + public void subscribeBatteryCapacityAttribute( + BatteryCapacityAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_CAPACITY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, BATTERY_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readVehicleIDAttribute( + VehicleIDAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VEHICLE_I_D_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VEHICLE_I_D_ATTRIBUTE_ID, true); + } + + public void subscribeVehicleIDAttribute( + VehicleIDAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VEHICLE_I_D_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VEHICLE_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSessionIDAttribute( + SessionIDAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_I_D_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SESSION_I_D_ATTRIBUTE_ID, true); + } + + public void subscribeSessionIDAttribute( + SessionIDAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_I_D_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SESSION_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSessionDurationAttribute( + SessionDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SESSION_DURATION_ATTRIBUTE_ID, true); + } + + public void subscribeSessionDurationAttribute( + SessionDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SESSION_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSessionEnergyChargedAttribute( + SessionEnergyChargedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_ENERGY_CHARGED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SESSION_ENERGY_CHARGED_ATTRIBUTE_ID, true); + } + + public void subscribeSessionEnergyChargedAttribute( + SessionEnergyChargedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_ENERGY_CHARGED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SESSION_ENERGY_CHARGED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSessionEnergyDischargedAttribute( + SessionEnergyDischargedAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_ENERGY_DISCHARGED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SESSION_ENERGY_DISCHARGED_ATTRIBUTE_ID, true); + } + + public void subscribeSessionEnergyDischargedAttribute( + SessionEnergyDischargedAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SESSION_ENERGY_DISCHARGED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SESSION_ENERGY_DISCHARGED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class DoorLockCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 257L; + + private static final long LOCK_STATE_ATTRIBUTE_ID = 0L; + private static final long LOCK_TYPE_ATTRIBUTE_ID = 1L; + private static final long ACTUATOR_ENABLED_ATTRIBUTE_ID = 2L; + private static final long DOOR_STATE_ATTRIBUTE_ID = 3L; + private static final long DOOR_OPEN_EVENTS_ATTRIBUTE_ID = 4L; + private static final long DOOR_CLOSED_EVENTS_ATTRIBUTE_ID = 5L; + private static final long OPEN_PERIOD_ATTRIBUTE_ID = 6L; + private static final long NUMBER_OF_TOTAL_USERS_SUPPORTED_ATTRIBUTE_ID = 17L; + private static final long NUMBER_OF_P_I_N_USERS_SUPPORTED_ATTRIBUTE_ID = 18L; + private static final long NUMBER_OF_R_F_I_D_USERS_SUPPORTED_ATTRIBUTE_ID = 19L; + private static final long NUMBER_OF_WEEK_DAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 20L; + private static final long NUMBER_OF_YEAR_DAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 21L; + private static final long NUMBER_OF_HOLIDAY_SCHEDULES_SUPPORTED_ATTRIBUTE_ID = 22L; + private static final long MAX_P_I_N_CODE_LENGTH_ATTRIBUTE_ID = 23L; + private static final long MIN_P_I_N_CODE_LENGTH_ATTRIBUTE_ID = 24L; + private static final long MAX_R_F_I_D_CODE_LENGTH_ATTRIBUTE_ID = 25L; + private static final long MIN_R_F_I_D_CODE_LENGTH_ATTRIBUTE_ID = 26L; + private static final long CREDENTIAL_RULES_SUPPORT_ATTRIBUTE_ID = 27L; + private static final long NUMBER_OF_CREDENTIALS_SUPPORTED_PER_USER_ATTRIBUTE_ID = 28L; + private static final long LANGUAGE_ATTRIBUTE_ID = 33L; + private static final long L_E_D_SETTINGS_ATTRIBUTE_ID = 34L; + private static final long AUTO_RELOCK_TIME_ATTRIBUTE_ID = 35L; + private static final long SOUND_VOLUME_ATTRIBUTE_ID = 36L; + private static final long OPERATING_MODE_ATTRIBUTE_ID = 37L; + private static final long SUPPORTED_OPERATING_MODES_ATTRIBUTE_ID = 38L; + private static final long DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_ID = 39L; + private static final long ENABLE_LOCAL_PROGRAMMING_ATTRIBUTE_ID = 40L; + private static final long ENABLE_ONE_TOUCH_LOCKING_ATTRIBUTE_ID = 41L; + private static final long ENABLE_INSIDE_STATUS_L_E_D_ATTRIBUTE_ID = 42L; + private static final long ENABLE_PRIVACY_MODE_BUTTON_ATTRIBUTE_ID = 43L; + private static final long LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_ID = 44L; + private static final long WRONG_CODE_ENTRY_LIMIT_ATTRIBUTE_ID = 48L; + private static final long USER_CODE_TEMPORARY_DISABLE_TIME_ATTRIBUTE_ID = 49L; + private static final long SEND_P_I_N_OVER_THE_AIR_ATTRIBUTE_ID = 50L; + private static final long REQUIRE_P_I_NFOR_REMOTE_OPERATION_ATTRIBUTE_ID = 51L; + private static final long EXPIRING_USER_TIMEOUT_ATTRIBUTE_ID = 53L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public DoorLockCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + + public void lockDoor(DefaultClusterCallback callback, Optional PINCode, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long PINCodeFieldID = 0L; + BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); + elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void unlockDoor(DefaultClusterCallback callback, Optional PINCode, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long PINCodeFieldID = 0L; + BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); + elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void unlockWithTimeout(DefaultClusterCallback callback, Integer timeout, Optional PINCode, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long timeoutFieldID = 0L; + BaseTLVType timeouttlvValue = new UIntType(timeout); + elements.add(new StructElement(timeoutFieldID, timeouttlvValue)); + + final long PINCodeFieldID = 1L; + BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new ByteArrayType(nonOptionalPINCode)).orElse(new EmptyType()); + elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setWeekDaySchedule(DefaultClusterCallback callback, Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute) { + setWeekDaySchedule(callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, 0); + } + + public void setWeekDaySchedule(DefaultClusterCallback callback, Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute, int timedInvokeTimeoutMs) { + final long commandId = 11L; + + ArrayList elements = new ArrayList<>(); + final long weekDayIndexFieldID = 0L; + BaseTLVType weekDayIndextlvValue = new UIntType(weekDayIndex); + elements.add(new StructElement(weekDayIndexFieldID, weekDayIndextlvValue)); + + final long userIndexFieldID = 1L; + BaseTLVType userIndextlvValue = new UIntType(userIndex); + elements.add(new StructElement(userIndexFieldID, userIndextlvValue)); final long daysMaskFieldID = 2L; BaseTLVType daysMasktlvValue = new UIntType(daysMask); @@ -30888,11 +35350,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { setWeeklySchedule(callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, 0); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); @@ -30947,7 +35409,7 @@ public void onResponse(StructType invokeStructValue) { final long modeForSequenceFieldID = 2L; Integer modeForSequence = null; final long transitionsFieldID = 3L; - ArrayList transitions = null; + ArrayList transitions = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == numberOfTransitionsForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -30967,7 +35429,7 @@ public void onResponse(StructType invokeStructValue) { } else if (element.contextTagNum() == transitionsFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterThermostatScheduleTransition.decodeTlv(elementcastingValue)); + transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterWeeklyScheduleTransitionStruct.decodeTlv(elementcastingValue)); } } } @@ -30992,7 +35454,7 @@ public void onResponse(StructType invokeStructValue) { } public interface GetWeeklyScheduleResponseCallback extends BaseClusterCallback { - void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); + void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); } public interface LocalTemperatureAttributeCallback extends BaseAttributeCallback { @@ -36917,13 +41379,321 @@ public void onSuccess(byte[] tlv) { } } - public static class TemperatureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1026L; + public static class TemperatureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1026L; + + private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; + private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; + private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; + private static final long TOLERANCE_ATTRIBUTE_ID = 3L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public TemperatureMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MEASURED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TOLERANCE_ATTRIBUTE_ID, true); + } + + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class PressureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1027L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; private static final long TOLERANCE_ATTRIBUTE_ID = 3L; + private static final long SCALED_VALUE_ATTRIBUTE_ID = 16L; + private static final long MIN_SCALED_VALUE_ATTRIBUTE_ID = 17L; + private static final long MAX_SCALED_VALUE_ATTRIBUTE_ID = 18L; + private static final long SCALED_TOLERANCE_ATTRIBUTE_ID = 19L; + private static final long SCALE_ATTRIBUTE_ID = 20L; 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; @@ -36931,7 +41701,7 @@ public static class TemperatureMeasurementCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public TemperatureMeasurementCluster(long devicePtr, int endpointId) { + public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -36953,6 +41723,18 @@ public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback void onSuccess(@Nullable Integer value); } + public interface ScaledValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface MinScaledValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface MaxScaledValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -37069,6 +41851,131 @@ public void onSuccess(byte[] tlv) { }, TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readScaledValueAttribute( + ScaledValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCALED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeScaledValueAttribute( + ScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMinScaledValueAttribute( + MinScaledValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_SCALED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MIN_SCALED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeMinScaledValueAttribute( + MinScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_SCALED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MIN_SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxScaledValueAttribute( + MaxScaledValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_SCALED_VALUE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_SCALED_VALUE_ATTRIBUTE_ID, true); + } + + public void subscribeMaxScaledValueAttribute( + MaxScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_SCALED_VALUE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readScaledToleranceAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_TOLERANCE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCALED_TOLERANCE_ATTRIBUTE_ID, true); + } + + public void subscribeScaledToleranceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_TOLERANCE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCALED_TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readScaleAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCALE_ATTRIBUTE_ID, true); + } + + public void subscribeScaleAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCALE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -37220,18 +42127,13 @@ public void onSuccess(byte[] tlv) { } } - public static class PressureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1027L; + public static class FlowMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1028L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; private static final long TOLERANCE_ATTRIBUTE_ID = 3L; - private static final long SCALED_VALUE_ATTRIBUTE_ID = 16L; - private static final long MIN_SCALED_VALUE_ATTRIBUTE_ID = 17L; - private static final long MAX_SCALED_VALUE_ATTRIBUTE_ID = 18L; - private static final long SCALED_TOLERANCE_ATTRIBUTE_ID = 19L; - private static final long SCALE_ATTRIBUTE_ID = 20L; 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; @@ -37239,184 +42141,47 @@ public static class PressureMeasurementCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public PressureMeasurementCluster(long devicePtr, int endpointId) { + public FlowMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @Override @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface ScaledValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MinScaledValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MaxScaledValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_VALUE_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); - } - - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); - } - - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readToleranceAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOLERANCE_ATTRIBUTE_ID, true); + public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } - public void subscribeToleranceAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); + public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } - public void readScaledValueAttribute( - ScaledValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_VALUE_ATTRIBUTE_ID); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SCALED_VALUE_ATTRIBUTE_ID, true); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeScaledValueAttribute( - ScaledValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_VALUE_ATTRIBUTE_ID); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readMinScaledValueAttribute( - MinScaledValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_SCALED_VALUE_ATTRIBUTE_ID); + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -37424,24 +42189,24 @@ public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_SCALED_VALUE_ATTRIBUTE_ID, true); + }, MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeMinScaledValueAttribute( - MinScaledValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_SCALED_VALUE_ATTRIBUTE_ID); + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxScaledValueAttribute( - MaxScaledValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_SCALED_VALUE_ATTRIBUTE_ID); + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -37449,49 +42214,49 @@ public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_SCALED_VALUE_ATTRIBUTE_ID, true); + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeMaxScaledValueAttribute( - MaxScaledValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_SCALED_VALUE_ATTRIBUTE_ID); + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_SCALED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readScaledToleranceAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_TOLERANCE_ATTRIBUTE_ID); + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SCALED_TOLERANCE_ATTRIBUTE_ID, true); + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeScaledToleranceAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALED_TOLERANCE_ATTRIBUTE_ID); + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SCALED_TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readScaleAttribute( + public void readToleranceAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -37499,19 +42264,19 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SCALE_ATTRIBUTE_ID, true); + }, TOLERANCE_ATTRIBUTE_ID, true); } - public void subscribeScaleAttribute( + public void subscribeToleranceAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCALE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SCALE_ATTRIBUTE_ID, minInterval, maxInterval); + }, TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -37665,8 +42430,8 @@ public void onSuccess(byte[] tlv) { } } - public static class FlowMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1028L; + public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1029L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -37679,7 +42444,7 @@ public static class FlowMeasurementCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public FlowMeasurementCluster(long devicePtr, int endpointId) { + public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -37968,13 +42733,21 @@ public void onSuccess(byte[] tlv) { } } - public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1029L; + public static class OccupancySensingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1030L; - private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; - private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; - private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; - private static final long TOLERANCE_ATTRIBUTE_ID = 3L; + private static final long OCCUPANCY_ATTRIBUTE_ID = 0L; + private static final long OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID = 1L; + private static final long OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID = 2L; + private static final long P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 16L; + private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 17L; + private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 18L; + private static final long ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 32L; + private static final long ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 33L; + private static final long ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 34L; + private static final long PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 48L; + private static final long PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 49L; + private static final long PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 50L; 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; @@ -37982,7 +42755,7 @@ public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { + public OccupancySensingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -37992,18 +42765,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -38020,84 +42781,84 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + public void readOccupancyAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MEASURED_VALUE_ATTRIBUTE_ID, true); + }, OCCUPANCY_ATTRIBUTE_ID, true); } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeOccupancyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, OCCUPANCY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + public void readOccupancySensorTypeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID, true); } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeOccupancySensorTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + public void readOccupancySensorTypeBitmapAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID, true); } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeOccupancySensorTypeBitmapAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readToleranceAttribute( + public void readPIROccupiedToUnoccupiedDelayAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -38105,19 +42866,300 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TOLERANCE_ATTRIBUTE_ID, true); + }, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); } - public void subscribeToleranceAttribute( + public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePIROccupiedToUnoccupiedDelayAttribute(callback, value, 0); + } + + public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePIROccupiedToUnoccupiedDelayAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOLERANCE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TOLERANCE_ATTRIBUTE_ID, minInterval, maxInterval); + }, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPIRUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); + } + + public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePIRUnoccupiedToOccupiedDelayAttribute(callback, value, 0); + } + + public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePIRUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPIRUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); + } + + public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writePIRUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); + } + + public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePIRUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUltrasonicOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); + } + + public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicOccupiedToUnoccupiedDelayAttribute(callback, value, 0); + } + + public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUltrasonicUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); + } + + public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicUnoccupiedToOccupiedDelayAttribute(callback, value, 0); + } + + public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUltrasonicUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); + } + + public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); + } + + public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPhysicalContactOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); + } + + public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactOccupiedToUnoccupiedDelayAttribute(callback, value, 0); + } + + public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPhysicalContactUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); + } + + public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactUnoccupiedToOccupiedDelayAttribute(callback, value, 0); + } + + public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); + } + + public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); + } + + public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -38271,21 +43313,20 @@ public void onSuccess(byte[] tlv) { } } - public static class OccupancySensingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1030L; + public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1036L; - private static final long OCCUPANCY_ATTRIBUTE_ID = 0L; - private static final long OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID = 1L; - private static final long OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID = 2L; - private static final long P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 16L; - private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 17L; - private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 18L; - private static final long ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 32L; - private static final long ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 33L; - private static final long ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 34L; - private static final long PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 48L; - private static final long PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 49L; - private static final long PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 50L; + private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; + private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; + private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; + private static final long PEAK_MEASURED_VALUE_ATTRIBUTE_ID = 3L; + private static final long PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID = 4L; + private static final long AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID = 5L; + private static final long AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID = 6L; + private static final long UNCERTAINTY_ATTRIBUTE_ID = 7L; + private static final long MEASUREMENT_UNIT_ATTRIBUTE_ID = 8L; + private static final long MEASUREMENT_MEDIUM_ATTRIBUTE_ID = 9L; + private static final long LEVEL_VALUE_ATTRIBUTE_ID = 10L; 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; @@ -38293,7 +43334,7 @@ public static class OccupancySensingCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OccupancySensingCluster(long devicePtr, int endpointId) { + public CarbonMonoxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -38303,6 +43344,26 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Float value); + } + + public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Float value); + } + + public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Float value); + } + + public interface PeakMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Float value); + } + + public interface AverageMeasuredValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Float value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -38319,288 +43380,209 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readOccupancyAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OCCUPANCY_ATTRIBUTE_ID, true); - } - - public void subscribeOccupancyAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, OCCUPANCY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOccupancySensorTypeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID); + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID, true); + }, MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeOccupancySensorTypeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID); + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOccupancySensorTypeBitmapAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID); + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID, true); + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeOccupancySensorTypeBitmapAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID); + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPIROccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePIROccupiedToUnoccupiedDelayAttribute(callback, value, 0); - } - - public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribePIROccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPIRUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePIRUnoccupiedToOccupiedDelayAttribute(callback, value, 0); - } - - public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, PEAK_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribePIRUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, PEAK_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPIRUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); - } - - public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writePIRUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); - } - - public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, true); } - public void subscribePIRUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); + }, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUltrasonicOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicOccupiedToUnoccupiedDelayAttribute(callback, value, 0); - } - - public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID, true); } - public void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUltrasonicUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicUnoccupiedToOccupiedDelayAttribute(callback, value, 0); - } - - public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, true); } - public void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUltrasonicUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + public void readUncertaintyAttribute( + FloatAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNCERTAINTY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); - } - - public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); - } - - public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, UNCERTAINTY_ATTRIBUTE_ID, true); } - public void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNCERTAINTY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); + }, UNCERTAINTY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPhysicalContactOccupiedToUnoccupiedDelayAttribute( + public void readMeasurementUnitAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_UNIT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -38608,33 +43590,24 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactOccupiedToUnoccupiedDelayAttribute(callback, value, 0); - } - - public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, MEASUREMENT_UNIT_ATTRIBUTE_ID, true); } - public void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute( + public void subscribeMeasurementUnitAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_UNIT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, MEASUREMENT_UNIT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPhysicalContactUnoccupiedToOccupiedDelayAttribute( + public void readMeasurementMediumAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_MEDIUM_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -38642,33 +43615,24 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, true); - } - - public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactUnoccupiedToOccupiedDelayAttribute(callback, value, 0); - } - - public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, MEASUREMENT_MEDIUM_ATTRIBUTE_ID, true); } - public void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute( + public void subscribeMeasurementMediumAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_MEDIUM_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID, minInterval, maxInterval); + }, MEASUREMENT_MEDIUM_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute( + public void readLevelValueAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LEVEL_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -38676,28 +43640,19 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, true); - } - - public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { - writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(callback, value, 0); - } - - public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, LEVEL_VALUE_ATTRIBUTE_ID, true); } - public void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute( + public void subscribeLevelValueAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LEVEL_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); + }, LEVEL_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -38851,8 +43806,8 @@ public void onSuccess(byte[] tlv) { } } - public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1036L; + public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1037L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -38872,7 +43827,7 @@ public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseCh private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public CarbonMonoxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public CarbonDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -39344,8 +44299,8 @@ public void onSuccess(byte[] tlv) { } } - public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1037L; + public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1043L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -39365,7 +44320,7 @@ public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChi private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public CarbonDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public NitrogenDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -39837,8 +44792,8 @@ public void onSuccess(byte[] tlv) { } } - public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1043L; + public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1045L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -39858,7 +44813,7 @@ public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseC private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public NitrogenDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public OzoneConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -40330,8 +45285,8 @@ public void onSuccess(byte[] tlv) { } } - public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1045L; + public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1066L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -40351,7 +45306,7 @@ public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OzoneConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public Pm25ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -40823,8 +45778,8 @@ public void onSuccess(byte[] tlv) { } } - public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1066L; + public static class FormaldehydeConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1067L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -40844,7 +45799,7 @@ public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public Pm25ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public FormaldehydeConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -41316,8 +46271,8 @@ public void onSuccess(byte[] tlv) { } } - public static class FormaldehydeConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1067L; + public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1068L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -41337,7 +46292,7 @@ public static class FormaldehydeConcentrationMeasurementCluster extends BaseChip private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public FormaldehydeConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public Pm1ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -41809,8 +46764,8 @@ public void onSuccess(byte[] tlv) { } } - public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1068L; + public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1069L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -41830,7 +46785,7 @@ public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public Pm1ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public Pm10ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -42302,8 +47257,8 @@ public void onSuccess(byte[] tlv) { } } - public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1069L; + public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1070L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -42323,7 +47278,7 @@ public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public Pm10ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -42795,8 +47750,8 @@ public void onSuccess(byte[] tlv) { } } - public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1070L; + public static class RadonConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1071L; private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; @@ -42816,7 +47771,7 @@ public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public RadonConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -43288,20 +48243,11 @@ public void onSuccess(byte[] tlv) { } } - public static class RadonConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1071L; + public static class WakeOnLanCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1283L; - private static final long MEASURED_VALUE_ATTRIBUTE_ID = 0L; - private static final long MIN_MEASURED_VALUE_ATTRIBUTE_ID = 1L; - private static final long MAX_MEASURED_VALUE_ATTRIBUTE_ID = 2L; - private static final long PEAK_MEASURED_VALUE_ATTRIBUTE_ID = 3L; - private static final long PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID = 4L; - private static final long AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID = 5L; - private static final long AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID = 6L; - private static final long UNCERTAINTY_ATTRIBUTE_ID = 7L; - private static final long MEASUREMENT_UNIT_ATTRIBUTE_ID = 8L; - private static final long MEASUREMENT_MEDIUM_ATTRIBUTE_ID = 9L; - private static final long LEVEL_VALUE_ATTRIBUTE_ID = 10L; + private static final long M_A_C_ADDRESS_ATTRIBUTE_ID = 0L; + private static final long LINK_LOCAL_ADDRESS_ATTRIBUTE_ID = 1L; 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; @@ -43309,7 +48255,7 @@ public static class RadonConcentrationMeasurementCluster extends BaseChipCluster private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RadonConcentrationMeasurementCluster(long devicePtr, int endpointId) { + public WakeOnLanCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -43319,26 +48265,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface MeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Float value); - } - - public interface MinMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Float value); - } - - public interface MaxMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Float value); - } - - public interface PeakMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Float value); - } - - public interface AverageMeasuredValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Float value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -43355,159 +48281,159 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMeasuredValueAttribute( - MeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + public void readMACAddressAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, M_A_C_ADDRESS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MEASURED_VALUE_ATTRIBUTE_ID, true); + }, M_A_C_ADDRESS_ATTRIBUTE_ID, true); } - public void subscribeMeasuredValueAttribute( - MeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeMACAddressAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, M_A_C_ADDRESS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, M_A_C_ADDRESS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + public void readLinkLocalAddressAttribute( + OctetStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID, true); } - public void subscribeMinMeasuredValueAttribute( - MinMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeLinkLocalAddressAttribute( + OctetStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeMaxMeasuredValueAttribute( - MaxMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PEAK_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribePeakMeasuredValueAttribute( - PeakMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PEAK_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPeakMeasuredValueWindowAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribePeakMeasuredValueWindowAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PEAK_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeAverageMeasuredValueAttribute( - AverageMeasuredValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, AVERAGE_MEASURED_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAverageMeasuredValueWindowAttribute( + public void readFeatureMapAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -43515,119 +48441,385 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeAverageMeasuredValueWindowAttribute( + public void subscribeFeatureMapAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, AVERAGE_MEASURED_VALUE_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUncertaintyAttribute( - FloatAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNCERTAINTY_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, UNCERTAINTY_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeUncertaintyAttribute( - FloatAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNCERTAINTY_ATTRIBUTE_ID); + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, UNCERTAINTY_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readMeasurementUnitAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_UNIT_ATTRIBUTE_ID); + public static class ChannelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1284L; + + private static final long CHANNEL_LIST_ATTRIBUTE_ID = 0L; + private static final long LINEUP_ATTRIBUTE_ID = 1L; + private static final long CURRENT_CHANNEL_ATTRIBUTE_ID = 2L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ChannelCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void changeChannel(ChangeChannelResponseCallback callback, String match) { + changeChannel(callback, match, 0); + } + + public void changeChannel(ChangeChannelResponseCallback callback, String match, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long matchFieldID = 0L; + BaseTLVType matchtlvValue = new StringType(match); + elements.add(new StructElement(matchFieldID, matchtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void changeChannelByNumber(DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { + changeChannelByNumber(callback, majorNumber, minorNumber, 0); + } + + public void changeChannelByNumber(DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long majorNumberFieldID = 0L; + BaseTLVType majorNumbertlvValue = new UIntType(majorNumber); + elements.add(new StructElement(majorNumberFieldID, majorNumbertlvValue)); + + final long minorNumberFieldID = 1L; + BaseTLVType minorNumbertlvValue = new UIntType(minorNumber); + elements.add(new StructElement(minorNumberFieldID, minorNumbertlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void skipChannel(DefaultClusterCallback callback, Integer count) { + skipChannel(callback, count, 0); + } + + public void skipChannel(DefaultClusterCallback callback, Integer count, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long countFieldID = 0L; + BaseTLVType counttlvValue = new IntType(count); + elements.add(new StructElement(countFieldID, counttlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void getProgramGuide(ProgramGuideResponseCallback callback, Optional startTime, Optional endTime, Optional> channelList, Optional pageToken, Optional recordingFlag, Optional> externalIDList, Optional data) { + getProgramGuide(callback, startTime, endTime, channelList, pageToken, recordingFlag, externalIDList, data, 0); + } + + public void getProgramGuide(ProgramGuideResponseCallback callback, Optional startTime, Optional endTime, Optional> channelList, Optional pageToken, Optional recordingFlag, Optional> externalIDList, Optional data, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + final long startTimeFieldID = 0L; + BaseTLVType startTimetlvValue = startTime.map((nonOptionalstartTime) -> new UIntType(nonOptionalstartTime)).orElse(new EmptyType()); + elements.add(new StructElement(startTimeFieldID, startTimetlvValue)); + + final long endTimeFieldID = 1L; + BaseTLVType endTimetlvValue = endTime.map((nonOptionalendTime) -> new UIntType(nonOptionalendTime)).orElse(new EmptyType()); + elements.add(new StructElement(endTimeFieldID, endTimetlvValue)); + + final long channelListFieldID = 2L; + BaseTLVType channelListtlvValue = channelList.map((nonOptionalchannelList) -> ArrayType.generateArrayType(nonOptionalchannelList, (elementnonOptionalchannelList) -> elementnonOptionalchannelList.encodeTlv())).orElse(new EmptyType()); + elements.add(new StructElement(channelListFieldID, channelListtlvValue)); + + final long pageTokenFieldID = 3L; + BaseTLVType pageTokentlvValue = pageToken.map((nonOptionalpageToken) -> nonOptionalpageToken.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(pageTokenFieldID, pageTokentlvValue)); + + final long recordingFlagFieldID = 4L; + BaseTLVType recordingFlagtlvValue = recordingFlag.map((nonOptionalrecordingFlag) -> new UIntType(nonOptionalrecordingFlag)).orElse(new EmptyType()); + elements.add(new StructElement(recordingFlagFieldID, recordingFlagtlvValue)); + + final long externalIDListFieldID = 5L; + BaseTLVType externalIDListtlvValue = externalIDList.map((nonOptionalexternalIDList) -> ArrayType.generateArrayType(nonOptionalexternalIDList, (elementnonOptionalexternalIDList) -> elementnonOptionalexternalIDList.encodeTlv())).orElse(new EmptyType()); + elements.add(new StructElement(externalIDListFieldID, externalIDListtlvValue)); + + final long dataFieldID = 6L; + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long channelPagingStructFieldID = 0L; + Integer channelPagingStruct = null; + final long programListFieldID = 1L; + ArrayList programList = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == channelPagingStructFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + channelPagingStruct = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == programListFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + programList = castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterProgramStruct.decodeTlv(elementcastingValue)); + } + } + } + callback.onSuccess(channelPagingStruct, programList); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data) { + recordProgram(callback, programIdentifier, shouldRecordSeries, externalIDList, data, 0); + } + + public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long programIdentifierFieldID = 0L; + BaseTLVType programIdentifiertlvValue = new StringType(programIdentifier); + elements.add(new StructElement(programIdentifierFieldID, programIdentifiertlvValue)); + + final long shouldRecordSeriesFieldID = 1L; + BaseTLVType shouldRecordSeriestlvValue = new BooleanType(shouldRecordSeries); + elements.add(new StructElement(shouldRecordSeriesFieldID, shouldRecordSeriestlvValue)); + + final long externalIDListFieldID = 2L; + BaseTLVType externalIDListtlvValue = ArrayType.generateArrayType(externalIDList, (elementexternalIDList) -> elementexternalIDList.encodeTlv()); + elements.add(new StructElement(externalIDListFieldID, externalIDListtlvValue)); + + final long dataFieldID = 3L; + BaseTLVType datatlvValue = new ByteArrayType(data); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data) { + cancelRecordProgram(callback, programIdentifier, shouldRecordSeries, externalIDList, data, 0); + } + + public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + final long programIdentifierFieldID = 0L; + BaseTLVType programIdentifiertlvValue = new StringType(programIdentifier); + elements.add(new StructElement(programIdentifierFieldID, programIdentifiertlvValue)); + + final long shouldRecordSeriesFieldID = 1L; + BaseTLVType shouldRecordSeriestlvValue = new BooleanType(shouldRecordSeries); + elements.add(new StructElement(shouldRecordSeriesFieldID, shouldRecordSeriestlvValue)); + + final long externalIDListFieldID = 2L; + BaseTLVType externalIDListtlvValue = ArrayType.generateArrayType(externalIDList, (elementexternalIDList) -> elementexternalIDList.encodeTlv()); + elements.add(new StructElement(externalIDListFieldID, externalIDListtlvValue)); + + final long dataFieldID = 3L; + BaseTLVType datatlvValue = new ByteArrayType(data); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ChangeChannelResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional data); + } + + public interface ProgramGuideResponseCallback extends BaseClusterCallback { + void onSuccess(Integer channelPagingStruct, ArrayList programList); + } + + public interface ChannelListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface LineupAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ChannelClusterLineupInfoStruct value); + } + + public interface CurrentChannelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ChannelClusterChannelInfoStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readChannelListAttribute( + ChannelListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANNEL_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MEASUREMENT_UNIT_ATTRIBUTE_ID, true); + }, CHANNEL_LIST_ATTRIBUTE_ID, true); } - public void subscribeMeasurementUnitAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_UNIT_ATTRIBUTE_ID); + public void subscribeChannelListAttribute( + ChannelListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANNEL_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MEASUREMENT_UNIT_ATTRIBUTE_ID, minInterval, maxInterval); + }, CHANNEL_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMeasurementMediumAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_MEDIUM_ATTRIBUTE_ID); + public void readLineupAttribute( + LineupAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINEUP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ChannelClusterLineupInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MEASUREMENT_MEDIUM_ATTRIBUTE_ID, true); + }, LINEUP_ATTRIBUTE_ID, true); } - public void subscribeMeasurementMediumAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_MEDIUM_ATTRIBUTE_ID); + public void subscribeLineupAttribute( + LineupAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINEUP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ChannelClusterLineupInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MEASUREMENT_MEDIUM_ATTRIBUTE_ID, minInterval, maxInterval); + }, LINEUP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLevelValueAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LEVEL_VALUE_ATTRIBUTE_ID); + public void readCurrentChannelAttribute( + CurrentChannelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CHANNEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ChannelClusterChannelInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LEVEL_VALUE_ATTRIBUTE_ID, true); + }, CURRENT_CHANNEL_ATTRIBUTE_ID, true); } - public void subscribeLevelValueAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LEVEL_VALUE_ATTRIBUTE_ID); + public void subscribeCurrentChannelAttribute( + CurrentChannelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CHANNEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ChannelClusterChannelInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LEVEL_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_CHANNEL_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -43781,11 +48973,11 @@ public void onSuccess(byte[] tlv) { } } - public static class WakeOnLanCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1283L; - - private static final long M_A_C_ADDRESS_ATTRIBUTE_ID = 0L; - private static final long LINK_LOCAL_ADDRESS_ATTRIBUTE_ID = 1L; + public static class TargetNavigatorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1285L; + + private static final long TARGET_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_TARGET_ATTRIBUTE_ID = 1L; 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; @@ -43793,7 +48985,7 @@ public static class WakeOnLanCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public WakeOnLanCluster(long devicePtr, int endpointId) { + public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -43803,6 +48995,55 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void navigateTarget(NavigateTargetResponseCallback callback, Integer target, Optional data) { + navigateTarget(callback, target, data, 0); + } + + public void navigateTarget(NavigateTargetResponseCallback callback, Integer target, Optional data, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long targetFieldID = 0L; + BaseTLVType targettlvValue = new UIntType(target); + elements.add(new StructElement(targetFieldID, targettlvValue)); + + final long dataFieldID = 1L; + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface NavigateTargetResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional data); + } + + public interface TargetListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -43819,54 +49060,54 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMACAddressAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, M_A_C_ADDRESS_ATTRIBUTE_ID); + public void readTargetListAttribute( + TargetListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, M_A_C_ADDRESS_ATTRIBUTE_ID, true); + }, TARGET_LIST_ATTRIBUTE_ID, true); } - public void subscribeMACAddressAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, M_A_C_ADDRESS_ATTRIBUTE_ID); + public void subscribeTargetListAttribute( + TargetListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, M_A_C_ADDRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, TARGET_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLinkLocalAddressAttribute( - OctetStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID); + public void readCurrentTargetAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARGET_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID, true); + }, CURRENT_TARGET_ATTRIBUTE_ID, true); } - public void subscribeLinkLocalAddressAttribute( - OctetStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID); + public void subscribeCurrentTargetAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARGET_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LINK_LOCAL_ADDRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_TARGET_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -44020,12 +49261,20 @@ public void onSuccess(byte[] tlv) { } } - public static class ChannelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1284L; + public static class MediaPlaybackCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1286L; - private static final long CHANNEL_LIST_ATTRIBUTE_ID = 0L; - private static final long LINEUP_ATTRIBUTE_ID = 1L; - private static final long CURRENT_CHANNEL_ATTRIBUTE_ID = 2L; + private static final long CURRENT_STATE_ATTRIBUTE_ID = 0L; + private static final long START_TIME_ATTRIBUTE_ID = 1L; + private static final long DURATION_ATTRIBUTE_ID = 2L; + private static final long SAMPLED_POSITION_ATTRIBUTE_ID = 3L; + private static final long PLAYBACK_SPEED_ATTRIBUTE_ID = 4L; + private static final long SEEK_RANGE_END_ATTRIBUTE_ID = 5L; + private static final long SEEK_RANGE_START_ATTRIBUTE_ID = 6L; + private static final long ACTIVE_AUDIO_TRACK_ATTRIBUTE_ID = 7L; + private static final long AVAILABLE_AUDIO_TRACKS_ATTRIBUTE_ID = 8L; + private static final long ACTIVE_TEXT_TRACK_ATTRIBUTE_ID = 9L; + private static final long AVAILABLE_TEXT_TRACKS_ATTRIBUTE_ID = 10L; 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; @@ -44033,7 +49282,7 @@ public static class ChannelCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ChannelCluster(long devicePtr, int endpointId) { + public MediaPlaybackCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -44043,18 +49292,47 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeChannel(ChangeChannelResponseCallback callback, String match) { - changeChannel(callback, match, 0); + public void play(PlaybackResponseCallback callback) { + play(callback, 0); } - public void changeChannel(ChangeChannelResponseCallback callback, String match, int timedInvokeTimeoutMs) { + public void play(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long matchFieldID = 0L; - BaseTLVType matchtlvValue = new StringType(match); - elements.add(new StructElement(matchFieldID, matchtlvValue)); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void pause(PlaybackResponseCallback callback) { + pause(callback, 0); + } + + public void pause(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -44080,21 +49358,338 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void changeChannelByNumber(DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { - changeChannelByNumber(callback, majorNumber, minorNumber, 0); + public void stop(PlaybackResponseCallback callback) { + stop(callback, 0); } - public void changeChannelByNumber(DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber, int timedInvokeTimeoutMs) { + public void stop(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long majorNumberFieldID = 0L; - BaseTLVType majorNumbertlvValue = new UIntType(majorNumber); - elements.add(new StructElement(majorNumberFieldID, majorNumbertlvValue)); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } - final long minorNumberFieldID = 1L; - BaseTLVType minorNumbertlvValue = new UIntType(minorNumber); - elements.add(new StructElement(minorNumberFieldID, minorNumbertlvValue)); + public void startOver(PlaybackResponseCallback callback) { + startOver(callback, 0); + } + + public void startOver(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void previous(PlaybackResponseCallback callback) { + previous(callback, 0); + } + + public void previous(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void next(PlaybackResponseCallback callback) { + next(callback, 0); + } + + public void next(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void rewind(PlaybackResponseCallback callback, Optional audioAdvanceUnmuted) { + rewind(callback, audioAdvanceUnmuted, 0); + } + + public void rewind(PlaybackResponseCallback callback, Optional audioAdvanceUnmuted, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long audioAdvanceUnmutedFieldID = 0L; + BaseTLVType audioAdvanceUnmutedtlvValue = audioAdvanceUnmuted.map((nonOptionalaudioAdvanceUnmuted) -> new BooleanType(nonOptionalaudioAdvanceUnmuted)).orElse(new EmptyType()); + elements.add(new StructElement(audioAdvanceUnmutedFieldID, audioAdvanceUnmutedtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void fastForward(PlaybackResponseCallback callback, Optional audioAdvanceUnmuted) { + fastForward(callback, audioAdvanceUnmuted, 0); + } + + public void fastForward(PlaybackResponseCallback callback, Optional audioAdvanceUnmuted, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + final long audioAdvanceUnmutedFieldID = 0L; + BaseTLVType audioAdvanceUnmutedtlvValue = audioAdvanceUnmuted.map((nonOptionalaudioAdvanceUnmuted) -> new BooleanType(nonOptionalaudioAdvanceUnmuted)).orElse(new EmptyType()); + elements.add(new StructElement(audioAdvanceUnmutedFieldID, audioAdvanceUnmutedtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void skipForward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { + skipForward(callback, deltaPositionMilliseconds, 0); + } + + public void skipForward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds, int timedInvokeTimeoutMs) { + final long commandId = 8L; + + ArrayList elements = new ArrayList<>(); + final long deltaPositionMillisecondsFieldID = 0L; + BaseTLVType deltaPositionMillisecondstlvValue = new UIntType(deltaPositionMilliseconds); + elements.add(new StructElement(deltaPositionMillisecondsFieldID, deltaPositionMillisecondstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void skipBackward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { + skipBackward(callback, deltaPositionMilliseconds, 0); + } + + public void skipBackward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds, int timedInvokeTimeoutMs) { + final long commandId = 9L; + + ArrayList elements = new ArrayList<>(); + final long deltaPositionMillisecondsFieldID = 0L; + BaseTLVType deltaPositionMillisecondstlvValue = new UIntType(deltaPositionMilliseconds); + elements.add(new StructElement(deltaPositionMillisecondsFieldID, deltaPositionMillisecondstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void seek(PlaybackResponseCallback callback, Long position) { + seek(callback, position, 0); + } + + public void seek(PlaybackResponseCallback callback, Long position, int timedInvokeTimeoutMs) { + final long commandId = 11L; + + ArrayList elements = new ArrayList<>(); + final long positionFieldID = 0L; + BaseTLVType positiontlvValue = new UIntType(position); + elements.add(new StructElement(positionFieldID, positiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void activateAudioTrack(DefaultClusterCallback callback, String trackID, Integer audioOutputIndex) { + activateAudioTrack(callback, trackID, audioOutputIndex, 0); + } + + public void activateAudioTrack(DefaultClusterCallback callback, String trackID, Integer audioOutputIndex, int timedInvokeTimeoutMs) { + final long commandId = 12L; + + ArrayList elements = new ArrayList<>(); + final long trackIDFieldID = 0L; + BaseTLVType trackIDtlvValue = new StringType(trackID); + elements.add(new StructElement(trackIDFieldID, trackIDtlvValue)); + + final long audioOutputIndexFieldID = 1L; + BaseTLVType audioOutputIndextlvValue = new UIntType(audioOutputIndex); + elements.add(new StructElement(audioOutputIndexFieldID, audioOutputIndextlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -44104,17 +49699,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void skipChannel(DefaultClusterCallback callback, Integer count) { - skipChannel(callback, count, 0); + public void activateTextTrack(DefaultClusterCallback callback, String trackID) { + activateTextTrack(callback, trackID, 0); } - public void skipChannel(DefaultClusterCallback callback, Integer count, int timedInvokeTimeoutMs) { - final long commandId = 3L; + public void activateTextTrack(DefaultClusterCallback callback, String trackID, int timedInvokeTimeoutMs) { + final long commandId = 13L; ArrayList elements = new ArrayList<>(); - final long countFieldID = 0L; - BaseTLVType counttlvValue = new IntType(count); - elements.add(new StructElement(countFieldID, counttlvValue)); + final long trackIDFieldID = 0L; + BaseTLVType trackIDtlvValue = new StringType(trackID); + elements.add(new StructElement(trackIDFieldID, trackIDtlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -44124,20 +49719,60 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public interface ChangeChannelResponseCallback extends BaseClusterCallback { + public void deactivateTextTrack(DefaultClusterCallback callback) { + deactivateTextTrack(callback, 0); + } + + public void deactivateTextTrack(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 14L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface PlaybackResponseCallback extends BaseClusterCallback { void onSuccess(Integer status, Optional data); } - public interface ChannelListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface StartTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface DurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SampledPositionAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value); + } + + public interface SeekRangeEndAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SeekRangeStartAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ActiveAudioTrackAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterTrackStruct value); + } + + public interface AvailableAudioTracksAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); } - public interface LineupAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable ChipStructs.ChannelClusterLineupInfoStruct value); + public interface ActiveTextTrackAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterTrackStruct value); } - public interface CurrentChannelAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable ChipStructs.ChannelClusterChannelInfoStruct value); + public interface AvailableTextTracksAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -44156,367 +49791,279 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readChannelListAttribute( - ChannelListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANNEL_LIST_ATTRIBUTE_ID); + public void readCurrentStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CHANNEL_LIST_ATTRIBUTE_ID, true); + }, CURRENT_STATE_ATTRIBUTE_ID, true); } - public void subscribeChannelListAttribute( - ChannelListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANNEL_LIST_ATTRIBUTE_ID); + public void subscribeCurrentStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CHANNEL_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLineupAttribute( - LineupAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINEUP_ATTRIBUTE_ID); + public void readStartTimeAttribute( + StartTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ChannelClusterLineupInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LINEUP_ATTRIBUTE_ID, true); + }, START_TIME_ATTRIBUTE_ID, true); } - public void subscribeLineupAttribute( - LineupAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINEUP_ATTRIBUTE_ID); + public void subscribeStartTimeAttribute( + StartTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ChannelClusterLineupInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LINEUP_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentChannelAttribute( - CurrentChannelAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CHANNEL_ATTRIBUTE_ID); + public void readDurationAttribute( + DurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DURATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ChannelClusterChannelInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_CHANNEL_ATTRIBUTE_ID, true); + }, DURATION_ATTRIBUTE_ID, true); } - public void subscribeCurrentChannelAttribute( - CurrentChannelAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CHANNEL_ATTRIBUTE_ID); + public void subscribeDurationAttribute( + DurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DURATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ChannelClusterChannelInfoStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_CHANNEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, DURATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readSampledPositionAttribute( + SampledPositionAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SAMPLED_POSITION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, SAMPLED_POSITION_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeSampledPositionAttribute( + SampledPositionAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SAMPLED_POSITION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SAMPLED_POSITION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readPlaybackSpeedAttribute( + FloatAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PLAYBACK_SPEED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, PLAYBACK_SPEED_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribePlaybackSpeedAttribute( + FloatAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PLAYBACK_SPEED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, PLAYBACK_SPEED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readSeekRangeEndAttribute( + SeekRangeEndAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_END_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, SEEK_RANGE_END_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeSeekRangeEndAttribute( + SeekRangeEndAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_END_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SEEK_RANGE_END_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readSeekRangeStartAttribute( + SeekRangeStartAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_START_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, SEEK_RANGE_START_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeSeekRangeStartAttribute( + SeekRangeStartAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_START_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SEEK_RANGE_START_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readActiveAudioTrackAttribute( + ActiveAudioTrackAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_AUDIO_TRACK_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterTrackStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, ACTIVE_AUDIO_TRACK_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void subscribeActiveAudioTrackAttribute( + ActiveAudioTrackAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_AUDIO_TRACK_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterTrackStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTIVE_AUDIO_TRACK_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void readAvailableAudioTracksAttribute( + AvailableAudioTracksAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVAILABLE_AUDIO_TRACKS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, AVAILABLE_AUDIO_TRACKS_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void subscribeAvailableAudioTracksAttribute( + AvailableAudioTracksAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVAILABLE_AUDIO_TRACKS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class TargetNavigatorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1285L; - - private static final long TARGET_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_TARGET_ATTRIBUTE_ID = 1L; - 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; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public TargetNavigatorCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void navigateTarget(NavigateTargetResponseCallback callback, Integer target, Optional data) { - navigateTarget(callback, target, data, 0); - } - - public void navigateTarget(NavigateTargetResponseCallback callback, Integer target, Optional data, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long targetFieldID = 0L; - BaseTLVType targettlvValue = new UIntType(target); - elements.add(new StructElement(targetFieldID, targettlvValue)); - - final long dataFieldID = 1L; - BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); - elements.add(new StructElement(dataFieldID, datatlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface NavigateTargetResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional data); - } - - public interface TargetListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + }, AVAILABLE_AUDIO_TRACKS_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readTargetListAttribute( - TargetListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LIST_ATTRIBUTE_ID); + public void readActiveTextTrackAttribute( + ActiveTextTrackAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_TRACK_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterTrackStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TARGET_LIST_ATTRIBUTE_ID, true); + }, ACTIVE_TEXT_TRACK_ATTRIBUTE_ID, true); } - public void subscribeTargetListAttribute( - TargetListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LIST_ATTRIBUTE_ID); + public void subscribeActiveTextTrackAttribute( + ActiveTextTrackAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_TRACK_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.MediaPlaybackClusterTrackStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TARGET_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTIVE_TEXT_TRACK_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentTargetAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARGET_ATTRIBUTE_ID); + public void readAvailableTextTracksAttribute( + AvailableTextTracksAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVAILABLE_TEXT_TRACKS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_TARGET_ATTRIBUTE_ID, true); + }, AVAILABLE_TEXT_TRACKS_ATTRIBUTE_ID, true); } - public void subscribeCurrentTargetAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARGET_ATTRIBUTE_ID); + public void subscribeAvailableTextTracksAttribute( + AvailableTextTracksAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVAILABLE_TEXT_TRACKS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_TARGET_ATTRIBUTE_ID, minInterval, maxInterval); + }, AVAILABLE_TEXT_TRACKS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -44591,509 +50138,185 @@ public void subscribeEventListAttribute( public void onSuccess(byte[] tlv) { List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, FEATURE_MAP_ATTRIBUTE_ID, true); - } - - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); - } - - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class MediaPlaybackCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1286L; - - private static final long CURRENT_STATE_ATTRIBUTE_ID = 0L; - private static final long START_TIME_ATTRIBUTE_ID = 1L; - private static final long DURATION_ATTRIBUTE_ID = 2L; - private static final long SAMPLED_POSITION_ATTRIBUTE_ID = 3L; - private static final long PLAYBACK_SPEED_ATTRIBUTE_ID = 4L; - private static final long SEEK_RANGE_END_ATTRIBUTE_ID = 5L; - private static final long SEEK_RANGE_START_ATTRIBUTE_ID = 6L; - 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; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public MediaPlaybackCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void play(PlaybackResponseCallback callback) { - play(callback, 0); - } - - public void play(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void pause(PlaybackResponseCallback callback) { - pause(callback, 0); - } - - public void pause(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void stop(PlaybackResponseCallback callback) { - stop(callback, 0); - } - - public void stop(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void startOver(PlaybackResponseCallback callback) { - startOver(callback, 0); - } - - public void startOver(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void previous(PlaybackResponseCallback callback) { - previous(callback, 0); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void previous(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 4L; + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void next(PlaybackResponseCallback callback) { - next(callback, 0); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void next(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 5L; + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void rewind(PlaybackResponseCallback callback) { - rewind(callback, 0); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void rewind(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 6L; + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void fastForward(PlaybackResponseCallback callback) { - fastForward(callback, 0); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void fastForward(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 7L; + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(status, data); - }}, commandId, value, timedInvokeTimeoutMs); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void skipForward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipForward(callback, deltaPositionMilliseconds, 0); + public static class MediaInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1287L; + + private static final long INPUT_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_INPUT_ATTRIBUTE_ID = 1L; + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public MediaInputCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); } - public void skipForward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds, int timedInvokeTimeoutMs) { - final long commandId = 8L; + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void selectInput(DefaultClusterCallback callback, Integer index) { + selectInput(callback, index, 0); + } + + public void selectInput(DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long deltaPositionMillisecondsFieldID = 0L; - BaseTLVType deltaPositionMillisecondstlvValue = new UIntType(deltaPositionMilliseconds); - elements.add(new StructElement(deltaPositionMillisecondsFieldID, deltaPositionMillisecondstlvValue)); + final long indexFieldID = 0L; + BaseTLVType indextlvValue = new UIntType(index); + elements.add(new StructElement(indexFieldID, indextlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void skipBackward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds) { - skipBackward(callback, deltaPositionMilliseconds, 0); + public void showInputStatus(DefaultClusterCallback callback) { + showInputStatus(callback, 0); } - public void skipBackward(PlaybackResponseCallback callback, Long deltaPositionMilliseconds, int timedInvokeTimeoutMs) { - final long commandId = 9L; + public void showInputStatus(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long deltaPositionMillisecondsFieldID = 0L; - BaseTLVType deltaPositionMillisecondstlvValue = new UIntType(deltaPositionMilliseconds); - elements.add(new StructElement(deltaPositionMillisecondsFieldID, deltaPositionMillisecondstlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void seek(PlaybackResponseCallback callback, Long position) { - seek(callback, position, 0); + public void hideInputStatus(DefaultClusterCallback callback) { + hideInputStatus(callback, 0); } - public void seek(PlaybackResponseCallback callback, Long position, int timedInvokeTimeoutMs) { - final long commandId = 11L; + public void hideInputStatus(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long positionFieldID = 0L; - BaseTLVType positiontlvValue = new UIntType(position); - elements.add(new StructElement(positionFieldID, positiontlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, data); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface PlaybackResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional data); + public void renameInput(DefaultClusterCallback callback, Integer index, String name) { + renameInput(callback, index, name, 0); } - public interface StartTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } + public void renameInput(DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + final long commandId = 3L; - public interface DurationAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } + ArrayList elements = new ArrayList<>(); + final long indexFieldID = 0L; + BaseTLVType indextlvValue = new UIntType(index); + elements.add(new StructElement(indexFieldID, indextlvValue)); - public interface SampledPositionAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value); - } + final long nameFieldID = 1L; + BaseTLVType nametlvValue = new StringType(name); + elements.add(new StructElement(nameFieldID, nametlvValue)); - public interface SeekRangeEndAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public interface SeekRangeStartAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); + public interface InputListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -45112,9 +50335,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readCurrentStateAttribute( + public void readInputListAttribute( + InputListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INPUT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, INPUT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeInputListAttribute( + InputListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INPUT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, INPUT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentInputAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_INPUT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -45122,169 +50370,222 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_STATE_ATTRIBUTE_ID, true); + }, CURRENT_INPUT_ATTRIBUTE_ID, true); } - public void subscribeCurrentStateAttribute( + public void subscribeCurrentInputAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_INPUT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_INPUT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartTimeAttribute( - StartTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_TIME_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, START_TIME_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeStartTimeAttribute( - StartTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_TIME_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, START_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDurationAttribute( - DurationAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DURATION_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DURATION_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeDurationAttribute( - DurationAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DURATION_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSampledPositionAttribute( - SampledPositionAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SAMPLED_POSITION_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SAMPLED_POSITION_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeSampledPositionAttribute( - SampledPositionAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SAMPLED_POSITION_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SAMPLED_POSITION_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPlaybackSpeedAttribute( - FloatAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PLAYBACK_SPEED_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PLAYBACK_SPEED_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribePlaybackSpeedAttribute( - FloatAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PLAYBACK_SPEED_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Float value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PLAYBACK_SPEED_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSeekRangeEndAttribute( - SeekRangeEndAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_END_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SEEK_RANGE_END_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeSeekRangeEndAttribute( - SeekRangeEndAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_END_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SEEK_RANGE_END_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSeekRangeStartAttribute( - SeekRangeStartAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_START_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SEEK_RANGE_START_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeSeekRangeStartAttribute( - SeekRangeStartAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SEEK_RANGE_START_ATTRIBUTE_ID); + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SEEK_RANGE_START_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class LowPowerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1288L; + + 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; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public LowPowerCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void sleep(DefaultClusterCallback callback) { + sleep(callback, 0); + } + + public void sleep(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public void readGeneratedCommandListAttribute( @@ -45438,11 +50739,9 @@ public void onSuccess(byte[] tlv) { } } - public static class MediaInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1287L; + public static class KeypadInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1289L; - private static final long INPUT_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_INPUT_ATTRIBUTE_ID = 1L; 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; @@ -45450,7 +50749,7 @@ public static class MediaInputCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public MediaInputCluster(long devicePtr, int endpointId) { + public KeypadInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -45460,84 +50759,38 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void selectInput(DefaultClusterCallback callback, Integer index) { - selectInput(callback, index, 0); + public void sendKey(SendKeyResponseCallback callback, Integer keyCode) { + sendKey(callback, keyCode, 0); } - public void selectInput(DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { + public void sendKey(SendKeyResponseCallback callback, Integer keyCode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long indexFieldID = 0L; - BaseTLVType indextlvValue = new UIntType(index); - elements.add(new StructElement(indexFieldID, indextlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void showInputStatus(DefaultClusterCallback callback) { - showInputStatus(callback, 0); - } - - public void showInputStatus(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void hideInputStatus(DefaultClusterCallback callback) { - hideInputStatus(callback, 0); - } - - public void hideInputStatus(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void renameInput(DefaultClusterCallback callback, Integer index, String name) { - renameInput(callback, index, name, 0); - } - - public void renameInput(DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - final long indexFieldID = 0L; - BaseTLVType indextlvValue = new UIntType(index); - elements.add(new StructElement(indexFieldID, indextlvValue)); - - final long nameFieldID = 1L; - BaseTLVType nametlvValue = new StringType(name); - elements.add(new StructElement(nameFieldID, nametlvValue)); + final long keyCodeFieldID = 0L; + BaseTLVType keyCodetlvValue = new UIntType(keyCode); + elements.add(new StructElement(keyCodeFieldID, keyCodetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(status); }}, commandId, value, timedInvokeTimeoutMs); } - public interface InputListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SendKeyResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -45556,56 +50809,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readInputListAttribute( - InputListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INPUT_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INPUT_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeInputListAttribute( - InputListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INPUT_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, INPUT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentInputAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_INPUT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_INPUT_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentInputAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_INPUT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_INPUT_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -45757,9 +50960,11 @@ public void onSuccess(byte[] tlv) { } } - public static class LowPowerCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1288L; + public static class ContentLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1290L; + private static final long ACCEPT_HEADER_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID = 1L; 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; @@ -45767,7 +50972,7 @@ public static class LowPowerCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LowPowerCluster(long devicePtr, int endpointId) { + public ContentLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -45777,22 +50982,112 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void sleep(DefaultClusterCallback callback) { - sleep(callback, 0); + public void launchContent(LauncherResponseCallback callback, ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data, Optional playbackPreferences, Optional useCurrentContext) { + launchContent(callback, search, autoPlay, data, playbackPreferences, useCurrentContext, 0); } - public void sleep(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void launchContent(LauncherResponseCallback callback, ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data, Optional playbackPreferences, Optional useCurrentContext, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); + final long searchFieldID = 0L; + BaseTLVType searchtlvValue = search.encodeTlv(); + elements.add(new StructElement(searchFieldID, searchtlvValue)); + + final long autoPlayFieldID = 1L; + BaseTLVType autoPlaytlvValue = new BooleanType(autoPlay); + elements.add(new StructElement(autoPlayFieldID, autoPlaytlvValue)); + + final long dataFieldID = 2L; + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + final long playbackPreferencesFieldID = 3L; + BaseTLVType playbackPreferencestlvValue = playbackPreferences.map((nonOptionalplaybackPreferences) -> nonOptionalplaybackPreferences.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(playbackPreferencesFieldID, playbackPreferencestlvValue)); + + final long useCurrentContextFieldID = 4L; + BaseTLVType useCurrentContexttlvValue = useCurrentContext.map((nonOptionaluseCurrentContext) -> new BooleanType(nonOptionaluseCurrentContext)).orElse(new EmptyType()); + elements.add(new StructElement(useCurrentContextFieldID, useCurrentContexttlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); }}, commandId, value, timedInvokeTimeoutMs); } + public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation) { + launchURL(callback, contentURL, displayString, brandingInformation, 0); + } + + public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long contentURLFieldID = 0L; + BaseTLVType contentURLtlvValue = new StringType(contentURL); + elements.add(new StructElement(contentURLFieldID, contentURLtlvValue)); + + final long displayStringFieldID = 1L; + BaseTLVType displayStringtlvValue = displayString.map((nonOptionaldisplayString) -> new StringType(nonOptionaldisplayString)).orElse(new EmptyType()); + elements.add(new StructElement(displayStringFieldID, displayStringtlvValue)); + + final long brandingInformationFieldID = 2L; + BaseTLVType brandingInformationtlvValue = brandingInformation.map((nonOptionalbrandingInformation) -> nonOptionalbrandingInformation.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(brandingInformationFieldID, brandingInformationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + data = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface LauncherResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional data); + } + + public interface AcceptHeaderAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -45809,6 +51104,56 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } + public void readAcceptHeaderAttribute( + AcceptHeaderAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPT_HEADER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPT_HEADER_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptHeaderAttribute( + AcceptHeaderAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPT_HEADER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPT_HEADER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedStreamingProtocolsAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedStreamingProtocolsAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -45960,9 +51305,11 @@ public void onSuccess(byte[] tlv) { } } - public static class KeypadInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1289L; + public static class AudioOutputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1291L; + private static final long OUTPUT_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_OUTPUT_ATTRIBUTE_ID = 1L; 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; @@ -45970,7 +51317,7 @@ public static class KeypadInputCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public KeypadInputCluster(long devicePtr, int endpointId) { + public AudioOutputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -45980,38 +51327,52 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void sendKey(SendKeyResponseCallback callback, Integer keyCode) { - sendKey(callback, keyCode, 0); + public void selectOutput(DefaultClusterCallback callback, Integer index) { + selectOutput(callback, index, 0); } - public void sendKey(SendKeyResponseCallback callback, Integer keyCode, int timedInvokeTimeoutMs) { + public void selectOutput(DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long keyCodeFieldID = 0L; - BaseTLVType keyCodetlvValue = new UIntType(keyCode); - elements.add(new StructElement(keyCodeFieldID, keyCodetlvValue)); + final long indexFieldID = 0L; + BaseTLVType indextlvValue = new UIntType(index); + elements.add(new StructElement(indexFieldID, indextlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(status); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface SendKeyResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status); + public void renameOutput(DefaultClusterCallback callback, Integer index, String name) { + renameOutput(callback, index, name, 0); + } + + public void renameOutput(DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long indexFieldID = 0L; + BaseTLVType indextlvValue = new UIntType(index); + elements.add(new StructElement(indexFieldID, indextlvValue)); + + final long nameFieldID = 1L; + BaseTLVType nametlvValue = new StringType(name); + elements.add(new StructElement(nameFieldID, nametlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface OutputListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -46030,6 +51391,56 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } + public void readOutputListAttribute( + OutputListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUTPUT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OUTPUT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeOutputListAttribute( + OutputListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUTPUT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OUTPUT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentOutputAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OUTPUT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_OUTPUT_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentOutputAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OUTPUT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_OUTPUT_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -46181,11 +51592,11 @@ public void onSuccess(byte[] tlv) { } } - public static class ContentLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1290L; + public static class ApplicationLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1292L; - private static final long ACCEPT_HEADER_ATTRIBUTE_ID = 0L; - private static final long SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID = 1L; + private static final long CATALOG_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_APP_ATTRIBUTE_ID = 1L; 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; @@ -46193,7 +51604,7 @@ public static class ContentLauncherCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ContentLauncherCluster(long devicePtr, int endpointId) { + public ApplicationLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -46203,25 +51614,58 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void launchContent(LauncherResponseCallback callback, ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data) { - launchContent(callback, search, autoPlay, data, 0); + public void launchApp(LauncherResponseCallback callback, Optional application, Optional data) { + launchApp(callback, application, data, 0); } - public void launchContent(LauncherResponseCallback callback, ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data, int timedInvokeTimeoutMs) { + public void launchApp(LauncherResponseCallback callback, Optional application, Optional data, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long searchFieldID = 0L; - BaseTLVType searchtlvValue = search.encodeTlv(); - elements.add(new StructElement(searchFieldID, searchtlvValue)); + final long applicationFieldID = 0L; + BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(applicationFieldID, applicationtlvValue)); + + final long dataFieldID = 1L; + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long dataFieldID = 1L; + Optional data = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = Optional.of(castingValue.value(byte[].class)); + } + } + } + callback.onSuccess(status, data); + }}, commandId, value, timedInvokeTimeoutMs); + } - final long autoPlayFieldID = 1L; - BaseTLVType autoPlaytlvValue = new BooleanType(autoPlay); - elements.add(new StructElement(autoPlayFieldID, autoPlaytlvValue)); + public void stopApp(LauncherResponseCallback callback, Optional application) { + stopApp(callback, application, 0); + } - final long dataFieldID = 2L; - BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); - elements.add(new StructElement(dataFieldID, datatlvValue)); + public void stopApp(LauncherResponseCallback callback, Optional application, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long applicationFieldID = 0L; + BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(applicationFieldID, applicationtlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -46230,7 +51674,7 @@ public void onResponse(StructType invokeStructValue) { final long statusFieldID = 0L; Integer status = null; final long dataFieldID = 1L; - Optional data = Optional.empty(); + Optional data = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == statusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -46238,9 +51682,9 @@ public void onResponse(StructType invokeStructValue) { status = castingValue.value(Integer.class); } } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = Optional.of(castingValue.value(byte[].class)); } } } @@ -46248,25 +51692,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation) { - launchURL(callback, contentURL, displayString, brandingInformation, 0); + public void hideApp(LauncherResponseCallback callback, Optional application) { + hideApp(callback, application, 0); } - public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public void hideApp(LauncherResponseCallback callback, Optional application, int timedInvokeTimeoutMs) { + final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long contentURLFieldID = 0L; - BaseTLVType contentURLtlvValue = new StringType(contentURL); - elements.add(new StructElement(contentURLFieldID, contentURLtlvValue)); - - final long displayStringFieldID = 1L; - BaseTLVType displayStringtlvValue = displayString.map((nonOptionaldisplayString) -> new StringType(nonOptionaldisplayString)).orElse(new EmptyType()); - elements.add(new StructElement(displayStringFieldID, displayStringtlvValue)); - - final long brandingInformationFieldID = 2L; - BaseTLVType brandingInformationtlvValue = brandingInformation.map((nonOptionalbrandingInformation) -> nonOptionalbrandingInformation.encodeTlv()).orElse(new EmptyType()); - elements.add(new StructElement(brandingInformationFieldID, brandingInformationtlvValue)); + final long applicationFieldID = 0L; + BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(applicationFieldID, applicationtlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -46275,7 +51711,7 @@ public void onResponse(StructType invokeStructValue) { final long statusFieldID = 0L; Integer status = null; final long dataFieldID = 1L; - Optional data = Optional.empty(); + Optional data = Optional.empty(); for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == statusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -46283,9 +51719,9 @@ public void onResponse(StructType invokeStructValue) { status = castingValue.value(Integer.class); } } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - data = Optional.of(castingValue.value(String.class)); + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = Optional.of(castingValue.value(byte[].class)); } } } @@ -46294,11 +51730,15 @@ public void onResponse(StructType invokeStructValue) { } public interface LauncherResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional data); + void onSuccess(Integer status, Optional data); } - public interface AcceptHeaderAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface CatalogListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface CurrentAppAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -46317,54 +51757,54 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readAcceptHeaderAttribute( - AcceptHeaderAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPT_HEADER_ATTRIBUTE_ID); + public void readCatalogListAttribute( + CatalogListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CATALOG_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPT_HEADER_ATTRIBUTE_ID, true); + }, CATALOG_LIST_ATTRIBUTE_ID, true); } - public void subscribeAcceptHeaderAttribute( - AcceptHeaderAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPT_HEADER_ATTRIBUTE_ID); + public void subscribeCatalogListAttribute( + CatalogListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CATALOG_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPT_HEADER_ATTRIBUTE_ID, minInterval, maxInterval); + }, CATALOG_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedStreamingProtocolsAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID); + public void readCurrentAppAttribute( + CurrentAppAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_APP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, true); + }, CURRENT_APP_ATTRIBUTE_ID, true); } - public void subscribeSupportedStreamingProtocolsAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID); + public void subscribeCurrentAppAttribute( + CurrentAppAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_APP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_STREAMING_PROTOCOLS_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_APP_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -46518,11 +51958,17 @@ public void onSuccess(byte[] tlv) { } } - public static class AudioOutputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1291L; + public static class ApplicationBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1293L; - private static final long OUTPUT_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_OUTPUT_ATTRIBUTE_ID = 1L; + private static final long VENDOR_NAME_ATTRIBUTE_ID = 0L; + private static final long VENDOR_I_D_ATTRIBUTE_ID = 1L; + private static final long APPLICATION_NAME_ATTRIBUTE_ID = 2L; + private static final long PRODUCT_I_D_ATTRIBUTE_ID = 3L; + private static final long APPLICATION_ATTRIBUTE_ID = 4L; + private static final long STATUS_ATTRIBUTE_ID = 5L; + private static final long APPLICATION_VERSION_ATTRIBUTE_ID = 6L; + private static final long ALLOWED_VENDOR_LIST_ATTRIBUTE_ID = 7L; 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; @@ -46530,7 +51976,7 @@ public static class AudioOutputCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public AudioOutputCluster(long devicePtr, int endpointId) { + public ApplicationBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -46540,98 +51986,158 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void selectOutput(DefaultClusterCallback callback, Integer index) { - selectOutput(callback, index, 0); + public interface ApplicationAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.ApplicationBasicClusterApplicationStruct value); } - public void selectOutput(DefaultClusterCallback callback, Integer index, int timedInvokeTimeoutMs) { - final long commandId = 0L; + public interface AllowedVendorListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - ArrayList elements = new ArrayList<>(); - final long indexFieldID = 0L; - BaseTLVType indextlvValue = new UIntType(index); - elements.add(new StructElement(indexFieldID, indextlvValue)); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void renameOutput(DefaultClusterCallback callback, Integer index, String name) { - renameOutput(callback, index, name, 0); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void renameOutput(DefaultClusterCallback callback, Integer index, String name, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - ArrayList elements = new ArrayList<>(); - final long indexFieldID = 0L; - BaseTLVType indextlvValue = new UIntType(index); - elements.add(new StructElement(indexFieldID, indextlvValue)); + public void readVendorNameAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); - final long nameFieldID = 1L; - BaseTLVType nametlvValue = new StringType(name); - elements.add(new StructElement(nameFieldID, nametlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VENDOR_NAME_ATTRIBUTE_ID, true); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + public void subscribeVendorNameAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VENDOR_NAME_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface OutputListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void readVendorIDAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VENDOR_I_D_ATTRIBUTE_ID, true); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void subscribeVendorIDAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VENDOR_I_D_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void readApplicationNameAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_NAME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, APPLICATION_NAME_ATTRIBUTE_ID, true); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void subscribeApplicationNameAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_NAME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, APPLICATION_NAME_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void readProductIDAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRODUCT_I_D_ATTRIBUTE_ID, true); } - public void readOutputListAttribute( - OutputListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUTPUT_LIST_ATTRIBUTE_ID); + public void subscribeProductIDAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRODUCT_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readApplicationAttribute( + ApplicationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.ApplicationBasicClusterApplicationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OUTPUT_LIST_ATTRIBUTE_ID, true); + }, APPLICATION_ATTRIBUTE_ID, true); } - public void subscribeOutputListAttribute( - OutputListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUTPUT_LIST_ATTRIBUTE_ID); + public void subscribeApplicationAttribute( + ApplicationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.ApplicationBasicClusterApplicationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OUTPUT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, APPLICATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentOutputAttribute( + public void readStatusAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OUTPUT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -46639,19 +52145,69 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_OUTPUT_ATTRIBUTE_ID, true); + }, STATUS_ATTRIBUTE_ID, true); } - public void subscribeCurrentOutputAttribute( + public void subscribeStatusAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OUTPUT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_OUTPUT_ATTRIBUTE_ID, minInterval, maxInterval); + }, STATUS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readApplicationVersionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_VERSION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, APPLICATION_VERSION_ATTRIBUTE_ID, true); + } + + public void subscribeApplicationVersionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_VERSION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, APPLICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAllowedVendorListAttribute( + AllowedVendorListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAllowedVendorListAttribute( + AllowedVendorListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -46805,11 +52361,9 @@ public void onSuccess(byte[] tlv) { } } - public static class ApplicationLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1292L; + public static class AccountLoginCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1294L; - private static final long CATALOG_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_APP_ATTRIBUTE_ID = 1L; 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; @@ -46817,7 +52371,7 @@ public static class ApplicationLauncherCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ApplicationLauncherCluster(long devicePtr, int endpointId) { + public AccountLoginCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -46827,131 +52381,77 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void launchApp(LauncherResponseCallback callback, Optional application, Optional data) { - launchApp(callback, application, data, 0); - } - public void launchApp(LauncherResponseCallback callback, Optional application, Optional data, int timedInvokeTimeoutMs) { + public void getSetupPIN(GetSetupPINResponseCallback callback, String tempAccountIdentifier, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long applicationFieldID = 0L; - BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); - elements.add(new StructElement(applicationFieldID, applicationtlvValue)); - - final long dataFieldID = 1L; - BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()); - elements.add(new StructElement(dataFieldID, datatlvValue)); + final long tempAccountIdentifierFieldID = 0L; + BaseTLVType tempAccountIdentifiertlvValue = new StringType(tempAccountIdentifier); + elements.add(new StructElement(tempAccountIdentifierFieldID, tempAccountIdentifiertlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); + final long setupPINFieldID = 0L; + String setupPIN = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - data = Optional.of(castingValue.value(byte[].class)); + if (element.contextTagNum() == setupPINFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + setupPIN = castingValue.value(String.class); } } } - callback.onSuccess(status, data); + callback.onSuccess(setupPIN); }}, commandId, value, timedInvokeTimeoutMs); } - public void stopApp(LauncherResponseCallback callback, Optional application) { - stopApp(callback, application, 0); - } - public void stopApp(LauncherResponseCallback callback, Optional application, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public void login(DefaultClusterCallback callback, String tempAccountIdentifier, String setupPIN, Optional node, int timedInvokeTimeoutMs) { + final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long applicationFieldID = 0L; - BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); - elements.add(new StructElement(applicationFieldID, applicationtlvValue)); + final long tempAccountIdentifierFieldID = 0L; + BaseTLVType tempAccountIdentifiertlvValue = new StringType(tempAccountIdentifier); + elements.add(new StructElement(tempAccountIdentifierFieldID, tempAccountIdentifiertlvValue)); + + final long setupPINFieldID = 1L; + BaseTLVType setupPINtlvValue = new StringType(setupPIN); + elements.add(new StructElement(setupPINFieldID, setupPINtlvValue)); + + final long nodeFieldID = 2L; + BaseTLVType nodetlvValue = node.map((nonOptionalnode) -> new UIntType(nonOptionalnode)).orElse(new EmptyType()); + elements.add(new StructElement(nodeFieldID, nodetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - data = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(status, data); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void hideApp(LauncherResponseCallback callback, Optional application) { - hideApp(callback, application, 0); - } - public void hideApp(LauncherResponseCallback callback, Optional application, int timedInvokeTimeoutMs) { - final long commandId = 2L; + public void logout(DefaultClusterCallback callback, Optional node, int timedInvokeTimeoutMs) { + final long commandId = 3L; ArrayList elements = new ArrayList<>(); - final long applicationFieldID = 0L; - BaseTLVType applicationtlvValue = application.map((nonOptionalapplication) -> nonOptionalapplication.encodeTlv()).orElse(new EmptyType()); - elements.add(new StructElement(applicationFieldID, applicationtlvValue)); + final long nodeFieldID = 0L; + BaseTLVType nodetlvValue = node.map((nonOptionalnode) -> new UIntType(nonOptionalnode)).orElse(new EmptyType()); + elements.add(new StructElement(nodeFieldID, nodetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long dataFieldID = 1L; - Optional data = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == dataFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - data = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(status, data); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface LauncherResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional data); - } - - public interface CatalogListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface CurrentAppAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value); + public interface GetSetupPINResponseCallback extends BaseClusterCallback { + void onSuccess(String setupPIN); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -46970,56 +52470,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readCatalogListAttribute( - CatalogListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CATALOG_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CATALOG_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeCatalogListAttribute( - CatalogListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CATALOG_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CATALOG_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentAppAttribute( - CurrentAppAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_APP_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_APP_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentAppAttribute( - CurrentAppAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_APP_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_APP_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -47171,17 +52621,17 @@ public void onSuccess(byte[] tlv) { } } - public static class ApplicationBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1293L; - - private static final long VENDOR_NAME_ATTRIBUTE_ID = 0L; - private static final long VENDOR_I_D_ATTRIBUTE_ID = 1L; - private static final long APPLICATION_NAME_ATTRIBUTE_ID = 2L; - private static final long PRODUCT_I_D_ATTRIBUTE_ID = 3L; - private static final long APPLICATION_ATTRIBUTE_ID = 4L; - private static final long STATUS_ATTRIBUTE_ID = 5L; - private static final long APPLICATION_VERSION_ATTRIBUTE_ID = 6L; - private static final long ALLOWED_VENDOR_LIST_ATTRIBUTE_ID = 7L; + public static class ContentControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1295L; + + private static final long ENABLED_ATTRIBUTE_ID = 0L; + private static final long ON_DEMAND_RATINGS_ATTRIBUTE_ID = 1L; + private static final long ON_DEMAND_RATING_THRESHOLD_ATTRIBUTE_ID = 2L; + private static final long SCHEDULED_CONTENT_RATINGS_ATTRIBUTE_ID = 3L; + private static final long SCHEDULED_CONTENT_RATING_THRESHOLD_ATTRIBUTE_ID = 4L; + private static final long SCREEN_DAILY_TIME_ATTRIBUTE_ID = 5L; + private static final long REMAINING_SCREEN_TIME_ATTRIBUTE_ID = 6L; + private static final long BLOCK_UNRATED_ATTRIBUTE_ID = 7L; 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; @@ -47189,7 +52639,7 @@ public static class ApplicationBasicCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ApplicationBasicCluster(long devicePtr, int endpointId) { + public ContentControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -47199,12 +52649,214 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface ApplicationAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.ApplicationBasicClusterApplicationStruct value); + public void updatePIN(DefaultClusterCallback callback, Optional oldPIN, String newPIN) { + updatePIN(callback, oldPIN, newPIN, 0); } - public interface AllowedVendorListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void updatePIN(DefaultClusterCallback callback, Optional oldPIN, String newPIN, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long oldPINFieldID = 0L; + BaseTLVType oldPINtlvValue = oldPIN.map((nonOptionaloldPIN) -> new StringType(nonOptionaloldPIN)).orElse(new EmptyType()); + elements.add(new StructElement(oldPINFieldID, oldPINtlvValue)); + + final long newPINFieldID = 1L; + BaseTLVType newPINtlvValue = new StringType(newPIN); + elements.add(new StructElement(newPINFieldID, newPINtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void resetPIN(ResetPINResponseCallback callback) { + resetPIN(callback, 0); + } + + public void resetPIN(ResetPINResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long PINCodeFieldID = 0L; + String PINCode = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == PINCodeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + PINCode = castingValue.value(String.class); + } + } + } + callback.onSuccess(PINCode); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void enable(DefaultClusterCallback callback) { + enable(callback, 0); + } + + public void enable(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void disable(DefaultClusterCallback callback) { + disable(callback, 0); + } + + public void disable(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Optional bonusTime) { + addBonusTime(callback, PINCode, bonusTime, 0); + } + + public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Optional bonusTime, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long PINCodeFieldID = 0L; + BaseTLVType PINCodetlvValue = PINCode.map((nonOptionalPINCode) -> new StringType(nonOptionalPINCode)).orElse(new EmptyType()); + elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); + + final long bonusTimeFieldID = 1L; + BaseTLVType bonusTimetlvValue = bonusTime.map((nonOptionalbonusTime) -> new UIntType(nonOptionalbonusTime)).orElse(new EmptyType()); + elements.add(new StructElement(bonusTimeFieldID, bonusTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setScreenDailyTime(DefaultClusterCallback callback, Long screenTime) { + setScreenDailyTime(callback, screenTime, 0); + } + + public void setScreenDailyTime(DefaultClusterCallback callback, Long screenTime, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long screenTimeFieldID = 0L; + BaseTLVType screenTimetlvValue = new UIntType(screenTime); + elements.add(new StructElement(screenTimeFieldID, screenTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void blockUnratedContent(DefaultClusterCallback callback) { + blockUnratedContent(callback, 0); + } + + public void blockUnratedContent(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void unblockUnratedContent(DefaultClusterCallback callback) { + unblockUnratedContent(callback, 0); + } + + public void unblockUnratedContent(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 8L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setOnDemandRatingThreshold(DefaultClusterCallback callback, String rating) { + setOnDemandRatingThreshold(callback, rating, 0); + } + + public void setOnDemandRatingThreshold(DefaultClusterCallback callback, String rating, int timedInvokeTimeoutMs) { + final long commandId = 9L; + + ArrayList elements = new ArrayList<>(); + final long ratingFieldID = 0L; + BaseTLVType ratingtlvValue = new StringType(rating); + elements.add(new StructElement(ratingFieldID, ratingtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setScheduledContentRatingThreshold(DefaultClusterCallback callback, String rating) { + setScheduledContentRatingThreshold(callback, rating, 0); + } + + public void setScheduledContentRatingThreshold(DefaultClusterCallback callback, String rating, int timedInvokeTimeoutMs) { + final long commandId = 10L; + + ArrayList elements = new ArrayList<>(); + final long ratingFieldID = 0L; + BaseTLVType ratingtlvValue = new StringType(rating); + elements.add(new StructElement(ratingFieldID, ratingtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ResetPINResponseCallback extends BaseClusterCallback { + void onSuccess(String PINCode); + } + + public interface OnDemandRatingsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ScheduledContentRatingsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -47223,59 +52875,59 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readVendorNameAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); + public void readEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, VENDOR_NAME_ATTRIBUTE_ID, true); + }, ENABLED_ATTRIBUTE_ID, true); } - public void subscribeVendorNameAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); + public void subscribeEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENABLED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, VENDOR_NAME_ATTRIBUTE_ID, minInterval, maxInterval); + }, ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readVendorIDAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + public void readOnDemandRatingsAttribute( + OnDemandRatingsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_DEMAND_RATINGS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, VENDOR_I_D_ATTRIBUTE_ID, true); + }, ON_DEMAND_RATINGS_ATTRIBUTE_ID, true); } - public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + public void subscribeOnDemandRatingsAttribute( + OnDemandRatingsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_DEMAND_RATINGS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, VENDOR_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_DEMAND_RATINGS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readApplicationNameAttribute( + public void readOnDemandRatingThresholdAttribute( CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_NAME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_DEMAND_RATING_THRESHOLD_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -47283,144 +52935,144 @@ public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, APPLICATION_NAME_ATTRIBUTE_ID, true); + }, ON_DEMAND_RATING_THRESHOLD_ATTRIBUTE_ID, true); } - public void subscribeApplicationNameAttribute( + public void subscribeOnDemandRatingThresholdAttribute( CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_NAME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_DEMAND_RATING_THRESHOLD_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, APPLICATION_NAME_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_DEMAND_RATING_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readProductIDAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + public void readScheduledContentRatingsAttribute( + ScheduledContentRatingsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULED_CONTENT_RATINGS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PRODUCT_I_D_ATTRIBUTE_ID, true); + }, SCHEDULED_CONTENT_RATINGS_ATTRIBUTE_ID, true); } - public void subscribeProductIDAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + public void subscribeScheduledContentRatingsAttribute( + ScheduledContentRatingsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULED_CONTENT_RATINGS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PRODUCT_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCHEDULED_CONTENT_RATINGS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readApplicationAttribute( - ApplicationAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_ATTRIBUTE_ID); + public void readScheduledContentRatingThresholdAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULED_CONTENT_RATING_THRESHOLD_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.ApplicationBasicClusterApplicationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, APPLICATION_ATTRIBUTE_ID, true); + }, SCHEDULED_CONTENT_RATING_THRESHOLD_ATTRIBUTE_ID, true); } - public void subscribeApplicationAttribute( - ApplicationAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_ATTRIBUTE_ID); + public void subscribeScheduledContentRatingThresholdAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULED_CONTENT_RATING_THRESHOLD_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.ApplicationBasicClusterApplicationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, APPLICATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCHEDULED_CONTENT_RATING_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStatusAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); + public void readScreenDailyTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCREEN_DAILY_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATUS_ATTRIBUTE_ID, true); + }, SCREEN_DAILY_TIME_ATTRIBUTE_ID, true); } - public void subscribeStatusAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); + public void subscribeScreenDailyTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCREEN_DAILY_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATUS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCREEN_DAILY_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readApplicationVersionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_VERSION_ATTRIBUTE_ID); + public void readRemainingScreenTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_SCREEN_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, APPLICATION_VERSION_ATTRIBUTE_ID, true); + }, REMAINING_SCREEN_TIME_ATTRIBUTE_ID, true); } - public void subscribeApplicationVersionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_VERSION_ATTRIBUTE_ID); + public void subscribeRemainingScreenTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_SCREEN_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, APPLICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + }, REMAINING_SCREEN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAllowedVendorListAttribute( - AllowedVendorListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID); + public void readBlockUnratedAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_UNRATED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID, true); + }, BLOCK_UNRATED_ATTRIBUTE_ID, true); } - public void subscribeAllowedVendorListAttribute( - AllowedVendorListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID); + public void subscribeBlockUnratedAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_UNRATED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ALLOWED_VENDOR_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, BLOCK_UNRATED_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -47574,8 +53226,8 @@ public void onSuccess(byte[] tlv) { } } - public static class AccountLoginCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1294L; + public static class ContentAppObserverCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1296L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; @@ -47584,7 +53236,7 @@ public static class AccountLoginCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public AccountLoginCluster(long devicePtr, int endpointId) { + public ContentAppObserverCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -47594,69 +53246,56 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void contentAppMessage(ContentAppMessageResponseCallback callback, Optional data, String encodingHint) { + contentAppMessage(callback, data, encodingHint, 0); + } - public void getSetupPIN(GetSetupPINResponseCallback callback, String tempAccountIdentifier, int timedInvokeTimeoutMs) { + public void contentAppMessage(ContentAppMessageResponseCallback callback, Optional data, String encodingHint, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long tempAccountIdentifierFieldID = 0L; - BaseTLVType tempAccountIdentifiertlvValue = new StringType(tempAccountIdentifier); - elements.add(new StructElement(tempAccountIdentifierFieldID, tempAccountIdentifiertlvValue)); + final long dataFieldID = 0L; + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); + elements.add(new StructElement(dataFieldID, datatlvValue)); + + final long encodingHintFieldID = 1L; + BaseTLVType encodingHinttlvValue = new StringType(encodingHint); + elements.add(new StructElement(encodingHintFieldID, encodingHinttlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long setupPINFieldID = 0L; - String setupPIN = null; + final long statusFieldID = 0L; + Optional status = Optional.empty(); + final long dataFieldID = 1L; + String data = null; + final long encodingHintFieldID = 2L; + String encodingHint = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == setupPINFieldID) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == dataFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - setupPIN = castingValue.value(String.class); + data = castingValue.value(String.class); + } + } else if (element.contextTagNum() == encodingHintFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + encodingHint = castingValue.value(String.class); } } } - callback.onSuccess(setupPIN); + callback.onSuccess(status, data, encodingHint); }}, commandId, value, timedInvokeTimeoutMs); } - - public void login(DefaultClusterCallback callback, String tempAccountIdentifier, String setupPIN, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long tempAccountIdentifierFieldID = 0L; - BaseTLVType tempAccountIdentifiertlvValue = new StringType(tempAccountIdentifier); - elements.add(new StructElement(tempAccountIdentifierFieldID, tempAccountIdentifiertlvValue)); - - final long setupPINFieldID = 1L; - BaseTLVType setupPINtlvValue = new StringType(setupPIN); - elements.add(new StructElement(setupPINFieldID, setupPINtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - - public void logout(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface GetSetupPINResponseCallback extends BaseClusterCallback { - void onSuccess(String setupPIN); + public interface ContentAppMessageResponseCallback extends BaseClusterCallback { + void onSuccess(Optional status, String data, String encodingHint); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index bfac861eaaa8a4..b140401dcc6689 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -2129,12 +2129,12 @@ public String toString() { return output.toString(); } } -public static class OvenOperationalStateClusterOperationalErrorEvent { - public ChipStructs.OvenOperationalStateClusterErrorStateStruct errorState; +public static class OvenCavityOperationalStateClusterOperationalErrorEvent { + public ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct errorState; private static final long ERROR_STATE_ID = 0L; - public OvenOperationalStateClusterOperationalErrorEvent( - ChipStructs.OvenOperationalStateClusterErrorStateStruct errorState + public OvenCavityOperationalStateClusterOperationalErrorEvent( + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct errorState ) { this.errorState = errorState; } @@ -2146,20 +2146,20 @@ public StructType encodeTlv() { return new StructType(values); } - public static OvenOperationalStateClusterOperationalErrorEvent decodeTlv(BaseTLVType tlvValue) { + public static OvenCavityOperationalStateClusterOperationalErrorEvent decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - ChipStructs.OvenOperationalStateClusterErrorStateStruct errorState = null; + ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct errorState = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == ERROR_STATE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - errorState = ChipStructs.OvenOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + errorState = ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } - return new OvenOperationalStateClusterOperationalErrorEvent( + return new OvenCavityOperationalStateClusterOperationalErrorEvent( errorState ); } @@ -2167,7 +2167,7 @@ public static OvenOperationalStateClusterOperationalErrorEvent decodeTlv(BaseTLV @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OvenOperationalStateClusterOperationalErrorEvent {\n"); + output.append("OvenCavityOperationalStateClusterOperationalErrorEvent {\n"); output.append("\terrorState: "); output.append(errorState); output.append("\n"); @@ -2175,7 +2175,7 @@ public String toString() { return output.toString(); } } -public static class OvenOperationalStateClusterOperationCompletionEvent { +public static class OvenCavityOperationalStateClusterOperationCompletionEvent { public Integer completionErrorCode; public @Nullable Optional totalOperationalTime; public @Nullable Optional pausedTime; @@ -2183,7 +2183,7 @@ public static class OvenOperationalStateClusterOperationCompletionEvent { private static final long TOTAL_OPERATIONAL_TIME_ID = 1L; private static final long PAUSED_TIME_ID = 2L; - public OvenOperationalStateClusterOperationCompletionEvent( + public OvenCavityOperationalStateClusterOperationCompletionEvent( Integer completionErrorCode, @Nullable Optional totalOperationalTime, @Nullable Optional pausedTime @@ -2202,7 +2202,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static OvenOperationalStateClusterOperationCompletionEvent decodeTlv(BaseTLVType tlvValue) { + public static OvenCavityOperationalStateClusterOperationCompletionEvent decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -2227,7 +2227,7 @@ public static OvenOperationalStateClusterOperationCompletionEvent decodeTlv(Base } } } - return new OvenOperationalStateClusterOperationCompletionEvent( + return new OvenCavityOperationalStateClusterOperationCompletionEvent( completionErrorCode, totalOperationalTime, pausedTime @@ -2237,7 +2237,7 @@ public static OvenOperationalStateClusterOperationCompletionEvent decodeTlv(Base @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OvenOperationalStateClusterOperationCompletionEvent {\n"); + output.append("OvenCavityOperationalStateClusterOperationCompletionEvent {\n"); output.append("\tcompletionErrorCode: "); output.append(completionErrorCode); output.append("\n"); @@ -2907,6 +2907,1055 @@ public String toString() { return output.toString(); } } +public static class BooleanStateConfigurationClusterAlarmsStateChangedEvent { + public Integer alarmsActive; + public Optional alarmsSuppressed; + private static final long ALARMS_ACTIVE_ID = 0L; + private static final long ALARMS_SUPPRESSED_ID = 1L; + + public BooleanStateConfigurationClusterAlarmsStateChangedEvent( + Integer alarmsActive, + Optional alarmsSuppressed + ) { + this.alarmsActive = alarmsActive; + this.alarmsSuppressed = alarmsSuppressed; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ALARMS_ACTIVE_ID, new UIntType(alarmsActive))); + values.add(new StructElement(ALARMS_SUPPRESSED_ID, alarmsSuppressed.map((nonOptionalalarmsSuppressed) -> new UIntType(nonOptionalalarmsSuppressed)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static BooleanStateConfigurationClusterAlarmsStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer alarmsActive = null; + Optional alarmsSuppressed = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ALARMS_ACTIVE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + alarmsActive = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ALARMS_SUPPRESSED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + alarmsSuppressed = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new BooleanStateConfigurationClusterAlarmsStateChangedEvent( + alarmsActive, + alarmsSuppressed + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n"); + output.append("\talarmsActive: "); + output.append(alarmsActive); + output.append("\n"); + output.append("\talarmsSuppressed: "); + output.append(alarmsSuppressed); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class BooleanStateConfigurationClusterSensorFaultEvent { + public Integer sensorFault; + private static final long SENSOR_FAULT_ID = 0L; + + public BooleanStateConfigurationClusterSensorFaultEvent( + Integer sensorFault + ) { + this.sensorFault = sensorFault; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SENSOR_FAULT_ID, new UIntType(sensorFault))); + + return new StructType(values); + } + + public static BooleanStateConfigurationClusterSensorFaultEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sensorFault = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SENSOR_FAULT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sensorFault = castingValue.value(Integer.class); + } + } + } + return new BooleanStateConfigurationClusterSensorFaultEvent( + sensorFault + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BooleanStateConfigurationClusterSensorFaultEvent {\n"); + output.append("\tsensorFault: "); + output.append(sensorFault); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ValveConfigurationAndControlClusterValveStateChangedEvent { + public Integer valveState; + public Optional valveLevel; + private static final long VALVE_STATE_ID = 0L; + private static final long VALVE_LEVEL_ID = 1L; + + public ValveConfigurationAndControlClusterValveStateChangedEvent( + Integer valveState, + Optional valveLevel + ) { + this.valveState = valveState; + this.valveLevel = valveLevel; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VALVE_STATE_ID, new UIntType(valveState))); + values.add(new StructElement(VALVE_LEVEL_ID, valveLevel.map((nonOptionalvalveLevel) -> new UIntType(nonOptionalvalveLevel)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ValveConfigurationAndControlClusterValveStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer valveState = null; + Optional valveLevel = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VALVE_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + valveState = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == VALVE_LEVEL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + valveLevel = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new ValveConfigurationAndControlClusterValveStateChangedEvent( + valveState, + valveLevel + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ValveConfigurationAndControlClusterValveStateChangedEvent {\n"); + output.append("\tvalveState: "); + output.append(valveState); + output.append("\n"); + output.append("\tvalveLevel: "); + output.append(valveLevel); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ValveConfigurationAndControlClusterValveFaultEvent { + public Integer valveFault; + private static final long VALVE_FAULT_ID = 0L; + + public ValveConfigurationAndControlClusterValveFaultEvent( + Integer valveFault + ) { + this.valveFault = valveFault; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VALVE_FAULT_ID, new UIntType(valveFault))); + + return new StructType(values); + } + + public static ValveConfigurationAndControlClusterValveFaultEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer valveFault = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VALVE_FAULT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + valveFault = castingValue.value(Integer.class); + } + } + } + return new ValveConfigurationAndControlClusterValveFaultEvent( + valveFault + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ValveConfigurationAndControlClusterValveFaultEvent {\n"); + output.append("\tvalveFault: "); + output.append(valveFault); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent { + public Optional energyImported; + public Optional energyExported; + private static final long ENERGY_IMPORTED_ID = 0L; + private static final long ENERGY_EXPORTED_ID = 1L; + + public ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( + Optional energyImported, + Optional energyExported + ) { + this.energyImported = energyImported; + this.energyExported = energyExported; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ENERGY_IMPORTED_ID, energyImported.map((nonOptionalenergyImported) -> nonOptionalenergyImported.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(ENERGY_EXPORTED_ID, energyExported.map((nonOptionalenergyExported) -> nonOptionalenergyExported.encodeTlv()).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional energyImported = Optional.empty(); + Optional energyExported = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ENERGY_IMPORTED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + energyImported = Optional.of(ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == ENERGY_EXPORTED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + energyExported = Optional.of(ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.decodeTlv(castingValue)); + } + } + } + return new ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( + energyImported, + energyExported + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent {\n"); + output.append("\tenergyImported: "); + output.append(energyImported); + output.append("\n"); + output.append("\tenergyExported: "); + output.append(energyExported); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent { + public Optional energyImported; + public Optional energyExported; + private static final long ENERGY_IMPORTED_ID = 0L; + private static final long ENERGY_EXPORTED_ID = 1L; + + public ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( + Optional energyImported, + Optional energyExported + ) { + this.energyImported = energyImported; + this.energyExported = energyExported; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ENERGY_IMPORTED_ID, energyImported.map((nonOptionalenergyImported) -> nonOptionalenergyImported.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(ENERGY_EXPORTED_ID, energyExported.map((nonOptionalenergyExported) -> nonOptionalenergyExported.encodeTlv()).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional energyImported = Optional.empty(); + Optional energyExported = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ENERGY_IMPORTED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + energyImported = Optional.of(ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == ENERGY_EXPORTED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + energyExported = Optional.of(ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.decodeTlv(castingValue)); + } + } + } + return new ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( + energyImported, + energyExported + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent {\n"); + output.append("\tenergyImported: "); + output.append(energyImported); + output.append("\n"); + output.append("\tenergyExported: "); + output.append(energyExported); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent { + public byte[] eventID; + public @Nullable Integer transitionIndex; + public Integer status; + public Integer criticality; + public Integer control; + public @Nullable Optional temperatureControl; + public @Nullable Optional averageLoadControl; + public @Nullable Optional dutyCycleControl; + public @Nullable Optional powerSavingsControl; + public @Nullable Optional heatingSourceControl; + private static final long EVENT_I_D_ID = 0L; + private static final long TRANSITION_INDEX_ID = 1L; + private static final long STATUS_ID = 2L; + private static final long CRITICALITY_ID = 3L; + private static final long CONTROL_ID = 4L; + private static final long TEMPERATURE_CONTROL_ID = 5L; + private static final long AVERAGE_LOAD_CONTROL_ID = 6L; + private static final long DUTY_CYCLE_CONTROL_ID = 7L; + private static final long POWER_SAVINGS_CONTROL_ID = 8L; + private static final long HEATING_SOURCE_CONTROL_ID = 9L; + + public DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( + byte[] eventID, + @Nullable Integer transitionIndex, + Integer status, + Integer criticality, + Integer control, + @Nullable Optional temperatureControl, + @Nullable Optional averageLoadControl, + @Nullable Optional dutyCycleControl, + @Nullable Optional powerSavingsControl, + @Nullable Optional heatingSourceControl + ) { + this.eventID = eventID; + this.transitionIndex = transitionIndex; + this.status = status; + this.criticality = criticality; + this.control = control; + this.temperatureControl = temperatureControl; + this.averageLoadControl = averageLoadControl; + this.dutyCycleControl = dutyCycleControl; + this.powerSavingsControl = powerSavingsControl; + this.heatingSourceControl = heatingSourceControl; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(EVENT_I_D_ID, new ByteArrayType(eventID))); + values.add(new StructElement(TRANSITION_INDEX_ID, transitionIndex != null ? new UIntType(transitionIndex) : new NullType())); + values.add(new StructElement(STATUS_ID, new UIntType(status))); + values.add(new StructElement(CRITICALITY_ID, new UIntType(criticality))); + values.add(new StructElement(CONTROL_ID, new UIntType(control))); + values.add(new StructElement(TEMPERATURE_CONTROL_ID, temperatureControl != null ? temperatureControl.map((nonOptionaltemperatureControl) -> nonOptionaltemperatureControl.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(AVERAGE_LOAD_CONTROL_ID, averageLoadControl != null ? averageLoadControl.map((nonOptionalaverageLoadControl) -> nonOptionalaverageLoadControl.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(DUTY_CYCLE_CONTROL_ID, dutyCycleControl != null ? dutyCycleControl.map((nonOptionaldutyCycleControl) -> nonOptionaldutyCycleControl.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(POWER_SAVINGS_CONTROL_ID, powerSavingsControl != null ? powerSavingsControl.map((nonOptionalpowerSavingsControl) -> nonOptionalpowerSavingsControl.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(HEATING_SOURCE_CONTROL_ID, heatingSourceControl != null ? heatingSourceControl.map((nonOptionalheatingSourceControl) -> nonOptionalheatingSourceControl.encodeTlv()).orElse(new EmptyType()) : new NullType())); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + byte[] eventID = null; + @Nullable Integer transitionIndex = null; + Integer status = null; + Integer criticality = null; + Integer control = null; + @Nullable Optional temperatureControl = null; + @Nullable Optional averageLoadControl = null; + @Nullable Optional dutyCycleControl = null; + @Nullable Optional powerSavingsControl = null; + @Nullable Optional heatingSourceControl = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == EVENT_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + eventID = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == TRANSITION_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionIndex = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STATUS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CRITICALITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + criticality = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + control = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == TEMPERATURE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + temperatureControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterTemperatureControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == AVERAGE_LOAD_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + averageLoadControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterAverageLoadControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == DUTY_CYCLE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + dutyCycleControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterDutyCycleControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == POWER_SAVINGS_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + powerSavingsControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterPowerSavingsControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == HEATING_SOURCE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + heatingSourceControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterHeatingSourceControlStruct.decodeTlv(castingValue)); + } + } + } + return new DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( + eventID, + transitionIndex, + status, + criticality, + control, + temperatureControl, + averageLoadControl, + dutyCycleControl, + powerSavingsControl, + heatingSourceControl + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n"); + output.append("\teventID: "); + output.append(Arrays.toString(eventID)); + output.append("\n"); + output.append("\ttransitionIndex: "); + output.append(transitionIndex); + output.append("\n"); + output.append("\tstatus: "); + output.append(status); + output.append("\n"); + output.append("\tcriticality: "); + output.append(criticality); + output.append("\n"); + output.append("\tcontrol: "); + output.append(control); + output.append("\n"); + output.append("\ttemperatureControl: "); + output.append(temperatureControl); + output.append("\n"); + output.append("\taverageLoadControl: "); + output.append(averageLoadControl); + output.append("\n"); + output.append("\tdutyCycleControl: "); + output.append(dutyCycleControl); + output.append("\n"); + output.append("\tpowerSavingsControl: "); + output.append(powerSavingsControl); + output.append("\n"); + output.append("\theatingSourceControl: "); + output.append(heatingSourceControl); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterPowerAdjustEndEvent { + public Integer cause; + public Long duration; + public Long energyUse; + private static final long CAUSE_ID = 0L; + private static final long DURATION_ID = 1L; + private static final long ENERGY_USE_ID = 2L; + + public DeviceEnergyManagementClusterPowerAdjustEndEvent( + Integer cause, + Long duration, + Long energyUse + ) { + this.cause = cause; + this.duration = duration; + this.energyUse = energyUse; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CAUSE_ID, new UIntType(cause))); + values.add(new StructElement(DURATION_ID, new UIntType(duration))); + values.add(new StructElement(ENERGY_USE_ID, new IntType(energyUse))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterPowerAdjustEndEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer cause = null; + Long duration = null; + Long energyUse = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CAUSE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + cause = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + duration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ENERGY_USE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + energyUse = castingValue.value(Long.class); + } + } + } + return new DeviceEnergyManagementClusterPowerAdjustEndEvent( + cause, + duration, + energyUse + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterPowerAdjustEndEvent {\n"); + output.append("\tcause: "); + output.append(cause); + output.append("\n"); + output.append("\tduration: "); + output.append(duration); + output.append("\n"); + output.append("\tenergyUse: "); + output.append(energyUse); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterEVConnectedEvent { + public Long sessionID; + private static final long SESSION_I_D_ID = 0L; + + public EnergyEvseClusterEVConnectedEvent( + Long sessionID + ) { + this.sessionID = sessionID; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SESSION_I_D_ID, new UIntType(sessionID))); + + return new StructType(values); + } + + public static EnergyEvseClusterEVConnectedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long sessionID = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SESSION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionID = castingValue.value(Long.class); + } + } + } + return new EnergyEvseClusterEVConnectedEvent( + sessionID + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterEVConnectedEvent {\n"); + output.append("\tsessionID: "); + output.append(sessionID); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterEVNotDetectedEvent { + public Long sessionID; + public Integer state; + public Long sessionDuration; + public Long sessionEnergyCharged; + public Optional sessionEnergyDischarged; + private static final long SESSION_I_D_ID = 0L; + private static final long STATE_ID = 1L; + private static final long SESSION_DURATION_ID = 2L; + private static final long SESSION_ENERGY_CHARGED_ID = 3L; + private static final long SESSION_ENERGY_DISCHARGED_ID = 4L; + + public EnergyEvseClusterEVNotDetectedEvent( + Long sessionID, + Integer state, + Long sessionDuration, + Long sessionEnergyCharged, + Optional sessionEnergyDischarged + ) { + this.sessionID = sessionID; + this.state = state; + this.sessionDuration = sessionDuration; + this.sessionEnergyCharged = sessionEnergyCharged; + this.sessionEnergyDischarged = sessionEnergyDischarged; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SESSION_I_D_ID, new UIntType(sessionID))); + values.add(new StructElement(STATE_ID, new UIntType(state))); + values.add(new StructElement(SESSION_DURATION_ID, new UIntType(sessionDuration))); + values.add(new StructElement(SESSION_ENERGY_CHARGED_ID, new IntType(sessionEnergyCharged))); + values.add(new StructElement(SESSION_ENERGY_DISCHARGED_ID, sessionEnergyDischarged.map((nonOptionalsessionEnergyDischarged) -> new IntType(nonOptionalsessionEnergyDischarged)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static EnergyEvseClusterEVNotDetectedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long sessionID = null; + Integer state = null; + Long sessionDuration = null; + Long sessionEnergyCharged = null; + Optional sessionEnergyDischarged = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SESSION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + state = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SESSION_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == SESSION_ENERGY_CHARGED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + sessionEnergyCharged = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == SESSION_ENERGY_DISCHARGED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + sessionEnergyDischarged = Optional.of(castingValue.value(Long.class)); + } + } + } + return new EnergyEvseClusterEVNotDetectedEvent( + sessionID, + state, + sessionDuration, + sessionEnergyCharged, + sessionEnergyDischarged + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterEVNotDetectedEvent {\n"); + output.append("\tsessionID: "); + output.append(sessionID); + output.append("\n"); + output.append("\tstate: "); + output.append(state); + output.append("\n"); + output.append("\tsessionDuration: "); + output.append(sessionDuration); + output.append("\n"); + output.append("\tsessionEnergyCharged: "); + output.append(sessionEnergyCharged); + output.append("\n"); + output.append("\tsessionEnergyDischarged: "); + output.append(sessionEnergyDischarged); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterEnergyTransferStartedEvent { + public Long sessionID; + public Integer state; + public Long maximumCurrent; + private static final long SESSION_I_D_ID = 0L; + private static final long STATE_ID = 1L; + private static final long MAXIMUM_CURRENT_ID = 2L; + + public EnergyEvseClusterEnergyTransferStartedEvent( + Long sessionID, + Integer state, + Long maximumCurrent + ) { + this.sessionID = sessionID; + this.state = state; + this.maximumCurrent = maximumCurrent; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SESSION_I_D_ID, new UIntType(sessionID))); + values.add(new StructElement(STATE_ID, new UIntType(state))); + values.add(new StructElement(MAXIMUM_CURRENT_ID, new IntType(maximumCurrent))); + + return new StructType(values); + } + + public static EnergyEvseClusterEnergyTransferStartedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long sessionID = null; + Integer state = null; + Long maximumCurrent = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SESSION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + state = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAXIMUM_CURRENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + maximumCurrent = castingValue.value(Long.class); + } + } + } + return new EnergyEvseClusterEnergyTransferStartedEvent( + sessionID, + state, + maximumCurrent + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterEnergyTransferStartedEvent {\n"); + output.append("\tsessionID: "); + output.append(sessionID); + output.append("\n"); + output.append("\tstate: "); + output.append(state); + output.append("\n"); + output.append("\tmaximumCurrent: "); + output.append(maximumCurrent); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterEnergyTransferStoppedEvent { + public Long sessionID; + public Integer state; + public Integer reason; + public Long energyTransferred; + private static final long SESSION_I_D_ID = 0L; + private static final long STATE_ID = 1L; + private static final long REASON_ID = 2L; + private static final long ENERGY_TRANSFERRED_ID = 4L; + + public EnergyEvseClusterEnergyTransferStoppedEvent( + Long sessionID, + Integer state, + Integer reason, + Long energyTransferred + ) { + this.sessionID = sessionID; + this.state = state; + this.reason = reason; + this.energyTransferred = energyTransferred; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SESSION_I_D_ID, new UIntType(sessionID))); + values.add(new StructElement(STATE_ID, new UIntType(state))); + values.add(new StructElement(REASON_ID, new UIntType(reason))); + values.add(new StructElement(ENERGY_TRANSFERRED_ID, new IntType(energyTransferred))); + + return new StructType(values); + } + + public static EnergyEvseClusterEnergyTransferStoppedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long sessionID = null; + Integer state = null; + Integer reason = null; + Long energyTransferred = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SESSION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + state = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == REASON_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + reason = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ENERGY_TRANSFERRED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + energyTransferred = castingValue.value(Long.class); + } + } + } + return new EnergyEvseClusterEnergyTransferStoppedEvent( + sessionID, + state, + reason, + energyTransferred + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterEnergyTransferStoppedEvent {\n"); + output.append("\tsessionID: "); + output.append(sessionID); + output.append("\n"); + output.append("\tstate: "); + output.append(state); + output.append("\n"); + output.append("\treason: "); + output.append(reason); + output.append("\n"); + output.append("\tenergyTransferred: "); + output.append(energyTransferred); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterFaultEvent { + public @Nullable Long sessionID; + public Integer state; + public Integer faultStatePreviousState; + public Integer faultStateCurrentState; + private static final long SESSION_I_D_ID = 0L; + private static final long STATE_ID = 1L; + private static final long FAULT_STATE_PREVIOUS_STATE_ID = 2L; + private static final long FAULT_STATE_CURRENT_STATE_ID = 4L; + + public EnergyEvseClusterFaultEvent( + @Nullable Long sessionID, + Integer state, + Integer faultStatePreviousState, + Integer faultStateCurrentState + ) { + this.sessionID = sessionID; + this.state = state; + this.faultStatePreviousState = faultStatePreviousState; + this.faultStateCurrentState = faultStateCurrentState; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SESSION_I_D_ID, sessionID != null ? new UIntType(sessionID) : new NullType())); + values.add(new StructElement(STATE_ID, new UIntType(state))); + values.add(new StructElement(FAULT_STATE_PREVIOUS_STATE_ID, new UIntType(faultStatePreviousState))); + values.add(new StructElement(FAULT_STATE_CURRENT_STATE_ID, new UIntType(faultStateCurrentState))); + + return new StructType(values); + } + + public static EnergyEvseClusterFaultEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable Long sessionID = null; + Integer state = null; + Integer faultStatePreviousState = null; + Integer faultStateCurrentState = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SESSION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sessionID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + state = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FAULT_STATE_PREVIOUS_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + faultStatePreviousState = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FAULT_STATE_CURRENT_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + faultStateCurrentState = castingValue.value(Integer.class); + } + } + } + return new EnergyEvseClusterFaultEvent( + sessionID, + state, + faultStatePreviousState, + faultStateCurrentState + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterFaultEvent {\n"); + output.append("\tsessionID: "); + output.append(sessionID); + output.append("\n"); + output.append("\tstate: "); + output.append(state); + output.append("\n"); + output.append("\tfaultStatePreviousState: "); + output.append(faultStatePreviousState); + output.append("\n"); + output.append("\tfaultStateCurrentState: "); + output.append(faultStateCurrentState); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterRFIDEvent { + public byte[] uid; + private static final long UID_ID = 0L; + + public EnergyEvseClusterRFIDEvent( + byte[] uid + ) { + this.uid = uid; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(UID_ID, new ByteArrayType(uid))); + + return new StructType(values); + } + + public static EnergyEvseClusterRFIDEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + byte[] uid = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == UID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + uid = castingValue.value(byte[].class); + } + } + } + return new EnergyEvseClusterRFIDEvent( + uid + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterRFIDEvent {\n"); + output.append("\tuid: "); + output.append(Arrays.toString(uid)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class DoorLockClusterDoorLockAlarmEvent { public Integer alarmCode; private static final long ALARM_CODE_ID = 0L; @@ -3392,6 +4441,294 @@ public String toString() { return output.toString(); } } +public static class TargetNavigatorClusterTargetUpdatedEvent { + public ArrayList targetList; + public Integer currentTarget; + public byte[] data; + private static final long TARGET_LIST_ID = 0L; + private static final long CURRENT_TARGET_ID = 1L; + private static final long DATA_ID = 2L; + + public TargetNavigatorClusterTargetUpdatedEvent( + ArrayList targetList, + Integer currentTarget, + byte[] data + ) { + this.targetList = targetList; + this.currentTarget = currentTarget; + this.data = data; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(TARGET_LIST_ID, ArrayType.generateArrayType(targetList, (elementtargetList) -> elementtargetList.encodeTlv()))); + values.add(new StructElement(CURRENT_TARGET_ID, new UIntType(currentTarget))); + values.add(new StructElement(DATA_ID, new ByteArrayType(data))); + + return new StructType(values); + } + + public static TargetNavigatorClusterTargetUpdatedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + ArrayList targetList = null; + Integer currentTarget = null; + byte[] data = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == TARGET_LIST_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + targetList = castingValue.map((elementcastingValue) -> ChipStructs.TargetNavigatorClusterTargetInfoStruct.decodeTlv(elementcastingValue)); + } + } else if (element.contextTagNum() == CURRENT_TARGET_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentTarget = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == DATA_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = castingValue.value(byte[].class); + } + } + } + return new TargetNavigatorClusterTargetUpdatedEvent( + targetList, + currentTarget, + data + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TargetNavigatorClusterTargetUpdatedEvent {\n"); + output.append("\ttargetList: "); + output.append(targetList); + output.append("\n"); + output.append("\tcurrentTarget: "); + output.append(currentTarget); + output.append("\n"); + output.append("\tdata: "); + output.append(Arrays.toString(data)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class MediaPlaybackClusterStateChangedEvent { + public Integer currentState; + public Long startTime; + public Long duration; + public ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition; + public Float playbackSpeed; + public Long seekRangeEnd; + public Long seekRangeStart; + public Optional data; + public Boolean audioAdvanceUnmuted; + private static final long CURRENT_STATE_ID = 0L; + private static final long START_TIME_ID = 1L; + private static final long DURATION_ID = 2L; + private static final long SAMPLED_POSITION_ID = 3L; + private static final long PLAYBACK_SPEED_ID = 4L; + private static final long SEEK_RANGE_END_ID = 5L; + private static final long SEEK_RANGE_START_ID = 6L; + private static final long DATA_ID = 7L; + private static final long AUDIO_ADVANCE_UNMUTED_ID = 8L; + + public MediaPlaybackClusterStateChangedEvent( + Integer currentState, + Long startTime, + Long duration, + ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition, + Float playbackSpeed, + Long seekRangeEnd, + Long seekRangeStart, + Optional data, + Boolean audioAdvanceUnmuted + ) { + this.currentState = currentState; + this.startTime = startTime; + this.duration = duration; + this.sampledPosition = sampledPosition; + this.playbackSpeed = playbackSpeed; + this.seekRangeEnd = seekRangeEnd; + this.seekRangeStart = seekRangeStart; + this.data = data; + this.audioAdvanceUnmuted = audioAdvanceUnmuted; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CURRENT_STATE_ID, new UIntType(currentState))); + values.add(new StructElement(START_TIME_ID, new UIntType(startTime))); + values.add(new StructElement(DURATION_ID, new UIntType(duration))); + values.add(new StructElement(SAMPLED_POSITION_ID, sampledPosition.encodeTlv())); + values.add(new StructElement(PLAYBACK_SPEED_ID, new FloatType(playbackSpeed))); + values.add(new StructElement(SEEK_RANGE_END_ID, new UIntType(seekRangeEnd))); + values.add(new StructElement(SEEK_RANGE_START_ID, new UIntType(seekRangeStart))); + values.add(new StructElement(DATA_ID, data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()))); + values.add(new StructElement(AUDIO_ADVANCE_UNMUTED_ID, new BooleanType(audioAdvanceUnmuted))); + + return new StructType(values); + } + + public static MediaPlaybackClusterStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer currentState = null; + Long startTime = null; + Long duration = null; + ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition = null; + Float playbackSpeed = null; + Long seekRangeEnd = null; + Long seekRangeStart = null; + Optional data = Optional.empty(); + Boolean audioAdvanceUnmuted = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CURRENT_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentState = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + duration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == SAMPLED_POSITION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + sampledPosition = ChipStructs.MediaPlaybackClusterPlaybackPositionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == PLAYBACK_SPEED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Float) { + FloatType castingValue = element.value(FloatType.class); + playbackSpeed = castingValue.value(Float.class); + } + } else if (element.contextTagNum() == SEEK_RANGE_END_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + seekRangeEnd = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == SEEK_RANGE_START_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + seekRangeStart = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DATA_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == AUDIO_ADVANCE_UNMUTED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + audioAdvanceUnmuted = castingValue.value(Boolean.class); + } + } + } + return new MediaPlaybackClusterStateChangedEvent( + currentState, + startTime, + duration, + sampledPosition, + playbackSpeed, + seekRangeEnd, + seekRangeStart, + data, + audioAdvanceUnmuted + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("MediaPlaybackClusterStateChangedEvent {\n"); + output.append("\tcurrentState: "); + output.append(currentState); + output.append("\n"); + output.append("\tstartTime: "); + output.append(startTime); + output.append("\n"); + output.append("\tduration: "); + output.append(duration); + output.append("\n"); + output.append("\tsampledPosition: "); + output.append(sampledPosition); + output.append("\n"); + output.append("\tplaybackSpeed: "); + output.append(playbackSpeed); + output.append("\n"); + output.append("\tseekRangeEnd: "); + output.append(seekRangeEnd); + output.append("\n"); + output.append("\tseekRangeStart: "); + output.append(seekRangeStart); + output.append("\n"); + output.append("\tdata: "); + output.append(data.isPresent() ? Arrays.toString(data.get()) : ""); + output.append("\n"); + output.append("\taudioAdvanceUnmuted: "); + output.append(audioAdvanceUnmuted); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class AccountLoginClusterLoggedOutEvent { + public Optional node; + private static final long NODE_ID = 0L; + + public AccountLoginClusterLoggedOutEvent( + Optional node + ) { + this.node = node; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(NODE_ID, node.map((nonOptionalnode) -> new UIntType(nonOptionalnode)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static AccountLoginClusterLoggedOutEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional node = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == NODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + node = Optional.of(castingValue.value(Long.class)); + } + } + } + return new AccountLoginClusterLoggedOutEvent( + node + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AccountLoginClusterLoggedOutEvent {\n"); + output.append("\tnode: "); + output.append(node); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class UnitTestingClusterTestEventEvent { public Integer arg1; public Integer arg2; @@ -3559,4 +4896,65 @@ public String toString() { return output.toString(); } } +public static class SampleMeiClusterPingCountEventEvent { + public Long count; + public Integer fabricIndex; + private static final long COUNT_ID = 1L; + private static final long FABRIC_INDEX_ID = 254L; + + public SampleMeiClusterPingCountEventEvent( + Long count, + Integer fabricIndex + ) { + this.count = count; + this.fabricIndex = fabricIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(COUNT_ID, new UIntType(count))); + values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); + + return new StructType(values); + } + + public static SampleMeiClusterPingCountEventEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long count = null; + Integer fabricIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + count = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fabricIndex = castingValue.value(Integer.class); + } + } + } + return new SampleMeiClusterPingCountEventEvent( + count, + fabricIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("SampleMeiClusterPingCountEventEvent {\n"); + output.append("\tcount: "); + output.append(count); + output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index e518a59f331d67..e7e40657b7915f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -146,6 +146,127 @@ public String toString() { return output.toString(); } } +public static class ScenesClusterSceneInfoStruct { + public Integer sceneCount; + public Integer currentScene; + public Integer currentGroup; + public Boolean sceneValid; + public Integer remainingCapacity; + public Integer fabricIndex; + private static final long SCENE_COUNT_ID = 0L; + private static final long CURRENT_SCENE_ID = 1L; + private static final long CURRENT_GROUP_ID = 2L; + private static final long SCENE_VALID_ID = 3L; + private static final long REMAINING_CAPACITY_ID = 4L; + private static final long FABRIC_INDEX_ID = 254L; + + public ScenesClusterSceneInfoStruct( + Integer sceneCount, + Integer currentScene, + Integer currentGroup, + Boolean sceneValid, + Integer remainingCapacity, + Integer fabricIndex + ) { + this.sceneCount = sceneCount; + this.currentScene = currentScene; + this.currentGroup = currentGroup; + this.sceneValid = sceneValid; + this.remainingCapacity = remainingCapacity; + this.fabricIndex = fabricIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SCENE_COUNT_ID, new UIntType(sceneCount))); + values.add(new StructElement(CURRENT_SCENE_ID, new UIntType(currentScene))); + values.add(new StructElement(CURRENT_GROUP_ID, new UIntType(currentGroup))); + values.add(new StructElement(SCENE_VALID_ID, new BooleanType(sceneValid))); + values.add(new StructElement(REMAINING_CAPACITY_ID, new UIntType(remainingCapacity))); + values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); + + return new StructType(values); + } + + public static ScenesClusterSceneInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sceneCount = null; + Integer currentScene = null; + Integer currentGroup = null; + Boolean sceneValid = null; + Integer remainingCapacity = null; + Integer fabricIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SCENE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneCount = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_SCENE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentScene = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_GROUP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentGroup = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SCENE_VALID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + sceneValid = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == REMAINING_CAPACITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + remainingCapacity = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fabricIndex = castingValue.value(Integer.class); + } + } + } + return new ScenesClusterSceneInfoStruct( + sceneCount, + currentScene, + currentGroup, + sceneValid, + remainingCapacity, + fabricIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesClusterSceneInfoStruct {\n"); + output.append("\tsceneCount: "); + output.append(sceneCount); + output.append("\n"); + output.append("\tcurrentScene: "); + output.append(currentScene); + output.append("\n"); + output.append("\tcurrentGroup: "); + output.append(currentGroup); + output.append("\n"); + output.append("\tsceneValid: "); + output.append(sceneValid); + output.append("\n"); + output.append("\tremainingCapacity: "); + output.append(remainingCapacity); + output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class DescriptorClusterDeviceTypeStruct { public Long deviceType; public Integer revision; @@ -3678,7 +3799,7 @@ public String toString() { return output.toString(); } } -public static class OvenOperationalStateClusterErrorStateStruct { +public static class OvenCavityOperationalStateClusterErrorStateStruct { public Integer errorStateID; public Optional errorStateLabel; public Optional errorStateDetails; @@ -3686,7 +3807,7 @@ public static class OvenOperationalStateClusterErrorStateStruct { private static final long ERROR_STATE_LABEL_ID = 1L; private static final long ERROR_STATE_DETAILS_ID = 2L; - public OvenOperationalStateClusterErrorStateStruct( + public OvenCavityOperationalStateClusterErrorStateStruct( Integer errorStateID, Optional errorStateLabel, Optional errorStateDetails @@ -3705,7 +3826,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static OvenOperationalStateClusterErrorStateStruct decodeTlv(BaseTLVType tlvValue) { + public static OvenCavityOperationalStateClusterErrorStateStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -3730,7 +3851,7 @@ public static OvenOperationalStateClusterErrorStateStruct decodeTlv(BaseTLVType } } } - return new OvenOperationalStateClusterErrorStateStruct( + return new OvenCavityOperationalStateClusterErrorStateStruct( errorStateID, errorStateLabel, errorStateDetails @@ -3740,7 +3861,7 @@ public static OvenOperationalStateClusterErrorStateStruct decodeTlv(BaseTLVType @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OvenOperationalStateClusterErrorStateStruct {\n"); + output.append("OvenCavityOperationalStateClusterErrorStateStruct {\n"); output.append("\terrorStateID: "); output.append(errorStateID); output.append("\n"); @@ -3754,13 +3875,13 @@ public String toString() { return output.toString(); } } -public static class OvenOperationalStateClusterOperationalStateStruct { +public static class OvenCavityOperationalStateClusterOperationalStateStruct { public Integer operationalStateID; public Optional operationalStateLabel; private static final long OPERATIONAL_STATE_I_D_ID = 0L; private static final long OPERATIONAL_STATE_LABEL_ID = 1L; - public OvenOperationalStateClusterOperationalStateStruct( + public OvenCavityOperationalStateClusterOperationalStateStruct( Integer operationalStateID, Optional operationalStateLabel ) { @@ -3776,7 +3897,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static OvenOperationalStateClusterOperationalStateStruct decodeTlv(BaseTLVType tlvValue) { + public static OvenCavityOperationalStateClusterOperationalStateStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -3795,7 +3916,7 @@ public static OvenOperationalStateClusterOperationalStateStruct decodeTlv(BaseTL } } } - return new OvenOperationalStateClusterOperationalStateStruct( + return new OvenCavityOperationalStateClusterOperationalStateStruct( operationalStateID, operationalStateLabel ); @@ -3804,7 +3925,7 @@ public static OvenOperationalStateClusterOperationalStateStruct decodeTlv(BaseTL @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OvenOperationalStateClusterOperationalStateStruct {\n"); + output.append("OvenCavityOperationalStateClusterOperationalStateStruct {\n"); output.append("\toperationalStateID: "); output.append(operationalStateID); output.append("\n"); @@ -3815,6 +3936,143 @@ public String toString() { return output.toString(); } } +public static class OvenModeClusterModeTagStruct { + public Optional mfgCode; + public Integer value; + private static final long MFG_CODE_ID = 0L; + private static final long VALUE_ID = 1L; + + public OvenModeClusterModeTagStruct( + Optional mfgCode, + Integer value + ) { + this.mfgCode = mfgCode; + this.value = value; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MFG_CODE_ID, mfgCode.map((nonOptionalmfgCode) -> new UIntType(nonOptionalmfgCode)).orElse(new EmptyType()))); + values.add(new StructElement(VALUE_ID, new UIntType(value))); + + return new StructType(values); + } + + public static OvenModeClusterModeTagStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional mfgCode = Optional.empty(); + Integer value = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MFG_CODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + mfgCode = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == VALUE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + value = castingValue.value(Integer.class); + } + } + } + return new OvenModeClusterModeTagStruct( + mfgCode, + value + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OvenModeClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class OvenModeClusterModeOptionStruct { + public String label; + public Integer mode; + public ArrayList modeTags; + private static final long LABEL_ID = 0L; + private static final long MODE_ID = 1L; + private static final long MODE_TAGS_ID = 2L; + + public OvenModeClusterModeOptionStruct( + String label, + Integer mode, + ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LABEL_ID, new StringType(label))); + values.add(new StructElement(MODE_ID, new UIntType(mode))); + values.add(new StructElement(MODE_TAGS_ID, ArrayType.generateArrayType(modeTags, (elementmodeTags) -> elementmodeTags.encodeTlv()))); + + return new StructType(values); + } + + public static OvenModeClusterModeOptionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String label = null; + Integer mode = null; + ArrayList modeTags = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LABEL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + label = castingValue.value(String.class); + } + } else if (element.contextTagNum() == MODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + mode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MODE_TAGS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + modeTags = castingValue.map((elementcastingValue) -> ChipStructs.OvenModeClusterModeTagStruct.decodeTlv(elementcastingValue)); + } + } + } + return new OvenModeClusterModeOptionStruct( + label, + mode, + modeTags + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OvenModeClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ModeSelectClusterSemanticTagStruct { public Integer mfgCode; public Integer value; @@ -5170,244 +5428,2894 @@ public String toString() { return output.toString(); } } -public static class DoorLockClusterCredentialStruct { - public Integer credentialType; - public Integer credentialIndex; - private static final long CREDENTIAL_TYPE_ID = 0L; - private static final long CREDENTIAL_INDEX_ID = 1L; - - public DoorLockClusterCredentialStruct( - Integer credentialType, - Integer credentialIndex +public static class ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct { + public Long rangeMin; + public Long rangeMax; + public Optional percentMax; + public Optional percentMin; + public Optional percentTypical; + public Optional fixedMax; + public Optional fixedMin; + public Optional fixedTypical; + private static final long RANGE_MIN_ID = 0L; + private static final long RANGE_MAX_ID = 1L; + private static final long PERCENT_MAX_ID = 2L; + private static final long PERCENT_MIN_ID = 3L; + private static final long PERCENT_TYPICAL_ID = 4L; + private static final long FIXED_MAX_ID = 5L; + private static final long FIXED_MIN_ID = 6L; + private static final long FIXED_TYPICAL_ID = 7L; + + public ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( + Long rangeMin, + Long rangeMax, + Optional percentMax, + Optional percentMin, + Optional percentTypical, + Optional fixedMax, + Optional fixedMin, + Optional fixedTypical ) { - this.credentialType = credentialType; - this.credentialIndex = credentialIndex; + this.rangeMin = rangeMin; + this.rangeMax = rangeMax; + this.percentMax = percentMax; + this.percentMin = percentMin; + this.percentTypical = percentTypical; + this.fixedMax = fixedMax; + this.fixedMin = fixedMin; + this.fixedTypical = fixedTypical; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(CREDENTIAL_TYPE_ID, new UIntType(credentialType))); - values.add(new StructElement(CREDENTIAL_INDEX_ID, new UIntType(credentialIndex))); + values.add(new StructElement(RANGE_MIN_ID, new IntType(rangeMin))); + values.add(new StructElement(RANGE_MAX_ID, new IntType(rangeMax))); + values.add(new StructElement(PERCENT_MAX_ID, percentMax.map((nonOptionalpercentMax) -> new UIntType(nonOptionalpercentMax)).orElse(new EmptyType()))); + values.add(new StructElement(PERCENT_MIN_ID, percentMin.map((nonOptionalpercentMin) -> new UIntType(nonOptionalpercentMin)).orElse(new EmptyType()))); + values.add(new StructElement(PERCENT_TYPICAL_ID, percentTypical.map((nonOptionalpercentTypical) -> new UIntType(nonOptionalpercentTypical)).orElse(new EmptyType()))); + values.add(new StructElement(FIXED_MAX_ID, fixedMax.map((nonOptionalfixedMax) -> new UIntType(nonOptionalfixedMax)).orElse(new EmptyType()))); + values.add(new StructElement(FIXED_MIN_ID, fixedMin.map((nonOptionalfixedMin) -> new UIntType(nonOptionalfixedMin)).orElse(new EmptyType()))); + values.add(new StructElement(FIXED_TYPICAL_ID, fixedTypical.map((nonOptionalfixedTypical) -> new UIntType(nonOptionalfixedTypical)).orElse(new EmptyType()))); return new StructType(values); } - public static DoorLockClusterCredentialStruct decodeTlv(BaseTLVType tlvValue) { + public static ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Integer credentialType = null; - Integer credentialIndex = null; + Long rangeMin = null; + Long rangeMax = null; + Optional percentMax = Optional.empty(); + Optional percentMin = Optional.empty(); + Optional percentTypical = Optional.empty(); + Optional fixedMax = Optional.empty(); + Optional fixedMin = Optional.empty(); + Optional fixedTypical = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == CREDENTIAL_TYPE_ID) { + if (element.contextTagNum() == RANGE_MIN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + rangeMin = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == RANGE_MAX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + rangeMax = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == PERCENT_MAX_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - credentialType = castingValue.value(Integer.class); + percentMax = Optional.of(castingValue.value(Integer.class)); } - } else if (element.contextTagNum() == CREDENTIAL_INDEX_ID) { + } else if (element.contextTagNum() == PERCENT_MIN_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - credentialIndex = castingValue.value(Integer.class); + percentMin = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == PERCENT_TYPICAL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + percentTypical = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == FIXED_MAX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fixedMax = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == FIXED_MIN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fixedMin = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == FIXED_TYPICAL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fixedTypical = Optional.of(castingValue.value(Long.class)); } } } - return new DoorLockClusterCredentialStruct( - credentialType, - credentialIndex + return new ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( + rangeMin, + rangeMax, + percentMax, + percentMin, + percentTypical, + fixedMax, + fixedMin, + fixedTypical ); } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("DoorLockClusterCredentialStruct {\n"); - output.append("\tcredentialType: "); - output.append(credentialType); + output.append("ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct {\n"); + output.append("\trangeMin: "); + output.append(rangeMin); output.append("\n"); - output.append("\tcredentialIndex: "); - output.append(credentialIndex); + output.append("\trangeMax: "); + output.append(rangeMax); + output.append("\n"); + output.append("\tpercentMax: "); + output.append(percentMax); + output.append("\n"); + output.append("\tpercentMin: "); + output.append(percentMin); + output.append("\n"); + output.append("\tpercentTypical: "); + output.append(percentTypical); + output.append("\n"); + output.append("\tfixedMax: "); + output.append(fixedMax); + output.append("\n"); + output.append("\tfixedMin: "); + output.append(fixedMin); + output.append("\n"); + output.append("\tfixedTypical: "); + output.append(fixedTypical); output.append("\n"); output.append("}\n"); return output.toString(); } } -public static class ThermostatClusterThermostatScheduleTransition { - public Integer transitionTime; - public @Nullable Integer heatSetpoint; - public @Nullable Integer coolSetpoint; - private static final long TRANSITION_TIME_ID = 0L; - private static final long HEAT_SETPOINT_ID = 1L; - private static final long COOL_SETPOINT_ID = 2L; - - public ThermostatClusterThermostatScheduleTransition( - Integer transitionTime, - @Nullable Integer heatSetpoint, - @Nullable Integer coolSetpoint +public static class ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct { + public Integer measurementType; + public Boolean measured; + public Long minMeasuredValue; + public Long maxMeasuredValue; + public ArrayList accuracyRanges; + private static final long MEASUREMENT_TYPE_ID = 0L; + private static final long MEASURED_ID = 1L; + private static final long MIN_MEASURED_VALUE_ID = 2L; + private static final long MAX_MEASURED_VALUE_ID = 3L; + private static final long ACCURACY_RANGES_ID = 4L; + + public ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct( + Integer measurementType, + Boolean measured, + Long minMeasuredValue, + Long maxMeasuredValue, + ArrayList accuracyRanges ) { - this.transitionTime = transitionTime; - this.heatSetpoint = heatSetpoint; - this.coolSetpoint = coolSetpoint; + this.measurementType = measurementType; + this.measured = measured; + this.minMeasuredValue = minMeasuredValue; + this.maxMeasuredValue = maxMeasuredValue; + this.accuracyRanges = accuracyRanges; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(TRANSITION_TIME_ID, new UIntType(transitionTime))); - values.add(new StructElement(HEAT_SETPOINT_ID, heatSetpoint != null ? new IntType(heatSetpoint) : new NullType())); - values.add(new StructElement(COOL_SETPOINT_ID, coolSetpoint != null ? new IntType(coolSetpoint) : new NullType())); + values.add(new StructElement(MEASUREMENT_TYPE_ID, new UIntType(measurementType))); + values.add(new StructElement(MEASURED_ID, new BooleanType(measured))); + values.add(new StructElement(MIN_MEASURED_VALUE_ID, new IntType(minMeasuredValue))); + values.add(new StructElement(MAX_MEASURED_VALUE_ID, new IntType(maxMeasuredValue))); + values.add(new StructElement(ACCURACY_RANGES_ID, ArrayType.generateArrayType(accuracyRanges, (elementaccuracyRanges) -> elementaccuracyRanges.encodeTlv()))); return new StructType(values); } - public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVType tlvValue) { + public static ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Integer transitionTime = null; - @Nullable Integer heatSetpoint = null; - @Nullable Integer coolSetpoint = null; + Integer measurementType = null; + Boolean measured = null; + Long minMeasuredValue = null; + Long maxMeasuredValue = null; + ArrayList accuracyRanges = null; for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == TRANSITION_TIME_ID) { + if (element.contextTagNum() == MEASUREMENT_TYPE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - transitionTime = castingValue.value(Integer.class); + measurementType = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == HEAT_SETPOINT_ID) { + } else if (element.contextTagNum() == MEASURED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + measured = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == MIN_MEASURED_VALUE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Int) { IntType castingValue = element.value(IntType.class); - heatSetpoint = castingValue.value(Integer.class); + minMeasuredValue = castingValue.value(Long.class); } - } else if (element.contextTagNum() == COOL_SETPOINT_ID) { + } else if (element.contextTagNum() == MAX_MEASURED_VALUE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Int) { IntType castingValue = element.value(IntType.class); - coolSetpoint = castingValue.value(Integer.class); + maxMeasuredValue = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ACCURACY_RANGES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + accuracyRanges = castingValue.map((elementcastingValue) -> ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.decodeTlv(elementcastingValue)); } } } - return new ThermostatClusterThermostatScheduleTransition( - transitionTime, - heatSetpoint, - coolSetpoint + return new ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct( + measurementType, + measured, + minMeasuredValue, + maxMeasuredValue, + accuracyRanges ); } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThermostatClusterThermostatScheduleTransition {\n"); - output.append("\ttransitionTime: "); - output.append(transitionTime); + output.append("ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct {\n"); + output.append("\tmeasurementType: "); + output.append(measurementType); output.append("\n"); - output.append("\theatSetpoint: "); - output.append(heatSetpoint); + output.append("\tmeasured: "); + output.append(measured); output.append("\n"); - output.append("\tcoolSetpoint: "); - output.append(coolSetpoint); + output.append("\tminMeasuredValue: "); + output.append(minMeasuredValue); + output.append("\n"); + output.append("\tmaxMeasuredValue: "); + output.append(maxMeasuredValue); + output.append("\n"); + output.append("\taccuracyRanges: "); + output.append(accuracyRanges); output.append("\n"); output.append("}\n"); return output.toString(); } } -public static class ChannelClusterChannelInfoStruct { - public Integer majorNumber; - public Integer minorNumber; - public Optional name; - public Optional callSign; - public Optional affiliateCallSign; - private static final long MAJOR_NUMBER_ID = 0L; - private static final long MINOR_NUMBER_ID = 1L; - private static final long NAME_ID = 2L; - private static final long CALL_SIGN_ID = 3L; - private static final long AFFILIATE_CALL_SIGN_ID = 4L; +public static class ElectricalEnergyMeasurementClusterEnergyMeasurementStruct { + public Long energy; + public Optional startTimestamp; + public Optional endTimestamp; + public Optional startSystime; + public Optional endSystime; + private static final long ENERGY_ID = 0L; + private static final long START_TIMESTAMP_ID = 1L; + private static final long END_TIMESTAMP_ID = 2L; + private static final long START_SYSTIME_ID = 3L; + private static final long END_SYSTIME_ID = 4L; + + public ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( + Long energy, + Optional startTimestamp, + Optional endTimestamp, + Optional startSystime, + Optional endSystime + ) { + this.energy = energy; + this.startTimestamp = startTimestamp; + this.endTimestamp = endTimestamp; + this.startSystime = startSystime; + this.endSystime = endSystime; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ENERGY_ID, new IntType(energy))); + values.add(new StructElement(START_TIMESTAMP_ID, startTimestamp.map((nonOptionalstartTimestamp) -> new UIntType(nonOptionalstartTimestamp)).orElse(new EmptyType()))); + values.add(new StructElement(END_TIMESTAMP_ID, endTimestamp.map((nonOptionalendTimestamp) -> new UIntType(nonOptionalendTimestamp)).orElse(new EmptyType()))); + values.add(new StructElement(START_SYSTIME_ID, startSystime.map((nonOptionalstartSystime) -> new UIntType(nonOptionalstartSystime)).orElse(new EmptyType()))); + values.add(new StructElement(END_SYSTIME_ID, endSystime.map((nonOptionalendSystime) -> new UIntType(nonOptionalendSystime)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ElectricalEnergyMeasurementClusterEnergyMeasurementStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long energy = null; + Optional startTimestamp = Optional.empty(); + Optional endTimestamp = Optional.empty(); + Optional startSystime = Optional.empty(); + Optional endSystime = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ENERGY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + energy = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == START_TIMESTAMP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTimestamp = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == END_TIMESTAMP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endTimestamp = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == START_SYSTIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startSystime = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == END_SYSTIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endSystime = Optional.of(castingValue.value(Long.class)); + } + } + } + return new ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( + energy, + startTimestamp, + endTimestamp, + startSystime, + endSystime + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ElectricalEnergyMeasurementClusterEnergyMeasurementStruct {\n"); + output.append("\tenergy: "); + output.append(energy); + output.append("\n"); + output.append("\tstartTimestamp: "); + output.append(startTimestamp); + output.append("\n"); + output.append("\tendTimestamp: "); + output.append(endTimestamp); + output.append("\n"); + output.append("\tstartSystime: "); + output.append(startSystime); + output.append("\n"); + output.append("\tendSystime: "); + output.append(endSystime); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterHeatingSourceControlStruct { + public Integer heatingSource; + private static final long HEATING_SOURCE_ID = 0L; + + public DemandResponseLoadControlClusterHeatingSourceControlStruct( + Integer heatingSource + ) { + this.heatingSource = heatingSource; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(HEATING_SOURCE_ID, new UIntType(heatingSource))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterHeatingSourceControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer heatingSource = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == HEATING_SOURCE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + heatingSource = castingValue.value(Integer.class); + } + } + } + return new DemandResponseLoadControlClusterHeatingSourceControlStruct( + heatingSource + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterHeatingSourceControlStruct {\n"); + output.append("\theatingSource: "); + output.append(heatingSource); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterPowerSavingsControlStruct { + public Integer powerSavings; + private static final long POWER_SAVINGS_ID = 0L; + + public DemandResponseLoadControlClusterPowerSavingsControlStruct( + Integer powerSavings + ) { + this.powerSavings = powerSavings; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(POWER_SAVINGS_ID, new UIntType(powerSavings))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterPowerSavingsControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer powerSavings = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == POWER_SAVINGS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + powerSavings = castingValue.value(Integer.class); + } + } + } + return new DemandResponseLoadControlClusterPowerSavingsControlStruct( + powerSavings + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n"); + output.append("\tpowerSavings: "); + output.append(powerSavings); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterDutyCycleControlStruct { + public Integer dutyCycle; + private static final long DUTY_CYCLE_ID = 0L; + + public DemandResponseLoadControlClusterDutyCycleControlStruct( + Integer dutyCycle + ) { + this.dutyCycle = dutyCycle; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(DUTY_CYCLE_ID, new UIntType(dutyCycle))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterDutyCycleControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer dutyCycle = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == DUTY_CYCLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + dutyCycle = castingValue.value(Integer.class); + } + } + } + return new DemandResponseLoadControlClusterDutyCycleControlStruct( + dutyCycle + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterDutyCycleControlStruct {\n"); + output.append("\tdutyCycle: "); + output.append(dutyCycle); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterAverageLoadControlStruct { + public Integer loadAdjustment; + private static final long LOAD_ADJUSTMENT_ID = 0L; + + public DemandResponseLoadControlClusterAverageLoadControlStruct( + Integer loadAdjustment + ) { + this.loadAdjustment = loadAdjustment; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LOAD_ADJUSTMENT_ID, new IntType(loadAdjustment))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterAverageLoadControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer loadAdjustment = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LOAD_ADJUSTMENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + loadAdjustment = castingValue.value(Integer.class); + } + } + } + return new DemandResponseLoadControlClusterAverageLoadControlStruct( + loadAdjustment + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterAverageLoadControlStruct {\n"); + output.append("\tloadAdjustment: "); + output.append(loadAdjustment); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterTemperatureControlStruct { + public @Nullable Optional coolingTempOffset; + public @Nullable Optional heatingtTempOffset; + public @Nullable Optional coolingTempSetpoint; + public @Nullable Optional heatingTempSetpoint; + private static final long COOLING_TEMP_OFFSET_ID = 0L; + private static final long HEATINGT_TEMP_OFFSET_ID = 1L; + private static final long COOLING_TEMP_SETPOINT_ID = 2L; + private static final long HEATING_TEMP_SETPOINT_ID = 3L; + + public DemandResponseLoadControlClusterTemperatureControlStruct( + @Nullable Optional coolingTempOffset, + @Nullable Optional heatingtTempOffset, + @Nullable Optional coolingTempSetpoint, + @Nullable Optional heatingTempSetpoint + ) { + this.coolingTempOffset = coolingTempOffset; + this.heatingtTempOffset = heatingtTempOffset; + this.coolingTempSetpoint = coolingTempSetpoint; + this.heatingTempSetpoint = heatingTempSetpoint; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(COOLING_TEMP_OFFSET_ID, coolingTempOffset != null ? coolingTempOffset.map((nonOptionalcoolingTempOffset) -> new UIntType(nonOptionalcoolingTempOffset)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(HEATINGT_TEMP_OFFSET_ID, heatingtTempOffset != null ? heatingtTempOffset.map((nonOptionalheatingtTempOffset) -> new UIntType(nonOptionalheatingtTempOffset)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(COOLING_TEMP_SETPOINT_ID, coolingTempSetpoint != null ? coolingTempSetpoint.map((nonOptionalcoolingTempSetpoint) -> new IntType(nonOptionalcoolingTempSetpoint)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(HEATING_TEMP_SETPOINT_ID, heatingTempSetpoint != null ? heatingTempSetpoint.map((nonOptionalheatingTempSetpoint) -> new IntType(nonOptionalheatingTempSetpoint)).orElse(new EmptyType()) : new NullType())); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterTemperatureControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable Optional coolingTempOffset = null; + @Nullable Optional heatingtTempOffset = null; + @Nullable Optional coolingTempSetpoint = null; + @Nullable Optional heatingTempSetpoint = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == COOLING_TEMP_OFFSET_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + coolingTempOffset = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == HEATINGT_TEMP_OFFSET_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + heatingtTempOffset = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == COOLING_TEMP_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + coolingTempSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == HEATING_TEMP_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + heatingTempSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new DemandResponseLoadControlClusterTemperatureControlStruct( + coolingTempOffset, + heatingtTempOffset, + coolingTempSetpoint, + heatingTempSetpoint + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterTemperatureControlStruct {\n"); + output.append("\tcoolingTempOffset: "); + output.append(coolingTempOffset); + output.append("\n"); + output.append("\theatingtTempOffset: "); + output.append(heatingtTempOffset); + output.append("\n"); + output.append("\tcoolingTempSetpoint: "); + output.append(coolingTempSetpoint); + output.append("\n"); + output.append("\theatingTempSetpoint: "); + output.append(heatingTempSetpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterLoadControlEventTransitionStruct { + public Integer duration; + public Integer control; + public Optional temperatureControl; + public Optional averageLoadControl; + public Optional dutyCycleControl; + public Optional powerSavingsControl; + public Optional heatingSourceControl; + private static final long DURATION_ID = 0L; + private static final long CONTROL_ID = 1L; + private static final long TEMPERATURE_CONTROL_ID = 2L; + private static final long AVERAGE_LOAD_CONTROL_ID = 3L; + private static final long DUTY_CYCLE_CONTROL_ID = 4L; + private static final long POWER_SAVINGS_CONTROL_ID = 5L; + private static final long HEATING_SOURCE_CONTROL_ID = 6L; + + public DemandResponseLoadControlClusterLoadControlEventTransitionStruct( + Integer duration, + Integer control, + Optional temperatureControl, + Optional averageLoadControl, + Optional dutyCycleControl, + Optional powerSavingsControl, + Optional heatingSourceControl + ) { + this.duration = duration; + this.control = control; + this.temperatureControl = temperatureControl; + this.averageLoadControl = averageLoadControl; + this.dutyCycleControl = dutyCycleControl; + this.powerSavingsControl = powerSavingsControl; + this.heatingSourceControl = heatingSourceControl; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(DURATION_ID, new UIntType(duration))); + values.add(new StructElement(CONTROL_ID, new UIntType(control))); + values.add(new StructElement(TEMPERATURE_CONTROL_ID, temperatureControl.map((nonOptionaltemperatureControl) -> nonOptionaltemperatureControl.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(AVERAGE_LOAD_CONTROL_ID, averageLoadControl.map((nonOptionalaverageLoadControl) -> nonOptionalaverageLoadControl.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(DUTY_CYCLE_CONTROL_ID, dutyCycleControl.map((nonOptionaldutyCycleControl) -> nonOptionaldutyCycleControl.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(POWER_SAVINGS_CONTROL_ID, powerSavingsControl.map((nonOptionalpowerSavingsControl) -> nonOptionalpowerSavingsControl.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(HEATING_SOURCE_CONTROL_ID, heatingSourceControl.map((nonOptionalheatingSourceControl) -> nonOptionalheatingSourceControl.encodeTlv()).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterLoadControlEventTransitionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer duration = null; + Integer control = null; + Optional temperatureControl = Optional.empty(); + Optional averageLoadControl = Optional.empty(); + Optional dutyCycleControl = Optional.empty(); + Optional powerSavingsControl = Optional.empty(); + Optional heatingSourceControl = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + duration = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + control = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == TEMPERATURE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + temperatureControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterTemperatureControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == AVERAGE_LOAD_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + averageLoadControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterAverageLoadControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == DUTY_CYCLE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + dutyCycleControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterDutyCycleControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == POWER_SAVINGS_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + powerSavingsControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterPowerSavingsControlStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == HEATING_SOURCE_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + heatingSourceControl = Optional.of(ChipStructs.DemandResponseLoadControlClusterHeatingSourceControlStruct.decodeTlv(castingValue)); + } + } + } + return new DemandResponseLoadControlClusterLoadControlEventTransitionStruct( + duration, + control, + temperatureControl, + averageLoadControl, + dutyCycleControl, + powerSavingsControl, + heatingSourceControl + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterLoadControlEventTransitionStruct {\n"); + output.append("\tduration: "); + output.append(duration); + output.append("\n"); + output.append("\tcontrol: "); + output.append(control); + output.append("\n"); + output.append("\ttemperatureControl: "); + output.append(temperatureControl); + output.append("\n"); + output.append("\taverageLoadControl: "); + output.append(averageLoadControl); + output.append("\n"); + output.append("\tdutyCycleControl: "); + output.append(dutyCycleControl); + output.append("\n"); + output.append("\tpowerSavingsControl: "); + output.append(powerSavingsControl); + output.append("\n"); + output.append("\theatingSourceControl: "); + output.append(heatingSourceControl); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterLoadControlEventStruct { + public byte[] eventID; + public @Nullable byte[] programID; + public Integer control; + public Long deviceClass; + public Optional enrollmentGroup; + public Integer criticality; + public @Nullable Long startTime; + public ArrayList transitions; + private static final long EVENT_I_D_ID = 0L; + private static final long PROGRAM_I_D_ID = 1L; + private static final long CONTROL_ID = 2L; + private static final long DEVICE_CLASS_ID = 3L; + private static final long ENROLLMENT_GROUP_ID = 4L; + private static final long CRITICALITY_ID = 5L; + private static final long START_TIME_ID = 6L; + private static final long TRANSITIONS_ID = 7L; + + public DemandResponseLoadControlClusterLoadControlEventStruct( + byte[] eventID, + @Nullable byte[] programID, + Integer control, + Long deviceClass, + Optional enrollmentGroup, + Integer criticality, + @Nullable Long startTime, + ArrayList transitions + ) { + this.eventID = eventID; + this.programID = programID; + this.control = control; + this.deviceClass = deviceClass; + this.enrollmentGroup = enrollmentGroup; + this.criticality = criticality; + this.startTime = startTime; + this.transitions = transitions; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(EVENT_I_D_ID, new ByteArrayType(eventID))); + values.add(new StructElement(PROGRAM_I_D_ID, programID != null ? new ByteArrayType(programID) : new NullType())); + values.add(new StructElement(CONTROL_ID, new UIntType(control))); + values.add(new StructElement(DEVICE_CLASS_ID, new UIntType(deviceClass))); + values.add(new StructElement(ENROLLMENT_GROUP_ID, enrollmentGroup.map((nonOptionalenrollmentGroup) -> new UIntType(nonOptionalenrollmentGroup)).orElse(new EmptyType()))); + values.add(new StructElement(CRITICALITY_ID, new UIntType(criticality))); + values.add(new StructElement(START_TIME_ID, startTime != null ? new UIntType(startTime) : new NullType())); + values.add(new StructElement(TRANSITIONS_ID, ArrayType.generateArrayType(transitions, (elementtransitions) -> elementtransitions.encodeTlv()))); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterLoadControlEventStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + byte[] eventID = null; + @Nullable byte[] programID = null; + Integer control = null; + Long deviceClass = null; + Optional enrollmentGroup = Optional.empty(); + Integer criticality = null; + @Nullable Long startTime = null; + ArrayList transitions = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == EVENT_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + eventID = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == PROGRAM_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + programID = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + control = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == DEVICE_CLASS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + deviceClass = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ENROLLMENT_GROUP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + enrollmentGroup = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == CRITICALITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + criticality = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == TRANSITIONS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + transitions = castingValue.map((elementcastingValue) -> ChipStructs.DemandResponseLoadControlClusterLoadControlEventTransitionStruct.decodeTlv(elementcastingValue)); + } + } + } + return new DemandResponseLoadControlClusterLoadControlEventStruct( + eventID, + programID, + control, + deviceClass, + enrollmentGroup, + criticality, + startTime, + transitions + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterLoadControlEventStruct {\n"); + output.append("\teventID: "); + output.append(Arrays.toString(eventID)); + output.append("\n"); + output.append("\tprogramID: "); + output.append(Arrays.toString(programID)); + output.append("\n"); + output.append("\tcontrol: "); + output.append(control); + output.append("\n"); + output.append("\tdeviceClass: "); + output.append(deviceClass); + output.append("\n"); + output.append("\tenrollmentGroup: "); + output.append(enrollmentGroup); + output.append("\n"); + output.append("\tcriticality: "); + output.append(criticality); + output.append("\n"); + output.append("\tstartTime: "); + output.append(startTime); + output.append("\n"); + output.append("\ttransitions: "); + output.append(transitions); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DemandResponseLoadControlClusterLoadControlProgramStruct { + public byte[] programID; + public String name; + public @Nullable Integer enrollmentGroup; + public @Nullable Integer randomStartMinutes; + public @Nullable Integer randomDurationMinutes; + private static final long PROGRAM_I_D_ID = 0L; + private static final long NAME_ID = 1L; + private static final long ENROLLMENT_GROUP_ID = 2L; + private static final long RANDOM_START_MINUTES_ID = 3L; + private static final long RANDOM_DURATION_MINUTES_ID = 4L; + + public DemandResponseLoadControlClusterLoadControlProgramStruct( + byte[] programID, + String name, + @Nullable Integer enrollmentGroup, + @Nullable Integer randomStartMinutes, + @Nullable Integer randomDurationMinutes + ) { + this.programID = programID; + this.name = name; + this.enrollmentGroup = enrollmentGroup; + this.randomStartMinutes = randomStartMinutes; + this.randomDurationMinutes = randomDurationMinutes; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PROGRAM_I_D_ID, new ByteArrayType(programID))); + values.add(new StructElement(NAME_ID, new StringType(name))); + values.add(new StructElement(ENROLLMENT_GROUP_ID, enrollmentGroup != null ? new UIntType(enrollmentGroup) : new NullType())); + values.add(new StructElement(RANDOM_START_MINUTES_ID, randomStartMinutes != null ? new UIntType(randomStartMinutes) : new NullType())); + values.add(new StructElement(RANDOM_DURATION_MINUTES_ID, randomDurationMinutes != null ? new UIntType(randomDurationMinutes) : new NullType())); + + return new StructType(values); + } + + public static DemandResponseLoadControlClusterLoadControlProgramStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + byte[] programID = null; + String name = null; + @Nullable Integer enrollmentGroup = null; + @Nullable Integer randomStartMinutes = null; + @Nullable Integer randomDurationMinutes = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PROGRAM_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + programID = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = castingValue.value(String.class); + } + } else if (element.contextTagNum() == ENROLLMENT_GROUP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + enrollmentGroup = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == RANDOM_START_MINUTES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + randomStartMinutes = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == RANDOM_DURATION_MINUTES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + randomDurationMinutes = castingValue.value(Integer.class); + } + } + } + return new DemandResponseLoadControlClusterLoadControlProgramStruct( + programID, + name, + enrollmentGroup, + randomStartMinutes, + randomDurationMinutes + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DemandResponseLoadControlClusterLoadControlProgramStruct {\n"); + output.append("\tprogramID: "); + output.append(Arrays.toString(programID)); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tenrollmentGroup: "); + output.append(enrollmentGroup); + output.append("\n"); + output.append("\trandomStartMinutes: "); + output.append(randomStartMinutes); + output.append("\n"); + output.append("\trandomDurationMinutes: "); + output.append(randomDurationMinutes); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterCostStruct { + public Integer costType; + public Long value; + public Integer decimalPoints; + public Optional currency; + private static final long COST_TYPE_ID = 0L; + private static final long VALUE_ID = 1L; + private static final long DECIMAL_POINTS_ID = 2L; + private static final long CURRENCY_ID = 3L; + + public DeviceEnergyManagementClusterCostStruct( + Integer costType, + Long value, + Integer decimalPoints, + Optional currency + ) { + this.costType = costType; + this.value = value; + this.decimalPoints = decimalPoints; + this.currency = currency; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(COST_TYPE_ID, new UIntType(costType))); + values.add(new StructElement(VALUE_ID, new IntType(value))); + values.add(new StructElement(DECIMAL_POINTS_ID, new UIntType(decimalPoints))); + values.add(new StructElement(CURRENCY_ID, currency.map((nonOptionalcurrency) -> new UIntType(nonOptionalcurrency)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterCostStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer costType = null; + Long value = null; + Integer decimalPoints = null; + Optional currency = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == COST_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + costType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == VALUE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + value = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DECIMAL_POINTS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + decimalPoints = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENCY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currency = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new DeviceEnergyManagementClusterCostStruct( + costType, + value, + decimalPoints, + currency + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterCostStruct {\n"); + output.append("\tcostType: "); + output.append(costType); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\tdecimalPoints: "); + output.append(decimalPoints); + output.append("\n"); + output.append("\tcurrency: "); + output.append(currency); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterSlotStruct { + public Long minDuration; + public Long maxDuration; + public Long defaultDuration; + public Long elapsedSlotTime; + public Long remainingSlotTime; + public Boolean slotIsPauseable; + public Long minPauseDuration; + public Long maxPauseDuration; + public Optional manufacturerESAState; + public Optional nominalPower; + public Optional minPower; + public Optional maxPower; + public Optional nominalEnergy; + public Optional> costs; + public Optional minPowerAdjustment; + public Optional maxPowerAdjustment; + public Optional minDurationAdjustment; + public Optional maxDurationAdjustment; + private static final long MIN_DURATION_ID = 0L; + private static final long MAX_DURATION_ID = 1L; + private static final long DEFAULT_DURATION_ID = 2L; + private static final long ELAPSED_SLOT_TIME_ID = 3L; + private static final long REMAINING_SLOT_TIME_ID = 4L; + private static final long SLOT_IS_PAUSEABLE_ID = 5L; + private static final long MIN_PAUSE_DURATION_ID = 6L; + private static final long MAX_PAUSE_DURATION_ID = 7L; + private static final long MANUFACTURER_E_S_A_STATE_ID = 8L; + private static final long NOMINAL_POWER_ID = 9L; + private static final long MIN_POWER_ID = 10L; + private static final long MAX_POWER_ID = 11L; + private static final long NOMINAL_ENERGY_ID = 12L; + private static final long COSTS_ID = 13L; + private static final long MIN_POWER_ADJUSTMENT_ID = 14L; + private static final long MAX_POWER_ADJUSTMENT_ID = 15L; + private static final long MIN_DURATION_ADJUSTMENT_ID = 16L; + private static final long MAX_DURATION_ADJUSTMENT_ID = 17L; + + public DeviceEnergyManagementClusterSlotStruct( + Long minDuration, + Long maxDuration, + Long defaultDuration, + Long elapsedSlotTime, + Long remainingSlotTime, + Boolean slotIsPauseable, + Long minPauseDuration, + Long maxPauseDuration, + Optional manufacturerESAState, + Optional nominalPower, + Optional minPower, + Optional maxPower, + Optional nominalEnergy, + Optional> costs, + Optional minPowerAdjustment, + Optional maxPowerAdjustment, + Optional minDurationAdjustment, + Optional maxDurationAdjustment + ) { + this.minDuration = minDuration; + this.maxDuration = maxDuration; + this.defaultDuration = defaultDuration; + this.elapsedSlotTime = elapsedSlotTime; + this.remainingSlotTime = remainingSlotTime; + this.slotIsPauseable = slotIsPauseable; + this.minPauseDuration = minPauseDuration; + this.maxPauseDuration = maxPauseDuration; + this.manufacturerESAState = manufacturerESAState; + this.nominalPower = nominalPower; + this.minPower = minPower; + this.maxPower = maxPower; + this.nominalEnergy = nominalEnergy; + this.costs = costs; + this.minPowerAdjustment = minPowerAdjustment; + this.maxPowerAdjustment = maxPowerAdjustment; + this.minDurationAdjustment = minDurationAdjustment; + this.maxDurationAdjustment = maxDurationAdjustment; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MIN_DURATION_ID, new UIntType(minDuration))); + values.add(new StructElement(MAX_DURATION_ID, new UIntType(maxDuration))); + values.add(new StructElement(DEFAULT_DURATION_ID, new UIntType(defaultDuration))); + values.add(new StructElement(ELAPSED_SLOT_TIME_ID, new UIntType(elapsedSlotTime))); + values.add(new StructElement(REMAINING_SLOT_TIME_ID, new UIntType(remainingSlotTime))); + values.add(new StructElement(SLOT_IS_PAUSEABLE_ID, new BooleanType(slotIsPauseable))); + values.add(new StructElement(MIN_PAUSE_DURATION_ID, new UIntType(minPauseDuration))); + values.add(new StructElement(MAX_PAUSE_DURATION_ID, new UIntType(maxPauseDuration))); + values.add(new StructElement(MANUFACTURER_E_S_A_STATE_ID, manufacturerESAState.map((nonOptionalmanufacturerESAState) -> new UIntType(nonOptionalmanufacturerESAState)).orElse(new EmptyType()))); + values.add(new StructElement(NOMINAL_POWER_ID, nominalPower.map((nonOptionalnominalPower) -> new IntType(nonOptionalnominalPower)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_POWER_ID, minPower.map((nonOptionalminPower) -> new IntType(nonOptionalminPower)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_POWER_ID, maxPower.map((nonOptionalmaxPower) -> new IntType(nonOptionalmaxPower)).orElse(new EmptyType()))); + values.add(new StructElement(NOMINAL_ENERGY_ID, nominalEnergy.map((nonOptionalnominalEnergy) -> new IntType(nonOptionalnominalEnergy)).orElse(new EmptyType()))); + values.add(new StructElement(COSTS_ID, costs.map((nonOptionalcosts) -> ArrayType.generateArrayType(nonOptionalcosts, (elementnonOptionalcosts) -> elementnonOptionalcosts.encodeTlv())).orElse(new EmptyType()))); + values.add(new StructElement(MIN_POWER_ADJUSTMENT_ID, minPowerAdjustment.map((nonOptionalminPowerAdjustment) -> new IntType(nonOptionalminPowerAdjustment)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_POWER_ADJUSTMENT_ID, maxPowerAdjustment.map((nonOptionalmaxPowerAdjustment) -> new IntType(nonOptionalmaxPowerAdjustment)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_DURATION_ADJUSTMENT_ID, minDurationAdjustment.map((nonOptionalminDurationAdjustment) -> new UIntType(nonOptionalminDurationAdjustment)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_DURATION_ADJUSTMENT_ID, maxDurationAdjustment.map((nonOptionalmaxDurationAdjustment) -> new UIntType(nonOptionalmaxDurationAdjustment)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterSlotStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long minDuration = null; + Long maxDuration = null; + Long defaultDuration = null; + Long elapsedSlotTime = null; + Long remainingSlotTime = null; + Boolean slotIsPauseable = null; + Long minPauseDuration = null; + Long maxPauseDuration = null; + Optional manufacturerESAState = Optional.empty(); + Optional nominalPower = Optional.empty(); + Optional minPower = Optional.empty(); + Optional maxPower = Optional.empty(); + Optional nominalEnergy = Optional.empty(); + Optional> costs = Optional.empty(); + Optional minPowerAdjustment = Optional.empty(); + Optional maxPowerAdjustment = Optional.empty(); + Optional minDurationAdjustment = Optional.empty(); + Optional maxDurationAdjustment = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MIN_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MAX_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DEFAULT_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + defaultDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ELAPSED_SLOT_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + elapsedSlotTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == REMAINING_SLOT_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + remainingSlotTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == SLOT_IS_PAUSEABLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + slotIsPauseable = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == MIN_PAUSE_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minPauseDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MAX_PAUSE_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxPauseDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MANUFACTURER_E_S_A_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + manufacturerESAState = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == NOMINAL_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + nominalPower = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MIN_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + minPower = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MAX_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + maxPower = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == NOMINAL_ENERGY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + nominalEnergy = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == COSTS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + costs = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.DeviceEnergyManagementClusterCostStruct.decodeTlv(elementcastingValue))); + } + } else if (element.contextTagNum() == MIN_POWER_ADJUSTMENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + minPowerAdjustment = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MAX_POWER_ADJUSTMENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + maxPowerAdjustment = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MIN_DURATION_ADJUSTMENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minDurationAdjustment = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MAX_DURATION_ADJUSTMENT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxDurationAdjustment = Optional.of(castingValue.value(Long.class)); + } + } + } + return new DeviceEnergyManagementClusterSlotStruct( + minDuration, + maxDuration, + defaultDuration, + elapsedSlotTime, + remainingSlotTime, + slotIsPauseable, + minPauseDuration, + maxPauseDuration, + manufacturerESAState, + nominalPower, + minPower, + maxPower, + nominalEnergy, + costs, + minPowerAdjustment, + maxPowerAdjustment, + minDurationAdjustment, + maxDurationAdjustment + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterSlotStruct {\n"); + output.append("\tminDuration: "); + output.append(minDuration); + output.append("\n"); + output.append("\tmaxDuration: "); + output.append(maxDuration); + output.append("\n"); + output.append("\tdefaultDuration: "); + output.append(defaultDuration); + output.append("\n"); + output.append("\telapsedSlotTime: "); + output.append(elapsedSlotTime); + output.append("\n"); + output.append("\tremainingSlotTime: "); + output.append(remainingSlotTime); + output.append("\n"); + output.append("\tslotIsPauseable: "); + output.append(slotIsPauseable); + output.append("\n"); + output.append("\tminPauseDuration: "); + output.append(minPauseDuration); + output.append("\n"); + output.append("\tmaxPauseDuration: "); + output.append(maxPauseDuration); + output.append("\n"); + output.append("\tmanufacturerESAState: "); + output.append(manufacturerESAState); + output.append("\n"); + output.append("\tnominalPower: "); + output.append(nominalPower); + output.append("\n"); + output.append("\tminPower: "); + output.append(minPower); + output.append("\n"); + output.append("\tmaxPower: "); + output.append(maxPower); + output.append("\n"); + output.append("\tnominalEnergy: "); + output.append(nominalEnergy); + output.append("\n"); + output.append("\tcosts: "); + output.append(costs); + output.append("\n"); + output.append("\tminPowerAdjustment: "); + output.append(minPowerAdjustment); + output.append("\n"); + output.append("\tmaxPowerAdjustment: "); + output.append(maxPowerAdjustment); + output.append("\n"); + output.append("\tminDurationAdjustment: "); + output.append(minDurationAdjustment); + output.append("\n"); + output.append("\tmaxDurationAdjustment: "); + output.append(maxDurationAdjustment); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterForecastStruct { + public Integer forecastId; + public @Nullable Integer activeSlotNumber; + public Long startTime; + public Long endTime; + public @Nullable Optional earliestStartTime; + public Optional latestEndTime; + public Boolean isPauseable; + public ArrayList slots; + private static final long FORECAST_ID_ID = 0L; + private static final long ACTIVE_SLOT_NUMBER_ID = 1L; + private static final long START_TIME_ID = 2L; + private static final long END_TIME_ID = 3L; + private static final long EARLIEST_START_TIME_ID = 4L; + private static final long LATEST_END_TIME_ID = 5L; + private static final long IS_PAUSEABLE_ID = 6L; + private static final long SLOTS_ID = 7L; + + public DeviceEnergyManagementClusterForecastStruct( + Integer forecastId, + @Nullable Integer activeSlotNumber, + Long startTime, + Long endTime, + @Nullable Optional earliestStartTime, + Optional latestEndTime, + Boolean isPauseable, + ArrayList slots + ) { + this.forecastId = forecastId; + this.activeSlotNumber = activeSlotNumber; + this.startTime = startTime; + this.endTime = endTime; + this.earliestStartTime = earliestStartTime; + this.latestEndTime = latestEndTime; + this.isPauseable = isPauseable; + this.slots = slots; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(FORECAST_ID_ID, new UIntType(forecastId))); + values.add(new StructElement(ACTIVE_SLOT_NUMBER_ID, activeSlotNumber != null ? new UIntType(activeSlotNumber) : new NullType())); + values.add(new StructElement(START_TIME_ID, new UIntType(startTime))); + values.add(new StructElement(END_TIME_ID, new UIntType(endTime))); + values.add(new StructElement(EARLIEST_START_TIME_ID, earliestStartTime != null ? earliestStartTime.map((nonOptionalearliestStartTime) -> new UIntType(nonOptionalearliestStartTime)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(LATEST_END_TIME_ID, latestEndTime.map((nonOptionallatestEndTime) -> new UIntType(nonOptionallatestEndTime)).orElse(new EmptyType()))); + values.add(new StructElement(IS_PAUSEABLE_ID, new BooleanType(isPauseable))); + values.add(new StructElement(SLOTS_ID, ArrayType.generateArrayType(slots, (elementslots) -> elementslots.encodeTlv()))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterForecastStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer forecastId = null; + @Nullable Integer activeSlotNumber = null; + Long startTime = null; + Long endTime = null; + @Nullable Optional earliestStartTime = null; + Optional latestEndTime = Optional.empty(); + Boolean isPauseable = null; + ArrayList slots = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == FORECAST_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + forecastId = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ACTIVE_SLOT_NUMBER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + activeSlotNumber = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == END_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == EARLIEST_START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + earliestStartTime = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == LATEST_END_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + latestEndTime = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == IS_PAUSEABLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + isPauseable = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == SLOTS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + slots = castingValue.map((elementcastingValue) -> ChipStructs.DeviceEnergyManagementClusterSlotStruct.decodeTlv(elementcastingValue)); + } + } + } + return new DeviceEnergyManagementClusterForecastStruct( + forecastId, + activeSlotNumber, + startTime, + endTime, + earliestStartTime, + latestEndTime, + isPauseable, + slots + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterForecastStruct {\n"); + output.append("\tforecastId: "); + output.append(forecastId); + output.append("\n"); + output.append("\tactiveSlotNumber: "); + output.append(activeSlotNumber); + output.append("\n"); + output.append("\tstartTime: "); + output.append(startTime); + output.append("\n"); + output.append("\tendTime: "); + output.append(endTime); + output.append("\n"); + output.append("\tearliestStartTime: "); + output.append(earliestStartTime); + output.append("\n"); + output.append("\tlatestEndTime: "); + output.append(latestEndTime); + output.append("\n"); + output.append("\tisPauseable: "); + output.append(isPauseable); + output.append("\n"); + output.append("\tslots: "); + output.append(slots); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterConstraintsStruct { + public Long startTime; + public Long duration; + public Optional nominalPower; + public Optional maximumEnergy; + public Optional loadControl; + private static final long START_TIME_ID = 0L; + private static final long DURATION_ID = 1L; + private static final long NOMINAL_POWER_ID = 2L; + private static final long MAXIMUM_ENERGY_ID = 3L; + private static final long LOAD_CONTROL_ID = 4L; + + public DeviceEnergyManagementClusterConstraintsStruct( + Long startTime, + Long duration, + Optional nominalPower, + Optional maximumEnergy, + Optional loadControl + ) { + this.startTime = startTime; + this.duration = duration; + this.nominalPower = nominalPower; + this.maximumEnergy = maximumEnergy; + this.loadControl = loadControl; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(START_TIME_ID, new UIntType(startTime))); + values.add(new StructElement(DURATION_ID, new UIntType(duration))); + values.add(new StructElement(NOMINAL_POWER_ID, nominalPower.map((nonOptionalnominalPower) -> new IntType(nonOptionalnominalPower)).orElse(new EmptyType()))); + values.add(new StructElement(MAXIMUM_ENERGY_ID, maximumEnergy.map((nonOptionalmaximumEnergy) -> new IntType(nonOptionalmaximumEnergy)).orElse(new EmptyType()))); + values.add(new StructElement(LOAD_CONTROL_ID, loadControl.map((nonOptionalloadControl) -> new IntType(nonOptionalloadControl)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterConstraintsStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long startTime = null; + Long duration = null; + Optional nominalPower = Optional.empty(); + Optional maximumEnergy = Optional.empty(); + Optional loadControl = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + duration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == NOMINAL_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + nominalPower = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MAXIMUM_ENERGY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + maximumEnergy = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == LOAD_CONTROL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + loadControl = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new DeviceEnergyManagementClusterConstraintsStruct( + startTime, + duration, + nominalPower, + maximumEnergy, + loadControl + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterConstraintsStruct {\n"); + output.append("\tstartTime: "); + output.append(startTime); + output.append("\n"); + output.append("\tduration: "); + output.append(duration); + output.append("\n"); + output.append("\tnominalPower: "); + output.append(nominalPower); + output.append("\n"); + output.append("\tmaximumEnergy: "); + output.append(maximumEnergy); + output.append("\n"); + output.append("\tloadControl: "); + output.append(loadControl); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterPowerAdjustStruct { + public Long minPower; + public Long maxPower; + public Long minDuration; + public Long maxDuration; + private static final long MIN_POWER_ID = 0L; + private static final long MAX_POWER_ID = 1L; + private static final long MIN_DURATION_ID = 2L; + private static final long MAX_DURATION_ID = 3L; + + public DeviceEnergyManagementClusterPowerAdjustStruct( + Long minPower, + Long maxPower, + Long minDuration, + Long maxDuration + ) { + this.minPower = minPower; + this.maxPower = maxPower; + this.minDuration = minDuration; + this.maxDuration = maxDuration; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MIN_POWER_ID, new IntType(minPower))); + values.add(new StructElement(MAX_POWER_ID, new IntType(maxPower))); + values.add(new StructElement(MIN_DURATION_ID, new UIntType(minDuration))); + values.add(new StructElement(MAX_DURATION_ID, new UIntType(maxDuration))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterPowerAdjustStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long minPower = null; + Long maxPower = null; + Long minDuration = null; + Long maxDuration = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MIN_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + minPower = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MAX_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + maxPower = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MIN_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MAX_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxDuration = castingValue.value(Long.class); + } + } + } + return new DeviceEnergyManagementClusterPowerAdjustStruct( + minPower, + maxPower, + minDuration, + maxDuration + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterPowerAdjustStruct {\n"); + output.append("\tminPower: "); + output.append(minPower); + output.append("\n"); + output.append("\tmaxPower: "); + output.append(maxPower); + output.append("\n"); + output.append("\tminDuration: "); + output.append(minDuration); + output.append("\n"); + output.append("\tmaxDuration: "); + output.append(maxDuration); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DeviceEnergyManagementClusterSlotAdjustmentStruct { + public Integer slotIndex; + public Long nominalPower; + public Long duration; + private static final long SLOT_INDEX_ID = 0L; + private static final long NOMINAL_POWER_ID = 1L; + private static final long DURATION_ID = 2L; + + public DeviceEnergyManagementClusterSlotAdjustmentStruct( + Integer slotIndex, + Long nominalPower, + Long duration + ) { + this.slotIndex = slotIndex; + this.nominalPower = nominalPower; + this.duration = duration; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SLOT_INDEX_ID, new UIntType(slotIndex))); + values.add(new StructElement(NOMINAL_POWER_ID, new IntType(nominalPower))); + values.add(new StructElement(DURATION_ID, new UIntType(duration))); + + return new StructType(values); + } + + public static DeviceEnergyManagementClusterSlotAdjustmentStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer slotIndex = null; + Long nominalPower = null; + Long duration = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SLOT_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + slotIndex = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NOMINAL_POWER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + nominalPower = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + duration = castingValue.value(Long.class); + } + } + } + return new DeviceEnergyManagementClusterSlotAdjustmentStruct( + slotIndex, + nominalPower, + duration + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DeviceEnergyManagementClusterSlotAdjustmentStruct {\n"); + output.append("\tslotIndex: "); + output.append(slotIndex); + output.append("\n"); + output.append("\tnominalPower: "); + output.append(nominalPower); + output.append("\n"); + output.append("\tduration: "); + output.append(duration); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class EnergyEvseClusterChargingTargetStruct { + public Integer targetTimeMinutesPastMidnight; + public Optional targetSoC; + public Optional addedEnergy; + private static final long TARGET_TIME_MINUTES_PAST_MIDNIGHT_ID = 0L; + private static final long TARGET_SO_C_ID = 1L; + private static final long ADDED_ENERGY_ID = 2L; + + public EnergyEvseClusterChargingTargetStruct( + Integer targetTimeMinutesPastMidnight, + Optional targetSoC, + Optional addedEnergy + ) { + this.targetTimeMinutesPastMidnight = targetTimeMinutesPastMidnight; + this.targetSoC = targetSoC; + this.addedEnergy = addedEnergy; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(TARGET_TIME_MINUTES_PAST_MIDNIGHT_ID, new UIntType(targetTimeMinutesPastMidnight))); + values.add(new StructElement(TARGET_SO_C_ID, targetSoC.map((nonOptionaltargetSoC) -> new UIntType(nonOptionaltargetSoC)).orElse(new EmptyType()))); + values.add(new StructElement(ADDED_ENERGY_ID, addedEnergy.map((nonOptionaladdedEnergy) -> new IntType(nonOptionaladdedEnergy)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static EnergyEvseClusterChargingTargetStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer targetTimeMinutesPastMidnight = null; + Optional targetSoC = Optional.empty(); + Optional addedEnergy = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == TARGET_TIME_MINUTES_PAST_MIDNIGHT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + targetTimeMinutesPastMidnight = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == TARGET_SO_C_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + targetSoC = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == ADDED_ENERGY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + addedEnergy = Optional.of(castingValue.value(Long.class)); + } + } + } + return new EnergyEvseClusterChargingTargetStruct( + targetTimeMinutesPastMidnight, + targetSoC, + addedEnergy + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("EnergyEvseClusterChargingTargetStruct {\n"); + output.append("\ttargetTimeMinutesPastMidnight: "); + output.append(targetTimeMinutesPastMidnight); + output.append("\n"); + output.append("\ttargetSoC: "); + output.append(targetSoC); + output.append("\n"); + output.append("\taddedEnergy: "); + output.append(addedEnergy); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class DoorLockClusterCredentialStruct { + public Integer credentialType; + public Integer credentialIndex; + private static final long CREDENTIAL_TYPE_ID = 0L; + private static final long CREDENTIAL_INDEX_ID = 1L; + + public DoorLockClusterCredentialStruct( + Integer credentialType, + Integer credentialIndex + ) { + this.credentialType = credentialType; + this.credentialIndex = credentialIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CREDENTIAL_TYPE_ID, new UIntType(credentialType))); + values.add(new StructElement(CREDENTIAL_INDEX_ID, new UIntType(credentialIndex))); + + return new StructType(values); + } + + public static DoorLockClusterCredentialStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer credentialType = null; + Integer credentialIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CREDENTIAL_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + credentialType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CREDENTIAL_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + credentialIndex = castingValue.value(Integer.class); + } + } + } + return new DoorLockClusterCredentialStruct( + credentialType, + credentialIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DoorLockClusterCredentialStruct {\n"); + output.append("\tcredentialType: "); + output.append(credentialType); + output.append("\n"); + output.append("\tcredentialIndex: "); + output.append(credentialIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterWeeklyScheduleTransitionStruct { + public Integer transitionTime; + public @Nullable Integer heatSetpoint; + public @Nullable Integer coolSetpoint; + private static final long TRANSITION_TIME_ID = 0L; + private static final long HEAT_SETPOINT_ID = 1L; + private static final long COOL_SETPOINT_ID = 2L; + + public ThermostatClusterWeeklyScheduleTransitionStruct( + Integer transitionTime, + @Nullable Integer heatSetpoint, + @Nullable Integer coolSetpoint + ) { + this.transitionTime = transitionTime; + this.heatSetpoint = heatSetpoint; + this.coolSetpoint = coolSetpoint; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(TRANSITION_TIME_ID, new UIntType(transitionTime))); + values.add(new StructElement(HEAT_SETPOINT_ID, heatSetpoint != null ? new IntType(heatSetpoint) : new NullType())); + values.add(new StructElement(COOL_SETPOINT_ID, coolSetpoint != null ? new IntType(coolSetpoint) : new NullType())); + + return new StructType(values); + } + + public static ThermostatClusterWeeklyScheduleTransitionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer transitionTime = null; + @Nullable Integer heatSetpoint = null; + @Nullable Integer coolSetpoint = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == TRANSITION_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionTime = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == HEAT_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + heatSetpoint = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == COOL_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + coolSetpoint = castingValue.value(Integer.class); + } + } + } + return new ThermostatClusterWeeklyScheduleTransitionStruct( + transitionTime, + heatSetpoint, + coolSetpoint + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterWeeklyScheduleTransitionStruct {\n"); + output.append("\ttransitionTime: "); + output.append(transitionTime); + output.append("\n"); + output.append("\theatSetpoint: "); + output.append(heatSetpoint); + output.append("\n"); + output.append("\tcoolSetpoint: "); + output.append(coolSetpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterProgramCastStruct { + public String name; + public String role; + private static final long NAME_ID = 0L; + private static final long ROLE_ID = 1L; + + public ChannelClusterProgramCastStruct( + String name, + String role + ) { + this.name = name; + this.role = role; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(NAME_ID, new StringType(name))); + values.add(new StructElement(ROLE_ID, new StringType(role))); + + return new StructType(values); + } + + public static ChannelClusterProgramCastStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String name = null; + String role = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = castingValue.value(String.class); + } + } else if (element.contextTagNum() == ROLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + role = castingValue.value(String.class); + } + } + } + return new ChannelClusterProgramCastStruct( + name, + role + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterProgramCastStruct {\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\trole: "); + output.append(role); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterProgramCategoryStruct { + public String category; + public Optional subCategory; + private static final long CATEGORY_ID = 0L; + private static final long SUB_CATEGORY_ID = 1L; + + public ChannelClusterProgramCategoryStruct( + String category, + Optional subCategory + ) { + this.category = category; + this.subCategory = subCategory; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CATEGORY_ID, new StringType(category))); + values.add(new StructElement(SUB_CATEGORY_ID, subCategory.map((nonOptionalsubCategory) -> new StringType(nonOptionalsubCategory)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ChannelClusterProgramCategoryStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String category = null; + Optional subCategory = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CATEGORY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + category = castingValue.value(String.class); + } + } else if (element.contextTagNum() == SUB_CATEGORY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + subCategory = Optional.of(castingValue.value(String.class)); + } + } + } + return new ChannelClusterProgramCategoryStruct( + category, + subCategory + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterProgramCategoryStruct {\n"); + output.append("\tcategory: "); + output.append(category); + output.append("\n"); + output.append("\tsubCategory: "); + output.append(subCategory); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterSeriesInfoStruct { + public String season; + public String episode; + private static final long SEASON_ID = 0L; + private static final long EPISODE_ID = 1L; + + public ChannelClusterSeriesInfoStruct( + String season, + String episode + ) { + this.season = season; + this.episode = episode; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SEASON_ID, new StringType(season))); + values.add(new StructElement(EPISODE_ID, new StringType(episode))); + + return new StructType(values); + } + + public static ChannelClusterSeriesInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String season = null; + String episode = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SEASON_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + season = castingValue.value(String.class); + } + } else if (element.contextTagNum() == EPISODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + episode = castingValue.value(String.class); + } + } + } + return new ChannelClusterSeriesInfoStruct( + season, + episode + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterSeriesInfoStruct {\n"); + output.append("\tseason: "); + output.append(season); + output.append("\n"); + output.append("\tepisode: "); + output.append(episode); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterChannelInfoStruct { + public Integer majorNumber; + public Integer minorNumber; + public Optional name; + public Optional callSign; + public Optional affiliateCallSign; + public Optional identifier; + public Optional type; + private static final long MAJOR_NUMBER_ID = 0L; + private static final long MINOR_NUMBER_ID = 1L; + private static final long NAME_ID = 2L; + private static final long CALL_SIGN_ID = 3L; + private static final long AFFILIATE_CALL_SIGN_ID = 4L; + private static final long IDENTIFIER_ID = 5L; + private static final long TYPE_ID = 6L; + + public ChannelClusterChannelInfoStruct( + Integer majorNumber, + Integer minorNumber, + Optional name, + Optional callSign, + Optional affiliateCallSign, + Optional identifier, + Optional type + ) { + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.name = name; + this.callSign = callSign; + this.affiliateCallSign = affiliateCallSign; + this.identifier = identifier; + this.type = type; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MAJOR_NUMBER_ID, new UIntType(majorNumber))); + values.add(new StructElement(MINOR_NUMBER_ID, new UIntType(minorNumber))); + values.add(new StructElement(NAME_ID, name.map((nonOptionalname) -> new StringType(nonOptionalname)).orElse(new EmptyType()))); + values.add(new StructElement(CALL_SIGN_ID, callSign.map((nonOptionalcallSign) -> new StringType(nonOptionalcallSign)).orElse(new EmptyType()))); + values.add(new StructElement(AFFILIATE_CALL_SIGN_ID, affiliateCallSign.map((nonOptionalaffiliateCallSign) -> new StringType(nonOptionalaffiliateCallSign)).orElse(new EmptyType()))); + values.add(new StructElement(IDENTIFIER_ID, identifier.map((nonOptionalidentifier) -> new StringType(nonOptionalidentifier)).orElse(new EmptyType()))); + values.add(new StructElement(TYPE_ID, type.map((nonOptionaltype) -> new UIntType(nonOptionaltype)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ChannelClusterChannelInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer majorNumber = null; + Integer minorNumber = null; + Optional name = Optional.empty(); + Optional callSign = Optional.empty(); + Optional affiliateCallSign = Optional.empty(); + Optional identifier = Optional.empty(); + Optional type = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MAJOR_NUMBER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + majorNumber = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MINOR_NUMBER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minorNumber = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == CALL_SIGN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + callSign = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == AFFILIATE_CALL_SIGN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + affiliateCallSign = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == IDENTIFIER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + identifier = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + type = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign, + identifier, + type + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterChannelInfoStruct {\n"); + output.append("\tmajorNumber: "); + output.append(majorNumber); + output.append("\n"); + output.append("\tminorNumber: "); + output.append(minorNumber); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tcallSign: "); + output.append(callSign); + output.append("\n"); + output.append("\taffiliateCallSign: "); + output.append(affiliateCallSign); + output.append("\n"); + output.append("\tidentifier: "); + output.append(identifier); + output.append("\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterProgramStruct { + public String identifier; + public ChipStructs.ChannelClusterChannelInfoStruct channel; + public Long startTime; + public Long endTime; + public String title; + public Optional subtitle; + public Optional description; + public Optional> audioLanguages; + public Optional> ratings; + public Optional thumbnailUrl; + public Optional posterArtUrl; + public Optional dvbiUrl; + public Optional releaseDate; + public Optional parentalGuidanceText; + public Optional recordingFlag; + public @Nullable Optional seriesInfo; + public Optional> categoryList; + public Optional> castList; + public Optional> externalIDList; + private static final long IDENTIFIER_ID = 0L; + private static final long CHANNEL_ID = 1L; + private static final long START_TIME_ID = 2L; + private static final long END_TIME_ID = 3L; + private static final long TITLE_ID = 4L; + private static final long SUBTITLE_ID = 5L; + private static final long DESCRIPTION_ID = 6L; + private static final long AUDIO_LANGUAGES_ID = 7L; + private static final long RATINGS_ID = 8L; + private static final long THUMBNAIL_URL_ID = 9L; + private static final long POSTER_ART_URL_ID = 10L; + private static final long DVBI_URL_ID = 11L; + private static final long RELEASE_DATE_ID = 12L; + private static final long PARENTAL_GUIDANCE_TEXT_ID = 13L; + private static final long RECORDING_FLAG_ID = 14L; + private static final long SERIES_INFO_ID = 15L; + private static final long CATEGORY_LIST_ID = 16L; + private static final long CAST_LIST_ID = 17L; + private static final long EXTERNAL_I_D_LIST_ID = 18L; + + public ChannelClusterProgramStruct( + String identifier, + ChipStructs.ChannelClusterChannelInfoStruct channel, + Long startTime, + Long endTime, + String title, + Optional subtitle, + Optional description, + Optional> audioLanguages, + Optional> ratings, + Optional thumbnailUrl, + Optional posterArtUrl, + Optional dvbiUrl, + Optional releaseDate, + Optional parentalGuidanceText, + Optional recordingFlag, + @Nullable Optional seriesInfo, + Optional> categoryList, + Optional> castList, + Optional> externalIDList + ) { + this.identifier = identifier; + this.channel = channel; + this.startTime = startTime; + this.endTime = endTime; + this.title = title; + this.subtitle = subtitle; + this.description = description; + this.audioLanguages = audioLanguages; + this.ratings = ratings; + this.thumbnailUrl = thumbnailUrl; + this.posterArtUrl = posterArtUrl; + this.dvbiUrl = dvbiUrl; + this.releaseDate = releaseDate; + this.parentalGuidanceText = parentalGuidanceText; + this.recordingFlag = recordingFlag; + this.seriesInfo = seriesInfo; + this.categoryList = categoryList; + this.castList = castList; + this.externalIDList = externalIDList; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(IDENTIFIER_ID, new StringType(identifier))); + values.add(new StructElement(CHANNEL_ID, channel.encodeTlv())); + values.add(new StructElement(START_TIME_ID, new UIntType(startTime))); + values.add(new StructElement(END_TIME_ID, new UIntType(endTime))); + values.add(new StructElement(TITLE_ID, new StringType(title))); + values.add(new StructElement(SUBTITLE_ID, subtitle.map((nonOptionalsubtitle) -> new StringType(nonOptionalsubtitle)).orElse(new EmptyType()))); + values.add(new StructElement(DESCRIPTION_ID, description.map((nonOptionaldescription) -> new StringType(nonOptionaldescription)).orElse(new EmptyType()))); + values.add(new StructElement(AUDIO_LANGUAGES_ID, audioLanguages.map((nonOptionalaudioLanguages) -> ArrayType.generateArrayType(nonOptionalaudioLanguages, (elementnonOptionalaudioLanguages) -> new StringType(elementnonOptionalaudioLanguages))).orElse(new EmptyType()))); + values.add(new StructElement(RATINGS_ID, ratings.map((nonOptionalratings) -> ArrayType.generateArrayType(nonOptionalratings, (elementnonOptionalratings) -> new StringType(elementnonOptionalratings))).orElse(new EmptyType()))); + values.add(new StructElement(THUMBNAIL_URL_ID, thumbnailUrl.map((nonOptionalthumbnailUrl) -> new StringType(nonOptionalthumbnailUrl)).orElse(new EmptyType()))); + values.add(new StructElement(POSTER_ART_URL_ID, posterArtUrl.map((nonOptionalposterArtUrl) -> new StringType(nonOptionalposterArtUrl)).orElse(new EmptyType()))); + values.add(new StructElement(DVBI_URL_ID, dvbiUrl.map((nonOptionaldvbiUrl) -> new StringType(nonOptionaldvbiUrl)).orElse(new EmptyType()))); + values.add(new StructElement(RELEASE_DATE_ID, releaseDate.map((nonOptionalreleaseDate) -> new StringType(nonOptionalreleaseDate)).orElse(new EmptyType()))); + values.add(new StructElement(PARENTAL_GUIDANCE_TEXT_ID, parentalGuidanceText.map((nonOptionalparentalGuidanceText) -> new StringType(nonOptionalparentalGuidanceText)).orElse(new EmptyType()))); + values.add(new StructElement(RECORDING_FLAG_ID, recordingFlag.map((nonOptionalrecordingFlag) -> new UIntType(nonOptionalrecordingFlag)).orElse(new EmptyType()))); + values.add(new StructElement(SERIES_INFO_ID, seriesInfo != null ? seriesInfo.map((nonOptionalseriesInfo) -> nonOptionalseriesInfo.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(CATEGORY_LIST_ID, categoryList.map((nonOptionalcategoryList) -> ArrayType.generateArrayType(nonOptionalcategoryList, (elementnonOptionalcategoryList) -> elementnonOptionalcategoryList.encodeTlv())).orElse(new EmptyType()))); + values.add(new StructElement(CAST_LIST_ID, castList.map((nonOptionalcastList) -> ArrayType.generateArrayType(nonOptionalcastList, (elementnonOptionalcastList) -> elementnonOptionalcastList.encodeTlv())).orElse(new EmptyType()))); + values.add(new StructElement(EXTERNAL_I_D_LIST_ID, externalIDList.map((nonOptionalexternalIDList) -> ArrayType.generateArrayType(nonOptionalexternalIDList, (elementnonOptionalexternalIDList) -> elementnonOptionalexternalIDList.encodeTlv())).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ChannelClusterProgramStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String identifier = null; + ChipStructs.ChannelClusterChannelInfoStruct channel = null; + Long startTime = null; + Long endTime = null; + String title = null; + Optional subtitle = Optional.empty(); + Optional description = Optional.empty(); + Optional> audioLanguages = Optional.empty(); + Optional> ratings = Optional.empty(); + Optional thumbnailUrl = Optional.empty(); + Optional posterArtUrl = Optional.empty(); + Optional dvbiUrl = Optional.empty(); + Optional releaseDate = Optional.empty(); + Optional parentalGuidanceText = Optional.empty(); + Optional recordingFlag = Optional.empty(); + @Nullable Optional seriesInfo = null; + Optional> categoryList = Optional.empty(); + Optional> castList = Optional.empty(); + Optional> externalIDList = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == IDENTIFIER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + identifier = castingValue.value(String.class); + } + } else if (element.contextTagNum() == CHANNEL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + channel = ChipStructs.ChannelClusterChannelInfoStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == START_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == END_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endTime = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == TITLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + title = castingValue.value(String.class); + } + } else if (element.contextTagNum() == SUBTITLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + subtitle = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == DESCRIPTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + description = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == AUDIO_LANGUAGES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + audioLanguages = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(String.class))); + } + } else if (element.contextTagNum() == RATINGS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + ratings = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(String.class))); + } + } else if (element.contextTagNum() == THUMBNAIL_URL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + thumbnailUrl = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == POSTER_ART_URL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + posterArtUrl = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == DVBI_URL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + dvbiUrl = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == RELEASE_DATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + releaseDate = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == PARENTAL_GUIDANCE_TEXT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + parentalGuidanceText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == RECORDING_FLAG_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + recordingFlag = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == SERIES_INFO_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + seriesInfo = Optional.of(ChipStructs.ChannelClusterSeriesInfoStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == CATEGORY_LIST_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + categoryList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterProgramCategoryStruct.decodeTlv(elementcastingValue))); + } + } else if (element.contextTagNum() == CAST_LIST_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + castList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterProgramCastStruct.decodeTlv(elementcastingValue))); + } + } else if (element.contextTagNum() == EXTERNAL_I_D_LIST_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + externalIDList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterProgramCastStruct.decodeTlv(elementcastingValue))); + } + } + } + return new ChannelClusterProgramStruct( + identifier, + channel, + startTime, + endTime, + title, + subtitle, + description, + audioLanguages, + ratings, + thumbnailUrl, + posterArtUrl, + dvbiUrl, + releaseDate, + parentalGuidanceText, + recordingFlag, + seriesInfo, + categoryList, + castList, + externalIDList + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterProgramStruct {\n"); + output.append("\tidentifier: "); + output.append(identifier); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tstartTime: "); + output.append(startTime); + output.append("\n"); + output.append("\tendTime: "); + output.append(endTime); + output.append("\n"); + output.append("\ttitle: "); + output.append(title); + output.append("\n"); + output.append("\tsubtitle: "); + output.append(subtitle); + output.append("\n"); + output.append("\tdescription: "); + output.append(description); + output.append("\n"); + output.append("\taudioLanguages: "); + output.append(audioLanguages); + output.append("\n"); + output.append("\tratings: "); + output.append(ratings); + output.append("\n"); + output.append("\tthumbnailUrl: "); + output.append(thumbnailUrl); + output.append("\n"); + output.append("\tposterArtUrl: "); + output.append(posterArtUrl); + output.append("\n"); + output.append("\tdvbiUrl: "); + output.append(dvbiUrl); + output.append("\n"); + output.append("\treleaseDate: "); + output.append(releaseDate); + output.append("\n"); + output.append("\tparentalGuidanceText: "); + output.append(parentalGuidanceText); + output.append("\n"); + output.append("\trecordingFlag: "); + output.append(recordingFlag); + output.append("\n"); + output.append("\tseriesInfo: "); + output.append(seriesInfo); + output.append("\n"); + output.append("\tcategoryList: "); + output.append(categoryList); + output.append("\n"); + output.append("\tcastList: "); + output.append(castList); + output.append("\n"); + output.append("\texternalIDList: "); + output.append(externalIDList); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterPageTokenStruct { + public Optional limit; + public Optional after; + public Optional before; + private static final long LIMIT_ID = 0L; + private static final long AFTER_ID = 1L; + private static final long BEFORE_ID = 2L; + + public ChannelClusterPageTokenStruct( + Optional limit, + Optional after, + Optional before + ) { + this.limit = limit; + this.after = after; + this.before = before; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LIMIT_ID, limit.map((nonOptionallimit) -> new UIntType(nonOptionallimit)).orElse(new EmptyType()))); + values.add(new StructElement(AFTER_ID, after.map((nonOptionalafter) -> new StringType(nonOptionalafter)).orElse(new EmptyType()))); + values.add(new StructElement(BEFORE_ID, before.map((nonOptionalbefore) -> new StringType(nonOptionalbefore)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ChannelClusterPageTokenStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional limit = Optional.empty(); + Optional after = Optional.empty(); + Optional before = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LIMIT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + limit = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == AFTER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + after = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == BEFORE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + before = Optional.of(castingValue.value(String.class)); + } + } + } + return new ChannelClusterPageTokenStruct( + limit, + after, + before + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterPageTokenStruct {\n"); + output.append("\tlimit: "); + output.append(limit); + output.append("\n"); + output.append("\tafter: "); + output.append(after); + output.append("\n"); + output.append("\tbefore: "); + output.append(before); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterChannelPagingStruct { + public @Nullable Optional previousToken; + public @Nullable Optional nextToken; + private static final long PREVIOUS_TOKEN_ID = 0L; + private static final long NEXT_TOKEN_ID = 1L; + + public ChannelClusterChannelPagingStruct( + @Nullable Optional previousToken, + @Nullable Optional nextToken + ) { + this.previousToken = previousToken; + this.nextToken = nextToken; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PREVIOUS_TOKEN_ID, previousToken != null ? previousToken.map((nonOptionalpreviousToken) -> nonOptionalpreviousToken.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(NEXT_TOKEN_ID, nextToken != null ? nextToken.map((nonOptionalnextToken) -> nonOptionalnextToken.encodeTlv()).orElse(new EmptyType()) : new NullType())); + + return new StructType(values); + } + + public static ChannelClusterChannelPagingStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable Optional previousToken = null; + @Nullable Optional nextToken = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PREVIOUS_TOKEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + previousToken = Optional.of(ChipStructs.ChannelClusterPageTokenStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == NEXT_TOKEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + nextToken = Optional.of(ChipStructs.ChannelClusterPageTokenStruct.decodeTlv(castingValue)); + } + } + } + return new ChannelClusterChannelPagingStruct( + previousToken, + nextToken + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterChannelPagingStruct {\n"); + output.append("\tpreviousToken: "); + output.append(previousToken); + output.append("\n"); + output.append("\tnextToken: "); + output.append(nextToken); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ChannelClusterAdditionalInfoStruct { + public String name; + public String value; + private static final long NAME_ID = 0L; + private static final long VALUE_ID = 1L; - public ChannelClusterChannelInfoStruct( - Integer majorNumber, - Integer minorNumber, - Optional name, - Optional callSign, - Optional affiliateCallSign + public ChannelClusterAdditionalInfoStruct( + String name, + String value ) { - this.majorNumber = majorNumber; - this.minorNumber = minorNumber; this.name = name; - this.callSign = callSign; - this.affiliateCallSign = affiliateCallSign; + this.value = value; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(MAJOR_NUMBER_ID, new UIntType(majorNumber))); - values.add(new StructElement(MINOR_NUMBER_ID, new UIntType(minorNumber))); - values.add(new StructElement(NAME_ID, name.map((nonOptionalname) -> new StringType(nonOptionalname)).orElse(new EmptyType()))); - values.add(new StructElement(CALL_SIGN_ID, callSign.map((nonOptionalcallSign) -> new StringType(nonOptionalcallSign)).orElse(new EmptyType()))); - values.add(new StructElement(AFFILIATE_CALL_SIGN_ID, affiliateCallSign.map((nonOptionalaffiliateCallSign) -> new StringType(nonOptionalaffiliateCallSign)).orElse(new EmptyType()))); + values.add(new StructElement(NAME_ID, new StringType(name))); + values.add(new StructElement(VALUE_ID, new StringType(value))); return new StructType(values); } - public static ChannelClusterChannelInfoStruct decodeTlv(BaseTLVType tlvValue) { + public static ChannelClusterAdditionalInfoStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Integer majorNumber = null; - Integer minorNumber = null; - Optional name = Optional.empty(); - Optional callSign = Optional.empty(); - Optional affiliateCallSign = Optional.empty(); + String name = null; + String value = null; for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == MAJOR_NUMBER_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - majorNumber = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == MINOR_NUMBER_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - minorNumber = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == NAME_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - name = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == CALL_SIGN_ID) { + if (element.contextTagNum() == NAME_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - callSign = Optional.of(castingValue.value(String.class)); + name = castingValue.value(String.class); } - } else if (element.contextTagNum() == AFFILIATE_CALL_SIGN_ID) { + } else if (element.contextTagNum() == VALUE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - affiliateCallSign = Optional.of(castingValue.value(String.class)); + value = castingValue.value(String.class); } } } - return new ChannelClusterChannelInfoStruct( - majorNumber, - minorNumber, + return new ChannelClusterAdditionalInfoStruct( name, - callSign, - affiliateCallSign + value ); } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ChannelClusterChannelInfoStruct {\n"); - output.append("\tmajorNumber: "); - output.append(majorNumber); - output.append("\n"); - output.append("\tminorNumber: "); - output.append(minorNumber); - output.append("\n"); + output.append("ChannelClusterAdditionalInfoStruct {\n"); output.append("\tname: "); output.append(name); output.append("\n"); - output.append("\tcallSign: "); - output.append(callSign); - output.append("\n"); - output.append("\taffiliateCallSign: "); - output.append(affiliateCallSign); + output.append("\tvalue: "); + output.append(value); output.append("\n"); output.append("}\n"); return output.toString(); @@ -5565,6 +8473,128 @@ public String toString() { return output.toString(); } } +public static class MediaPlaybackClusterTrackAttributesStruct { + public String languageCode; + public @Nullable Optional displayName; + private static final long LANGUAGE_CODE_ID = 0L; + private static final long DISPLAY_NAME_ID = 1L; + + public MediaPlaybackClusterTrackAttributesStruct( + String languageCode, + @Nullable Optional displayName + ) { + this.languageCode = languageCode; + this.displayName = displayName; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LANGUAGE_CODE_ID, new StringType(languageCode))); + values.add(new StructElement(DISPLAY_NAME_ID, displayName != null ? displayName.map((nonOptionaldisplayName) -> new StringType(nonOptionaldisplayName)).orElse(new EmptyType()) : new NullType())); + + return new StructType(values); + } + + public static MediaPlaybackClusterTrackAttributesStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String languageCode = null; + @Nullable Optional displayName = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LANGUAGE_CODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + languageCode = castingValue.value(String.class); + } + } else if (element.contextTagNum() == DISPLAY_NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + displayName = Optional.of(castingValue.value(String.class)); + } + } + } + return new MediaPlaybackClusterTrackAttributesStruct( + languageCode, + displayName + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("MediaPlaybackClusterTrackAttributesStruct {\n"); + output.append("\tlanguageCode: "); + output.append(languageCode); + output.append("\n"); + output.append("\tdisplayName: "); + output.append(displayName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class MediaPlaybackClusterTrackStruct { + public String id; + public @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes; + private static final long ID_ID = 0L; + private static final long TRACK_ATTRIBUTES_ID = 1L; + + public MediaPlaybackClusterTrackStruct( + String id, + @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes + ) { + this.id = id; + this.trackAttributes = trackAttributes; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ID_ID, new StringType(id))); + values.add(new StructElement(TRACK_ATTRIBUTES_ID, trackAttributes != null ? trackAttributes.encodeTlv() : new NullType())); + + return new StructType(values); + } + + public static MediaPlaybackClusterTrackStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String id = null; + @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + id = castingValue.value(String.class); + } + } else if (element.contextTagNum() == TRACK_ATTRIBUTES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + trackAttributes = ChipStructs.MediaPlaybackClusterTrackAttributesStruct.decodeTlv(castingValue); + } + } + } + return new MediaPlaybackClusterTrackStruct( + id, + trackAttributes + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("MediaPlaybackClusterTrackStruct {\n"); + output.append("\tid: "); + output.append(id); + output.append("\n"); + output.append("\ttrackAttributes: "); + output.append(trackAttributes); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class MediaPlaybackClusterPlaybackPositionStruct { public Long updatedAt; public @Nullable Long position; @@ -5793,6 +8823,158 @@ public String toString() { return output.toString(); } } +public static class ContentLauncherClusterTrackPreferenceStruct { + public String languageCode; + public Optional> characteristics; + public Integer audioOutputIndex; + private static final long LANGUAGE_CODE_ID = 0L; + private static final long CHARACTERISTICS_ID = 1L; + private static final long AUDIO_OUTPUT_INDEX_ID = 2L; + + public ContentLauncherClusterTrackPreferenceStruct( + String languageCode, + Optional> characteristics, + Integer audioOutputIndex + ) { + this.languageCode = languageCode; + this.characteristics = characteristics; + this.audioOutputIndex = audioOutputIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LANGUAGE_CODE_ID, new StringType(languageCode))); + values.add(new StructElement(CHARACTERISTICS_ID, characteristics.map((nonOptionalcharacteristics) -> ArrayType.generateArrayType(nonOptionalcharacteristics, (elementnonOptionalcharacteristics) -> new UIntType(elementnonOptionalcharacteristics))).orElse(new EmptyType()))); + values.add(new StructElement(AUDIO_OUTPUT_INDEX_ID, new UIntType(audioOutputIndex))); + + return new StructType(values); + } + + public static ContentLauncherClusterTrackPreferenceStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String languageCode = null; + Optional> characteristics = Optional.empty(); + Integer audioOutputIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LANGUAGE_CODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + languageCode = castingValue.value(String.class); + } + } else if (element.contextTagNum() == CHARACTERISTICS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + characteristics = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class))); + } + } else if (element.contextTagNum() == AUDIO_OUTPUT_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioOutputIndex = castingValue.value(Integer.class); + } + } + } + return new ContentLauncherClusterTrackPreferenceStruct( + languageCode, + characteristics, + audioOutputIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterTrackPreferenceStruct {\n"); + output.append("\tlanguageCode: "); + output.append(languageCode); + output.append("\n"); + output.append("\tcharacteristics: "); + output.append(characteristics); + output.append("\n"); + output.append("\taudioOutputIndex: "); + output.append(audioOutputIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ContentLauncherClusterPlaybackPreferencesStruct { + public Long playbackPosition; + public ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack; + public Optional> audioTracks; + private static final long PLAYBACK_POSITION_ID = 0L; + private static final long TEXT_TRACK_ID = 1L; + private static final long AUDIO_TRACKS_ID = 2L; + + public ContentLauncherClusterPlaybackPreferencesStruct( + Long playbackPosition, + ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack, + Optional> audioTracks + ) { + this.playbackPosition = playbackPosition; + this.textTrack = textTrack; + this.audioTracks = audioTracks; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PLAYBACK_POSITION_ID, new UIntType(playbackPosition))); + values.add(new StructElement(TEXT_TRACK_ID, textTrack.encodeTlv())); + values.add(new StructElement(AUDIO_TRACKS_ID, audioTracks.map((nonOptionalaudioTracks) -> ArrayType.generateArrayType(nonOptionalaudioTracks, (elementnonOptionalaudioTracks) -> elementnonOptionalaudioTracks.encodeTlv())).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ContentLauncherClusterPlaybackPreferencesStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long playbackPosition = null; + ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack = null; + Optional> audioTracks = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PLAYBACK_POSITION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + playbackPosition = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == TEXT_TRACK_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + textTrack = ChipStructs.ContentLauncherClusterTrackPreferenceStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == AUDIO_TRACKS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + audioTracks = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ContentLauncherClusterTrackPreferenceStruct.decodeTlv(elementcastingValue))); + } + } + } + return new ContentLauncherClusterPlaybackPreferencesStruct( + playbackPosition, + textTrack, + audioTracks + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterPlaybackPreferencesStruct {\n"); + output.append("\tplaybackPosition: "); + output.append(playbackPosition); + output.append("\n"); + output.append("\ttextTrack: "); + output.append(textTrack); + output.append("\n"); + output.append("\taudioTracks: "); + output.append(audioTracks); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ContentLauncherClusterAdditionalInfoStruct { public String name; public String value; @@ -6432,6 +9614,67 @@ public String toString() { return output.toString(); } } +public static class ContentControlClusterRatingNameStruct { + public String ratingName; + public Optional ratingNameDesc; + private static final long RATING_NAME_ID = 0L; + private static final long RATING_NAME_DESC_ID = 1L; + + public ContentControlClusterRatingNameStruct( + String ratingName, + Optional ratingNameDesc + ) { + this.ratingName = ratingName; + this.ratingNameDesc = ratingNameDesc; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(RATING_NAME_ID, new StringType(ratingName))); + values.add(new StructElement(RATING_NAME_DESC_ID, ratingNameDesc.map((nonOptionalratingNameDesc) -> new StringType(nonOptionalratingNameDesc)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ContentControlClusterRatingNameStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String ratingName = null; + Optional ratingNameDesc = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == RATING_NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + ratingName = castingValue.value(String.class); + } + } else if (element.contextTagNum() == RATING_NAME_DESC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + ratingNameDesc = Optional.of(castingValue.value(String.class)); + } + } + } + return new ContentControlClusterRatingNameStruct( + ratingName, + ratingNameDesc + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterRatingNameStruct {\n"); + output.append("\tratingName: "); + output.append(ratingName); + output.append("\n"); + output.append("\tratingNameDesc: "); + output.append(ratingNameDesc); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class UnitTestingClusterSimpleStruct { public Integer a; public Boolean b; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 47dcda728edc20..28503ea511d188 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -151,8 +151,17 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == IcdManagement.ID) { return new IcdManagement(); } - if (clusterId == OvenOperationalState.ID) { - return new OvenOperationalState(); + if (clusterId == Timer.ID) { + return new Timer(); + } + if (clusterId == OvenCavityOperationalState.ID) { + return new OvenCavityOperationalState(); + } + if (clusterId == OvenMode.ID) { + return new OvenMode(); + } + if (clusterId == LaundryDryerControls.ID) { + return new LaundryDryerControls(); } if (clusterId == ModeSelect.ID) { return new ModeSelect(); @@ -208,6 +217,24 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == ActivatedCarbonFilterMonitoring.ID) { return new ActivatedCarbonFilterMonitoring(); } + if (clusterId == BooleanStateConfiguration.ID) { + return new BooleanStateConfiguration(); + } + if (clusterId == ValveConfigurationAndControl.ID) { + return new ValveConfigurationAndControl(); + } + if (clusterId == ElectricalEnergyMeasurement.ID) { + return new ElectricalEnergyMeasurement(); + } + if (clusterId == DemandResponseLoadControl.ID) { + return new DemandResponseLoadControl(); + } + if (clusterId == DeviceEnergyManagement.ID) { + return new DeviceEnergyManagement(); + } + if (clusterId == EnergyEvse.ID) { + return new EnergyEvse(); + } if (clusterId == DoorLock.ID) { return new DoorLock(); } @@ -319,6 +346,12 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == AccountLogin.ID) { return new AccountLogin(); } + if (clusterId == ContentControl.ID) { + return new ContentControl(); + } + if (clusterId == ContentAppObserver.ID) { + return new ContentAppObserver(); + } if (clusterId == ElectricalMeasurement.ID) { return new ElectricalMeasurement(); } @@ -676,7 +709,7 @@ public enum Attribute { NameSupport(4L), LastConfiguredBy(5L), SceneTableSize(6L), - RemainingCapacity(7L), + FabricSceneInfo(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -2344,6 +2377,8 @@ public enum Attribute { UniqueID(18L), CapabilityMinima(19L), ProductAppearance(20L), + SpecificationVersion(21L), + MaxPathsPerInvoke(22L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6127,19 +6162,16 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class OvenOperationalState implements BaseCluster { - public static final long ID = 72L; + public static class Timer implements BaseCluster { + public static final long ID = 71L; public long getID() { return ID; } public enum Attribute { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), + SetTime(0L), + TimeRemaining(1L), + TimerState(2L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6165,9 +6197,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - OperationalError(0L), - OperationCompletion(1L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -6188,10 +6218,10 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L),; + SetTimer(0L), + ResetTimer(1L), + AddTime(2L), + ReduceTime(3L),; private final long id; Command(long id) { this.id = id; @@ -6209,7 +6239,58 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum SetTimerCommandField {NewTime(0),; + private final int id; + SetTimerCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetTimerCommandField value(int id) throws NoSuchFieldError { + for (SetTimerCommandField field : SetTimerCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AddTimeCommandField {AdditionalTime(0),; + private final int id; + AddTimeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddTimeCommandField value(int id) throws NoSuchFieldError { + for (AddTimeCommandField field : AddTimeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ReduceTimeCommandField {TimeReduction(0),; + private final int id; + ReduceTimeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ReduceTimeCommandField value(int id) throws NoSuchFieldError { + for (ReduceTimeCommandField field : ReduceTimeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -6239,19 +6320,19 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ModeSelect implements BaseCluster { - public static final long ID = 80L; + public static class OvenCavityOperationalState implements BaseCluster { + public static final long ID = 72L; public long getID() { return ID; } public enum Attribute { - Description(0L), - StandardNamespace(1L), - SupportedModes(2L), - CurrentMode(3L), - StartUpMode(4L), - OnMode(5L), + PhaseList(0L), + CurrentPhase(1L), + CountdownTime(2L), + OperationalStateList(3L), + OperationalState(4L), + OperationalError(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6277,7 +6358,9 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + OperationalError(0L), + OperationCompletion(1L),; private final long id; Event(long id) { this.id = id; @@ -6298,7 +6381,10 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - ChangeToMode(0L),; + Pause(0L), + Stop(1L), + Start(2L), + Resume(3L),; private final long id; Command(long id) { this.id = id; @@ -6316,24 +6402,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ChangeToModeCommandField {NewMode(0),; - private final int id; - ChangeToModeCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { - for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -6363,8 +6432,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class LaundryWasherMode implements BaseCluster { - public static final long ID = 81L; + public static class OvenMode implements BaseCluster { + public static final long ID = 73L; public long getID() { return ID; } @@ -6485,17 +6554,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RefrigeratorAndTemperatureControlledCabinetMode implements BaseCluster { - public static final long ID = 82L; + public static class LaundryDryerControls implements BaseCluster { + public static final long ID = 74L; public long getID() { return ID; } public enum Attribute { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), + SupportedDrynessLevels(0L), + SelectedDrynessLevel(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6541,8 +6608,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - ChangeToMode(0L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -6560,24 +6626,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ChangeToModeCommandField {NewMode(0),; - private final int id; - ChangeToModeCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { - for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -6607,17 +6656,19 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class LaundryWasherControls implements BaseCluster { - public static final long ID = 83L; + public static class ModeSelect implements BaseCluster { + public static final long ID = 80L; public long getID() { return ID; } public enum Attribute { - SpinSpeeds(0L), - SpinSpeedCurrent(1L), - NumberOfRinses(2L), - SupportedRinses(3L), + Description(0L), + StandardNamespace(1L), + SupportedModes(2L), + CurrentMode(3L), + StartUpMode(4L), + OnMode(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6663,7 +6714,8 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + ChangeToMode(0L),; private final long id; Command(long id) { this.id = id; @@ -6681,7 +6733,24 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -6711,8 +6780,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RvcRunMode implements BaseCluster { - public static final long ID = 84L; + public static class LaundryWasherMode implements BaseCluster { + public static final long ID = 81L; public long getID() { return ID; } @@ -6720,6 +6789,7 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), + StartUpMode(2L), OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), @@ -6832,8 +6902,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RvcCleanMode implements BaseCluster { - public static final long ID = 85L; + public static class RefrigeratorAndTemperatureControlledCabinetMode implements BaseCluster { + public static final long ID = 82L; public long getID() { return ID; } @@ -6841,6 +6911,7 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), + StartUpMode(2L), OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), @@ -6953,19 +7024,17 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class TemperatureControl implements BaseCluster { - public static final long ID = 86L; + public static class LaundryWasherControls implements BaseCluster { + public static final long ID = 83L; public long getID() { return ID; } public enum Attribute { - TemperatureSetpoint(0L), - MinTemperature(1L), - MaxTemperature(2L), - Step(3L), - SelectedTemperatureLevel(4L), - SupportedTemperatureLevels(5L), + SpinSpeeds(0L), + SpinSpeedCurrent(1L), + NumberOfRinses(2L), + SupportedRinses(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7011,8 +7080,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - SetTemperature(0L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -7030,24 +7098,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SetTemperatureCommandField {TargetTemperature(0),TargetTemperatureLevel(1),; - private final int id; - SetTemperatureCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SetTemperatureCommandField value(int id) throws NoSuchFieldError { - for (SetTemperatureCommandField field : SetTemperatureCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -7077,16 +7128,16 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RefrigeratorAlarm implements BaseCluster { - public static final long ID = 87L; + public static class RvcRunMode implements BaseCluster { + public static final long ID = 84L; public long getID() { return ID; } public enum Attribute { - Mask(0L), - State(2L), - Supported(3L), + SupportedModes(0L), + CurrentMode(1L), + OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7112,8 +7163,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - Notify(0L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -7133,7 +7183,8 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + ChangeToMode(0L),; private final long id; Command(long id) { this.id = id; @@ -7151,20 +7202,37 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override - public String getAttributeName(long id) throws NoSuchFieldError { - return Attribute.value(id).toString(); - } - - @Override - public String getEventName(long id) throws NoSuchFieldError { - return Event.value(id).toString(); - } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } - @Override - public String getCommandName(long id) throws NoSuchFieldError { - return Command.value(id).toString(); - } + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } @Override public long getAttributeID(String name) throws IllegalArgumentException { @@ -7181,8 +7249,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class DishwasherMode implements BaseCluster { - public static final long ID = 89L; + public static class RvcCleanMode implements BaseCluster { + public static final long ID = 85L; public long getID() { return ID; } @@ -7190,7 +7258,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), @@ -7303,14 +7370,19 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class AirQuality implements BaseCluster { - public static final long ID = 91L; + public static class TemperatureControl implements BaseCluster { + public static final long ID = 86L; public long getID() { return ID; } public enum Attribute { - AirQuality(0L), + TemperatureSetpoint(0L), + MinTemperature(1L), + MaxTemperature(2L), + Step(3L), + SelectedTemperatureLevel(4L), + SupportedTemperatureLevels(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7356,7 +7428,8 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + SetTemperature(0L),; private final long id; Command(long id) { this.id = id; @@ -7374,7 +7447,24 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum SetTemperatureCommandField {TargetTemperature(0),TargetTemperatureLevel(1),; + private final int id; + SetTemperatureCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetTemperatureCommandField value(int id) throws NoSuchFieldError { + for (SetTemperatureCommandField field : SetTemperatureCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -7404,26 +7494,16 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class SmokeCoAlarm implements BaseCluster { - public static final long ID = 92L; + public static class RefrigeratorAlarm implements BaseCluster { + public static final long ID = 87L; public long getID() { return ID; } public enum Attribute { - ExpressedState(0L), - SmokeState(1L), - COState(2L), - BatteryAlert(3L), - DeviceMuted(4L), - TestInProgress(5L), - HardwareFaultAlert(6L), - EndOfServiceAlert(7L), - InterconnectSmokeAlarm(8L), - InterconnectCOAlarm(9L), - ContaminationState(10L), - SmokeSensitivityLevel(11L), - ExpiryDate(12L), + Mask(0L), + State(2L), + Supported(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7450,17 +7530,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } public enum Event { - SmokeAlarm(0L), - COAlarm(1L), - LowBattery(2L), - HardwareFault(3L), - EndOfService(4L), - SelfTestComplete(5L), - AlarmMuted(6L), - MuteEnded(7L), - InterconnectSmokeAlarm(8L), - InterconnectCOAlarm(9L), - AllClear(10L),; + Notify(0L),; private final long id; Event(long id) { this.id = id; @@ -7480,8 +7550,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - SelfTestRequest(0L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -7529,17 +7598,17 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class DishwasherAlarm implements BaseCluster { - public static final long ID = 93L; + public static class DishwasherMode implements BaseCluster { + public static final long ID = 89L; public long getID() { return ID; } public enum Attribute { - Mask(0L), - Latch(1L), - State(2L), - Supported(3L), + SupportedModes(0L), + CurrentMode(1L), + StartUpMode(2L), + OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7565,8 +7634,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - Notify(0L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -7587,8 +7655,7 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Reset(0L), - ModifyEnabledAlarms(1L),; + ChangeToMode(0L),; private final long id; Command(long id) { this.id = id; @@ -7606,34 +7673,17 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ResetCommandField {Alarms(0),; - private final int id; - ResetCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ResetCommandField value(int id) throws NoSuchFieldError { - for (ResetCommandField field : ResetCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum ModifyEnabledAlarmsCommandField {Mask(0),; + }public enum ChangeToModeCommandField {NewMode(0),; private final int id; - ModifyEnabledAlarmsCommandField(int id) { + ChangeToModeCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ModifyEnabledAlarmsCommandField value(int id) throws NoSuchFieldError { - for (ModifyEnabledAlarmsCommandField field : ModifyEnabledAlarmsCommandField.values()) { + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { if (field.getID() == id) { return field; } @@ -7670,15 +7720,14 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class MicrowaveOvenMode implements BaseCluster { - public static final long ID = 94L; + public static class AirQuality implements BaseCluster { + public static final long ID = 91L; public long getID() { return ID; } public enum Attribute { - SupportedModes(0L), - CurrentMode(1L), + AirQuality(0L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7772,18 +7821,26 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class MicrowaveOvenControl implements BaseCluster { - public static final long ID = 95L; + public static class SmokeCoAlarm implements BaseCluster { + public static final long ID = 92L; public long getID() { return ID; } public enum Attribute { - CookTime(1L), - PowerSetting(2L), - MinPower(3L), - MaxPower(4L), - PowerStep(5L), + ExpressedState(0L), + SmokeState(1L), + COState(2L), + BatteryAlert(3L), + DeviceMuted(4L), + TestInProgress(5L), + HardwareFaultAlert(6L), + EndOfServiceAlert(7L), + InterconnectSmokeAlarm(8L), + InterconnectCOAlarm(9L), + ContaminationState(10L), + SmokeSensitivityLevel(11L), + ExpiryDate(12L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7809,7 +7866,18 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + SmokeAlarm(0L), + COAlarm(1L), + LowBattery(2L), + HardwareFault(3L), + EndOfService(4L), + SelfTestComplete(5L), + AlarmMuted(6L), + MuteEnded(7L), + InterconnectSmokeAlarm(8L), + InterconnectCOAlarm(9L), + AllClear(10L),; private final long id; Event(long id) { this.id = id; @@ -7830,8 +7898,7 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SetCookingParameters(0L), - AddMoreTime(1L),; + SelfTestRequest(0L),; private final long id; Command(long id) { this.id = id; @@ -7849,41 +7916,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SetCookingParametersCommandField {CookMode(0),CookTime(1),PowerSetting(2),; - private final int id; - SetCookingParametersCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SetCookingParametersCommandField value(int id) throws NoSuchFieldError { - for (SetCookingParametersCommandField field : SetCookingParametersCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum AddMoreTimeCommandField {TimeToAdd(0),; - private final int id; - AddMoreTimeCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static AddMoreTimeCommandField value(int id) throws NoSuchFieldError { - for (AddMoreTimeCommandField field : AddMoreTimeCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -7913,19 +7946,17 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class OperationalState implements BaseCluster { - public static final long ID = 96L; + public static class DishwasherAlarm implements BaseCluster { + public static final long ID = 93L; public long getID() { return ID; } public enum Attribute { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), + Mask(0L), + Latch(1L), + State(2L), + Supported(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7952,8 +7983,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } public enum Event { - OperationalError(0L), - OperationCompletion(1L),; + Notify(0L),; private final long id; Event(long id) { this.id = id; @@ -7974,10 +8004,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L),; + Reset(0L), + ModifyEnabledAlarms(1L),; private final long id; Command(long id) { this.id = id; @@ -7995,13 +8023,47 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override - public String getAttributeName(long id) throws NoSuchFieldError { - return Attribute.value(id).toString(); - } + }public enum ResetCommandField {Alarms(0),; + private final int id; + ResetCommandField(int id) { + this.id = id; + } - @Override - public String getEventName(long id) throws NoSuchFieldError { + public int getID() { + return id; + } + public static ResetCommandField value(int id) throws NoSuchFieldError { + for (ResetCommandField field : ResetCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ModifyEnabledAlarmsCommandField {Mask(0),; + private final int id; + ModifyEnabledAlarmsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ModifyEnabledAlarmsCommandField value(int id) throws NoSuchFieldError { + for (ModifyEnabledAlarmsCommandField field : ModifyEnabledAlarmsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { return Event.value(id).toString(); } @@ -8025,19 +8087,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RvcOperationalState implements BaseCluster { - public static final long ID = 97L; + public static class MicrowaveOvenMode implements BaseCluster { + public static final long ID = 94L; public long getID() { return ID; } public enum Attribute { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), + SupportedModes(0L), + CurrentMode(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8063,9 +8121,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - OperationalError(0L), - OperationCompletion(1L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -8085,11 +8141,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -8137,19 +8189,18 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class HepaFilterMonitoring implements BaseCluster { - public static final long ID = 113L; + public static class MicrowaveOvenControl implements BaseCluster { + public static final long ID = 95L; public long getID() { return ID; } public enum Attribute { - Condition(0L), - DegradationDirection(1L), - ChangeIndication(2L), - InPlaceIndicator(3L), - LastChangedTime(4L), - ReplacementProductList(5L), + CookTime(1L), + PowerSetting(2L), + MinPower(3L), + MaxPower(4L), + PowerStep(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8196,7 +8247,154 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - ResetCondition(0L),; + SetCookingParameters(0L), + AddMoreTime(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum SetCookingParametersCommandField {CookMode(0),CookTime(1),PowerSetting(2),; + private final int id; + SetCookingParametersCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetCookingParametersCommandField value(int id) throws NoSuchFieldError { + for (SetCookingParametersCommandField field : SetCookingParametersCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AddMoreTimeCommandField {TimeToAdd(0),; + private final int id; + AddMoreTimeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddMoreTimeCommandField value(int id) throws NoSuchFieldError { + for (AddMoreTimeCommandField field : AddMoreTimeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class OperationalState implements BaseCluster { + public static final long ID = 96L; + public long getID() { + return ID; + } + + public enum Attribute { + PhaseList(0L), + CurrentPhase(1L), + CountdownTime(2L), + OperationalStateList(3L), + OperationalState(4L), + OperationalError(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + OperationalError(0L), + OperationCompletion(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Pause(0L), + Stop(1L), + Start(2L), + Resume(3L),; private final long id; Command(long id) { this.id = id; @@ -8244,19 +8442,19 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ActivatedCarbonFilterMonitoring implements BaseCluster { - public static final long ID = 114L; + public static class RvcOperationalState implements BaseCluster { + public static final long ID = 97L; public long getID() { return ID; } public enum Attribute { - Condition(0L), - DegradationDirection(1L), - ChangeIndication(2L), - InPlaceIndicator(3L), - LastChangedTime(4L), - ReplacementProductList(5L), + PhaseList(0L), + CurrentPhase(1L), + CountdownTime(2L), + OperationalStateList(3L), + OperationalState(4L), + OperationalError(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8282,7 +8480,9 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + OperationalError(0L), + OperationCompletion(1L),; private final long id; Event(long id) { this.id = id; @@ -8303,25 +8503,1217 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - ResetCondition(0L),; + Pause(0L), + Stop(1L), + Start(2L), + Resume(3L),; private final long id; Command(long id) { this.id = id; } - public long getID() { - return id; - } + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class HepaFilterMonitoring implements BaseCluster { + public static final long ID = 113L; + public long getID() { + return ID; + } + + public enum Attribute { + Condition(0L), + DegradationDirection(1L), + ChangeIndication(2L), + InPlaceIndicator(3L), + LastChangedTime(4L), + ReplacementProductList(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ResetCondition(0L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class ActivatedCarbonFilterMonitoring implements BaseCluster { + public static final long ID = 114L; + public long getID() { + return ID; + } + + public enum Attribute { + Condition(0L), + DegradationDirection(1L), + ChangeIndication(2L), + InPlaceIndicator(3L), + LastChangedTime(4L), + ReplacementProductList(5L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ResetCondition(0L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class BooleanStateConfiguration implements BaseCluster { + public static final long ID = 128L; + public long getID() { + return ID; + } + + public enum Attribute { + CurrentSensitivityLevel(0L), + SupportedSensitivityLevels(1L), + DefaultSensitivityLevel(2L), + AlarmsActive(3L), + AlarmsSuppressed(4L), + AlarmsEnabled(5L), + AlarmsSupported(6L), + SensorFault(7L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + AlarmsStateChanged(0L), + SensorFault(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + SuppressAlarm(0L), + EnableDisableAlarm(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum SuppressAlarmCommandField {AlarmsToSuppress(0),; + private final int id; + SuppressAlarmCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SuppressAlarmCommandField value(int id) throws NoSuchFieldError { + for (SuppressAlarmCommandField field : SuppressAlarmCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EnableDisableAlarmCommandField {AlarmsToEnableDisable(0),; + private final int id; + EnableDisableAlarmCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnableDisableAlarmCommandField value(int id) throws NoSuchFieldError { + for (EnableDisableAlarmCommandField field : EnableDisableAlarmCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class ValveConfigurationAndControl implements BaseCluster { + public static final long ID = 129L; + public long getID() { + return ID; + } + + public enum Attribute { + OpenDuration(0L), + DefaultOpenDuration(1L), + AutoCloseTime(2L), + RemainingDuration(3L), + CurrentState(4L), + TargetState(5L), + CurrentLevel(6L), + TargetLevel(7L), + DefaultOpenLevel(8L), + ValveFault(9L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + ValveStateChanged(0L), + ValveFault(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Open(0L), + Close(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum OpenCommandField {OpenDuration(0),TargetLevel(1),; + private final int id; + OpenCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static OpenCommandField value(int id) throws NoSuchFieldError { + for (OpenCommandField field : OpenCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class ElectricalEnergyMeasurement implements BaseCluster { + public static final long ID = 145L; + public long getID() { + return ID; + } + + public enum Attribute { + Accuracy(0L), + CumulativeEnergyImported(1L), + CumulativeEnergyExported(2L), + PeriodicEnergyImported(3L), + PeriodicEnergyExported(4L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + CumulativeEnergyMeasured(0L), + PeriodicEnergyMeasured(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command {; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class DemandResponseLoadControl implements BaseCluster { + public static final long ID = 150L; + public long getID() { + return ID; + } + + public enum Attribute { + LoadControlPrograms(0L), + NumberOfLoadControlPrograms(1L), + Events(2L), + ActiveEvents(3L), + NumberOfEventsPerProgram(4L), + NumberOfTransitions(5L), + DefaultRandomStart(6L), + DefaultRandomDuration(7L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + LoadControlEventStatusChange(0L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + RegisterLoadControlProgramRequest(0L), + UnregisterLoadControlProgramRequest(1L), + AddLoadControlEventRequest(2L), + RemoveLoadControlEventRequest(3L), + ClearLoadControlEventsRequest(4L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum RegisterLoadControlProgramRequestCommandField {LoadControlProgram(0),; + private final int id; + RegisterLoadControlProgramRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RegisterLoadControlProgramRequestCommandField value(int id) throws NoSuchFieldError { + for (RegisterLoadControlProgramRequestCommandField field : RegisterLoadControlProgramRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum UnregisterLoadControlProgramRequestCommandField {LoadControlProgramID(0),; + private final int id; + UnregisterLoadControlProgramRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static UnregisterLoadControlProgramRequestCommandField value(int id) throws NoSuchFieldError { + for (UnregisterLoadControlProgramRequestCommandField field : UnregisterLoadControlProgramRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AddLoadControlEventRequestCommandField {Event(0),; + private final int id; + AddLoadControlEventRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddLoadControlEventRequestCommandField value(int id) throws NoSuchFieldError { + for (AddLoadControlEventRequestCommandField field : AddLoadControlEventRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveLoadControlEventRequestCommandField {EventID(0),CancelControl(1),; + private final int id; + RemoveLoadControlEventRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveLoadControlEventRequestCommandField value(int id) throws NoSuchFieldError { + for (RemoveLoadControlEventRequestCommandField field : RemoveLoadControlEventRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class DeviceEnergyManagement implements BaseCluster { + public static final long ID = 152L; + public long getID() { + return ID; + } + + public enum Attribute { + ESAType(0L), + ESACanGenerate(1L), + ESAState(2L), + AbsMinPower(3L), + AbsMaxPower(4L), + PowerAdjustmentCapability(5L), + Forecast(6L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + PowerAdjustStart(0L), + PowerAdjustEnd(1L), + Paused(2L), + Resumed(3L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + PowerAdjustRequest(0L), + CancelPowerAdjustRequest(1L), + StartTimeAdjustRequest(2L), + PauseRequest(3L), + ResumeRequest(4L), + ModifyForecastRequest(5L), + RequestConstraintBasedForecast(6L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum PowerAdjustRequestCommandField {Power(0),Duration(1),; + private final int id; + PowerAdjustRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static PowerAdjustRequestCommandField value(int id) throws NoSuchFieldError { + for (PowerAdjustRequestCommandField field : PowerAdjustRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum StartTimeAdjustRequestCommandField {RequestedStartTime(0),; + private final int id; + StartTimeAdjustRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static StartTimeAdjustRequestCommandField value(int id) throws NoSuchFieldError { + for (StartTimeAdjustRequestCommandField field : StartTimeAdjustRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum PauseRequestCommandField {Duration(0),; + private final int id; + PauseRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static PauseRequestCommandField value(int id) throws NoSuchFieldError { + for (PauseRequestCommandField field : PauseRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ModifyForecastRequestCommandField {ForecastId(0),SlotAdjustments(1),; + private final int id; + ModifyForecastRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ModifyForecastRequestCommandField value(int id) throws NoSuchFieldError { + for (ModifyForecastRequestCommandField field : ModifyForecastRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RequestConstraintBasedForecastCommandField {Constraints(0),; + private final int id; + RequestConstraintBasedForecastCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RequestConstraintBasedForecastCommandField value(int id) throws NoSuchFieldError { + for (RequestConstraintBasedForecastCommandField field : RequestConstraintBasedForecastCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class EnergyEvse implements BaseCluster { + public static final long ID = 153L; + public long getID() { + return ID; + } + + public enum Attribute { + State(0L), + SupplyState(1L), + FaultState(2L), + ChargingEnabledUntil(3L), + DischargingEnabledUntil(4L), + CircuitCapacity(5L), + MinimumChargeCurrent(6L), + MaximumChargeCurrent(7L), + MaximumDischargeCurrent(8L), + UserMaximumChargeCurrent(9L), + RandomizationDelayWindow(10L), + NumberOfWeeklyTargets(33L), + NumberOfDailyTargets(34L), + NextChargeStartTime(35L), + NextChargeTargetTime(36L), + NextChargeRequiredEnergy(37L), + NextChargeTargetSoC(38L), + ApproximateEVEfficiency(39L), + StateOfCharge(48L), + BatteryCapacity(49L), + VehicleID(50L), + SessionID(64L), + SessionDuration(65L), + SessionEnergyCharged(66L), + SessionEnergyDischarged(67L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + EVConnected(0L), + EVNotDetected(1L), + EnergyTransferStarted(2L), + EnergyTransferStopped(3L), + Fault(4L), + RFID(5L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Disable(1L), + EnableCharging(2L), + EnableDischarging(3L), + StartDiagnostics(4L), + SetTargets(5L), + GetTargets(6L), + ClearTargets(7L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum EnableChargingCommandField {ChargingEnabledUntil(0),MinimumChargeCurrent(1),MaximumChargeCurrent(2),; + private final int id; + EnableChargingCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnableChargingCommandField value(int id) throws NoSuchFieldError { + for (EnableChargingCommandField field : EnableChargingCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EnableDischargingCommandField {DischargingEnabledUntil(0),MaximumDischargeCurrent(1),; + private final int id; + EnableDischargingCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnableDischargingCommandField value(int id) throws NoSuchFieldError { + for (EnableDischargingCommandField field : EnableDischargingCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetTargetsCommandField {DayOfWeekforSequence(0),ChargingTargets(1),; + private final int id; + SetTargetsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetTargetsCommandField value(int id) throws NoSuchFieldError { + for (SetTargetsCommandField field : SetTargetsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum GetTargetsCommandField {DaysToReturn(0),; + private final int id; + GetTargetsCommandField(int id) { + this.id = id; + } - public static Command value(long id) throws NoSuchFieldError { - for (Command command : Command.values()) { - if (command.getID() == id) { - return command; + public int getID() { + return id; } - } - throw new NoSuchFieldError(); - } - }@Override + public static GetTargetsCommandField value(int id) throws NoSuchFieldError { + for (GetTargetsCommandField field : GetTargetsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -11427,8 +12819,230 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class Pm25ConcentrationMeasurement implements BaseCluster { - public static final long ID = 1066L; + public static class Pm25ConcentrationMeasurement implements BaseCluster { + public static final long ID = 1066L; + public long getID() { + return ID; + } + + public enum Attribute { + MeasuredValue(0L), + MinMeasuredValue(1L), + MaxMeasuredValue(2L), + PeakMeasuredValue(3L), + PeakMeasuredValueWindow(4L), + AverageMeasuredValue(5L), + AverageMeasuredValueWindow(6L), + Uncertainty(7L), + MeasurementUnit(8L), + MeasurementMedium(9L), + LevelValue(10L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command {; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class FormaldehydeConcentrationMeasurement implements BaseCluster { + public static final long ID = 1067L; + public long getID() { + return ID; + } + + public enum Attribute { + MeasuredValue(0L), + MinMeasuredValue(1L), + MaxMeasuredValue(2L), + PeakMeasuredValue(3L), + PeakMeasuredValueWindow(4L), + AverageMeasuredValue(5L), + AverageMeasuredValueWindow(6L), + Uncertainty(7L), + MeasurementUnit(8L), + MeasurementMedium(9L), + LevelValue(10L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command {; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class Pm1ConcentrationMeasurement implements BaseCluster { + public static final long ID = 1068L; public long getID() { return ID; } @@ -11538,8 +13152,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class FormaldehydeConcentrationMeasurement implements BaseCluster { - public static final long ID = 1067L; + public static class Pm10ConcentrationMeasurement implements BaseCluster { + public static final long ID = 1069L; public long getID() { return ID; } @@ -11649,8 +13263,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class Pm1ConcentrationMeasurement implements BaseCluster { - public static final long ID = 1068L; + public static class TotalVolatileOrganicCompoundsConcentrationMeasurement implements BaseCluster { + public static final long ID = 1070L; public long getID() { return ID; } @@ -11760,8 +13374,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class Pm10ConcentrationMeasurement implements BaseCluster { - public static final long ID = 1069L; + public static class RadonConcentrationMeasurement implements BaseCluster { + public static final long ID = 1071L; public long getID() { return ID; } @@ -11871,24 +13485,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class TotalVolatileOrganicCompoundsConcentrationMeasurement implements BaseCluster { - public static final long ID = 1070L; + public static class WakeOnLan implements BaseCluster { + public static final long ID = 1283L; public long getID() { return ID; } public enum Attribute { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), + MACAddress(0L), + LinkLocalAddress(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -11982,24 +13587,16 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class RadonConcentrationMeasurement implements BaseCluster { - public static final long ID = 1071L; + public static class Channel implements BaseCluster { + public static final long ID = 1284L; public long getID() { return ID; } public enum Attribute { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), + ChannelList(0L), + Lineup(1L), + CurrentChannel(2L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12045,7 +13642,13 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + ChangeChannel(0L), + ChangeChannelByNumber(2L), + SkipChannel(3L), + GetProgramGuide(4L), + RecordProgram(6L), + CancelRecordProgram(7L),; private final long id; Command(long id) { this.id = id; @@ -12063,7 +13666,109 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum ChangeChannelCommandField {Match(0),; + private final int id; + ChangeChannelCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeChannelCommandField value(int id) throws NoSuchFieldError { + for (ChangeChannelCommandField field : ChangeChannelCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeChannelByNumberCommandField {MajorNumber(0),MinorNumber(1),; + private final int id; + ChangeChannelByNumberCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeChannelByNumberCommandField value(int id) throws NoSuchFieldError { + for (ChangeChannelByNumberCommandField field : ChangeChannelByNumberCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SkipChannelCommandField {Count(0),; + private final int id; + SkipChannelCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SkipChannelCommandField value(int id) throws NoSuchFieldError { + for (SkipChannelCommandField field : SkipChannelCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum GetProgramGuideCommandField {StartTime(0),EndTime(1),ChannelList(2),PageToken(3),RecordingFlag(4),ExternalIDList(5),Data(6),; + private final int id; + GetProgramGuideCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static GetProgramGuideCommandField value(int id) throws NoSuchFieldError { + for (GetProgramGuideCommandField field : GetProgramGuideCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RecordProgramCommandField {ProgramIdentifier(0),ShouldRecordSeries(1),ExternalIDList(2),Data(3),; + private final int id; + RecordProgramCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RecordProgramCommandField value(int id) throws NoSuchFieldError { + for (RecordProgramCommandField field : RecordProgramCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum CancelRecordProgramCommandField {ProgramIdentifier(0),ShouldRecordSeries(1),ExternalIDList(2),Data(3),; + private final int id; + CancelRecordProgramCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static CancelRecordProgramCommandField value(int id) throws NoSuchFieldError { + for (CancelRecordProgramCommandField field : CancelRecordProgramCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -12093,15 +13798,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class WakeOnLan implements BaseCluster { - public static final long ID = 1283L; + public static class TargetNavigator implements BaseCluster { + public static final long ID = 1285L; public long getID() { return ID; } public enum Attribute { - MACAddress(0L), - LinkLocalAddress(1L), + TargetList(0L), + CurrentTarget(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12127,7 +13832,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + TargetUpdated(0L),; private final long id; Event(long id) { this.id = id; @@ -12147,7 +13853,8 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + NavigateTarget(0L),; private final long id; Command(long id) { this.id = id; @@ -12165,7 +13872,24 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum NavigateTargetCommandField {Target(0),Data(1),; + private final int id; + NavigateTargetCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static NavigateTargetCommandField value(int id) throws NoSuchFieldError { + for (NavigateTargetCommandField field : NavigateTargetCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -12195,16 +13919,24 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class Channel implements BaseCluster { - public static final long ID = 1284L; + public static class MediaPlayback implements BaseCluster { + public static final long ID = 1286L; public long getID() { return ID; } public enum Attribute { - ChannelList(0L), - Lineup(1L), - CurrentChannel(2L), + CurrentState(0L), + StartTime(1L), + Duration(2L), + SampledPosition(3L), + PlaybackSpeed(4L), + SeekRangeEnd(5L), + SeekRangeStart(6L), + ActiveAudioTrack(7L), + AvailableAudioTracks(8L), + ActiveTextTrack(9L), + AvailableTextTracks(10L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12230,7 +13962,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + StateChanged(0L),; private final long id; Event(long id) { this.id = id; @@ -12251,9 +13984,20 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - ChangeChannel(0L), - ChangeChannelByNumber(2L), - SkipChannel(3L),; + Play(0L), + Pause(1L), + Stop(2L), + StartOver(3L), + Previous(4L), + Next(5L), + Rewind(6L), + FastForward(7L), + SkipForward(8L), + SkipBackward(9L), + Seek(11L), + ActivateAudioTrack(12L), + ActivateTextTrack(13L), + DeactivateTextTrack(14L),; private final long id; Command(long id) { this.id = id; @@ -12263,59 +14007,127 @@ public long getID() { return id; } - public static Command value(long id) throws NoSuchFieldError { - for (Command command : Command.values()) { - if (command.getID() == id) { - return command; + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum RewindCommandField {AudioAdvanceUnmuted(0),; + private final int id; + RewindCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RewindCommandField value(int id) throws NoSuchFieldError { + for (RewindCommandField field : RewindCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum FastForwardCommandField {AudioAdvanceUnmuted(0),; + private final int id; + FastForwardCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static FastForwardCommandField value(int id) throws NoSuchFieldError { + for (FastForwardCommandField field : FastForwardCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SkipForwardCommandField {DeltaPositionMilliseconds(0),; + private final int id; + SkipForwardCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SkipForwardCommandField value(int id) throws NoSuchFieldError { + for (SkipForwardCommandField field : SkipForwardCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SkipBackwardCommandField {DeltaPositionMilliseconds(0),; + private final int id; + SkipBackwardCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; } - } - throw new NoSuchFieldError(); - } - }public enum ChangeChannelCommandField {Match(0),; + public static SkipBackwardCommandField value(int id) throws NoSuchFieldError { + for (SkipBackwardCommandField field : SkipBackwardCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SeekCommandField {Position(0),; private final int id; - ChangeChannelCommandField(int id) { + SeekCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ChangeChannelCommandField value(int id) throws NoSuchFieldError { - for (ChangeChannelCommandField field : ChangeChannelCommandField.values()) { + public static SeekCommandField value(int id) throws NoSuchFieldError { + for (SeekCommandField field : SeekCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum ChangeChannelByNumberCommandField {MajorNumber(0),MinorNumber(1),; + }public enum ActivateAudioTrackCommandField {TrackID(0),AudioOutputIndex(1),; private final int id; - ChangeChannelByNumberCommandField(int id) { + ActivateAudioTrackCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ChangeChannelByNumberCommandField value(int id) throws NoSuchFieldError { - for (ChangeChannelByNumberCommandField field : ChangeChannelByNumberCommandField.values()) { + public static ActivateAudioTrackCommandField value(int id) throws NoSuchFieldError { + for (ActivateAudioTrackCommandField field : ActivateAudioTrackCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum SkipChannelCommandField {Count(0),; + }public enum ActivateTextTrackCommandField {TrackID(0),; private final int id; - SkipChannelCommandField(int id) { + ActivateTextTrackCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SkipChannelCommandField value(int id) throws NoSuchFieldError { - for (SkipChannelCommandField field : SkipChannelCommandField.values()) { + public static ActivateTextTrackCommandField value(int id) throws NoSuchFieldError { + for (ActivateTextTrackCommandField field : ActivateTextTrackCommandField.values()) { if (field.getID() == id) { return field; } @@ -12352,15 +14164,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class TargetNavigator implements BaseCluster { - public static final long ID = 1285L; + public static class MediaInput implements BaseCluster { + public static final long ID = 1287L; public long getID() { return ID; } public enum Attribute { - TargetList(0L), - CurrentTarget(1L), + InputList(0L), + CurrentInput(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12407,7 +14219,10 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - NavigateTarget(0L),; + SelectInput(0L), + ShowInputStatus(1L), + HideInputStatus(2L), + RenameInput(3L),; private final long id; Command(long id) { this.id = id; @@ -12425,17 +14240,34 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum NavigateTargetCommandField {Target(0),Data(1),; + }public enum SelectInputCommandField {Index(0),; private final int id; - NavigateTargetCommandField(int id) { + SelectInputCommandField(int id) { this.id = id; } public int getID() { return id; } - public static NavigateTargetCommandField value(int id) throws NoSuchFieldError { - for (NavigateTargetCommandField field : NavigateTargetCommandField.values()) { + public static SelectInputCommandField value(int id) throws NoSuchFieldError { + for (SelectInputCommandField field : SelectInputCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RenameInputCommandField {Index(0),Name(1),; + private final int id; + RenameInputCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RenameInputCommandField value(int id) throws NoSuchFieldError { + for (RenameInputCommandField field : RenameInputCommandField.values()) { if (field.getID() == id) { return field; } @@ -12472,20 +14304,13 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class MediaPlayback implements BaseCluster { - public static final long ID = 1286L; + public static class LowPower implements BaseCluster { + public static final long ID = 1288L; public long getID() { return ID; } public enum Attribute { - CurrentState(0L), - StartTime(1L), - Duration(2L), - SampledPosition(3L), - PlaybackSpeed(4L), - SeekRangeEnd(5L), - SeekRangeStart(6L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12532,17 +14357,7 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Play(0L), - Pause(1L), - Stop(2L), - StartOver(3L), - Previous(4L), - Next(5L), - Rewind(6L), - FastForward(7L), - SkipForward(8L), - SkipBackward(9L), - Seek(11L),; + Sleep(0L),; private final long id; Command(long id) { this.id = id; @@ -12560,58 +14375,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SkipForwardCommandField {DeltaPositionMilliseconds(0),; - private final int id; - SkipForwardCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SkipForwardCommandField value(int id) throws NoSuchFieldError { - for (SkipForwardCommandField field : SkipForwardCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum SkipBackwardCommandField {DeltaPositionMilliseconds(0),; - private final int id; - SkipBackwardCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SkipBackwardCommandField value(int id) throws NoSuchFieldError { - for (SkipBackwardCommandField field : SkipBackwardCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum SeekCommandField {Position(0),; - private final int id; - SeekCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SeekCommandField value(int id) throws NoSuchFieldError { - for (SeekCommandField field : SeekCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -12641,15 +14405,13 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class MediaInput implements BaseCluster { - public static final long ID = 1287L; + public static class KeypadInput implements BaseCluster { + public static final long ID = 1289L; public long getID() { return ID; } public enum Attribute { - InputList(0L), - CurrentInput(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12696,10 +14458,7 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SelectInput(0L), - ShowInputStatus(1L), - HideInputStatus(2L), - RenameInput(3L),; + SendKey(0L),; private final long id; Command(long id) { this.id = id; @@ -12717,34 +14476,17 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SelectInputCommandField {Index(0),; - private final int id; - SelectInputCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SelectInputCommandField value(int id) throws NoSuchFieldError { - for (SelectInputCommandField field : SelectInputCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum RenameInputCommandField {Index(0),Name(1),; + }public enum SendKeyCommandField {KeyCode(0),; private final int id; - RenameInputCommandField(int id) { + SendKeyCommandField(int id) { this.id = id; } public int getID() { return id; } - public static RenameInputCommandField value(int id) throws NoSuchFieldError { - for (RenameInputCommandField field : RenameInputCommandField.values()) { + public static SendKeyCommandField value(int id) throws NoSuchFieldError { + for (SendKeyCommandField field : SendKeyCommandField.values()) { if (field.getID() == id) { return field; } @@ -12781,13 +14523,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class LowPower implements BaseCluster { - public static final long ID = 1288L; + public static class ContentLauncher implements BaseCluster { + public static final long ID = 1290L; public long getID() { return ID; } public enum Attribute { + AcceptHeader(0L), + SupportedStreamingProtocols(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12834,7 +14578,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Sleep(0L),; + LaunchContent(0L), + LaunchURL(1L),; private final long id; Command(long id) { this.id = id; @@ -12852,7 +14597,41 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum LaunchContentCommandField {Search(0),AutoPlay(1),Data(2),PlaybackPreferences(3),UseCurrentContext(4),; + private final int id; + LaunchContentCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static LaunchContentCommandField value(int id) throws NoSuchFieldError { + for (LaunchContentCommandField field : LaunchContentCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum LaunchURLCommandField {ContentURL(0),DisplayString(1),BrandingInformation(2),; + private final int id; + LaunchURLCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static LaunchURLCommandField value(int id) throws NoSuchFieldError { + for (LaunchURLCommandField field : LaunchURLCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -12882,13 +14661,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class KeypadInput implements BaseCluster { - public static final long ID = 1289L; + public static class AudioOutput implements BaseCluster { + public static final long ID = 1291L; public long getID() { return ID; } public enum Attribute { + OutputList(0L), + CurrentOutput(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -12935,7 +14716,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SendKey(0L),; + SelectOutput(0L), + RenameOutput(1L),; private final long id; Command(long id) { this.id = id; @@ -12950,20 +14732,37 @@ public static Command value(long id) throws NoSuchFieldError { if (command.getID() == id) { return command; } - } - throw new NoSuchFieldError(); - } - }public enum SendKeyCommandField {KeyCode(0),; + } + throw new NoSuchFieldError(); + } + }public enum SelectOutputCommandField {Index(0),; + private final int id; + SelectOutputCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SelectOutputCommandField value(int id) throws NoSuchFieldError { + for (SelectOutputCommandField field : SelectOutputCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RenameOutputCommandField {Index(0),Name(1),; private final int id; - SendKeyCommandField(int id) { + RenameOutputCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SendKeyCommandField value(int id) throws NoSuchFieldError { - for (SendKeyCommandField field : SendKeyCommandField.values()) { + public static RenameOutputCommandField value(int id) throws NoSuchFieldError { + for (RenameOutputCommandField field : RenameOutputCommandField.values()) { if (field.getID() == id) { return field; } @@ -13000,15 +14799,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ContentLauncher implements BaseCluster { - public static final long ID = 1290L; + public static class ApplicationLauncher implements BaseCluster { + public static final long ID = 1292L; public long getID() { return ID; } public enum Attribute { - AcceptHeader(0L), - SupportedStreamingProtocols(1L), + CatalogList(0L), + CurrentApp(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -13055,8 +14854,9 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - LaunchContent(0L), - LaunchURL(1L),; + LaunchApp(0L), + StopApp(1L), + HideApp(2L),; private final long id; Command(long id) { this.id = id; @@ -13074,34 +14874,51 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum LaunchContentCommandField {Search(0),AutoPlay(1),Data(2),; + }public enum LaunchAppCommandField {Application(0),Data(1),; private final int id; - LaunchContentCommandField(int id) { + LaunchAppCommandField(int id) { this.id = id; } public int getID() { return id; } - public static LaunchContentCommandField value(int id) throws NoSuchFieldError { - for (LaunchContentCommandField field : LaunchContentCommandField.values()) { + public static LaunchAppCommandField value(int id) throws NoSuchFieldError { + for (LaunchAppCommandField field : LaunchAppCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum LaunchURLCommandField {ContentURL(0),DisplayString(1),BrandingInformation(2),; + }public enum StopAppCommandField {Application(0),; private final int id; - LaunchURLCommandField(int id) { + StopAppCommandField(int id) { this.id = id; } public int getID() { return id; } - public static LaunchURLCommandField value(int id) throws NoSuchFieldError { - for (LaunchURLCommandField field : LaunchURLCommandField.values()) { + public static StopAppCommandField value(int id) throws NoSuchFieldError { + for (StopAppCommandField field : StopAppCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum HideAppCommandField {Application(0),; + private final int id; + HideAppCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static HideAppCommandField value(int id) throws NoSuchFieldError { + for (HideAppCommandField field : HideAppCommandField.values()) { if (field.getID() == id) { return field; } @@ -13138,15 +14955,21 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class AudioOutput implements BaseCluster { - public static final long ID = 1291L; + public static class ApplicationBasic implements BaseCluster { + public static final long ID = 1293L; public long getID() { return ID; } public enum Attribute { - OutputList(0L), - CurrentOutput(1L), + VendorName(0L), + VendorID(1L), + ApplicationName(2L), + ProductID(3L), + Application(4L), + Status(5L), + ApplicationVersion(6L), + AllowedVendorList(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -13192,9 +15015,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - SelectOutput(0L), - RenameOutput(1L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -13212,41 +15033,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SelectOutputCommandField {Index(0),; - private final int id; - SelectOutputCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static SelectOutputCommandField value(int id) throws NoSuchFieldError { - for (SelectOutputCommandField field : SelectOutputCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum RenameOutputCommandField {Index(0),Name(1),; - private final int id; - RenameOutputCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static RenameOutputCommandField value(int id) throws NoSuchFieldError { - for (RenameOutputCommandField field : RenameOutputCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -13276,15 +15063,13 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ApplicationLauncher implements BaseCluster { - public static final long ID = 1292L; + public static class AccountLogin implements BaseCluster { + public static final long ID = 1294L; public long getID() { return ID; } public enum Attribute { - CatalogList(0L), - CurrentApp(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -13310,7 +15095,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + LoggedOut(0L),; private final long id; Event(long id) { this.id = id; @@ -13331,9 +15117,9 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - LaunchApp(0L), - StopApp(1L), - HideApp(2L),; + GetSetupPIN(0L), + Login(2L), + Logout(3L),; private final long id; Command(long id) { this.id = id; @@ -13351,51 +15137,51 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum LaunchAppCommandField {Application(0),Data(1),; + }public enum GetSetupPINCommandField {TempAccountIdentifier(0),; private final int id; - LaunchAppCommandField(int id) { + GetSetupPINCommandField(int id) { this.id = id; } public int getID() { return id; } - public static LaunchAppCommandField value(int id) throws NoSuchFieldError { - for (LaunchAppCommandField field : LaunchAppCommandField.values()) { + public static GetSetupPINCommandField value(int id) throws NoSuchFieldError { + for (GetSetupPINCommandField field : GetSetupPINCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum StopAppCommandField {Application(0),; + }public enum LoginCommandField {TempAccountIdentifier(0),SetupPIN(1),Node(2),; private final int id; - StopAppCommandField(int id) { + LoginCommandField(int id) { this.id = id; } public int getID() { return id; } - public static StopAppCommandField value(int id) throws NoSuchFieldError { - for (StopAppCommandField field : StopAppCommandField.values()) { + public static LoginCommandField value(int id) throws NoSuchFieldError { + for (LoginCommandField field : LoginCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum HideAppCommandField {Application(0),; + }public enum LogoutCommandField {Node(0),; private final int id; - HideAppCommandField(int id) { + LogoutCommandField(int id) { this.id = id; } public int getID() { return id; } - public static HideAppCommandField value(int id) throws NoSuchFieldError { - for (HideAppCommandField field : HideAppCommandField.values()) { + public static LogoutCommandField value(int id) throws NoSuchFieldError { + for (LogoutCommandField field : LogoutCommandField.values()) { if (field.getID() == id) { return field; } @@ -13432,21 +15218,21 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ApplicationBasic implements BaseCluster { - public static final long ID = 1293L; + public static class ContentControl implements BaseCluster { + public static final long ID = 1295L; public long getID() { return ID; } public enum Attribute { - VendorName(0L), - VendorID(1L), - ApplicationName(2L), - ProductID(3L), - Application(4L), - Status(5L), - ApplicationVersion(6L), - AllowedVendorList(7L), + Enabled(0L), + OnDemandRatings(1L), + OnDemandRatingThreshold(2L), + ScheduledContentRatings(3L), + ScheduledContentRatingThreshold(4L), + ScreenDailyTime(5L), + RemainingScreenTime(6L), + BlockUnrated(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -13472,7 +15258,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + RemainingScreenTimeExpired(0L),; private final long id; Event(long id) { this.id = id; @@ -13492,7 +15279,17 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command {; + public enum Command { + UpdatePIN(0L), + ResetPIN(1L), + Enable(3L), + Disable(4L), + AddBonusTime(5L), + SetScreenDailyTime(6L), + BlockUnratedContent(7L), + UnblockUnratedContent(8L), + SetOnDemandRatingThreshold(9L), + SetScheduledContentRatingThreshold(10L),; private final long id; Command(long id) { this.id = id; @@ -13510,7 +15307,92 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }public enum UpdatePINCommandField {OldPIN(0),NewPIN(1),; + private final int id; + UpdatePINCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static UpdatePINCommandField value(int id) throws NoSuchFieldError { + for (UpdatePINCommandField field : UpdatePINCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AddBonusTimeCommandField {PINCode(0),BonusTime(1),; + private final int id; + AddBonusTimeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddBonusTimeCommandField value(int id) throws NoSuchFieldError { + for (AddBonusTimeCommandField field : AddBonusTimeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetScreenDailyTimeCommandField {ScreenTime(0),; + private final int id; + SetScreenDailyTimeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetScreenDailyTimeCommandField value(int id) throws NoSuchFieldError { + for (SetScreenDailyTimeCommandField field : SetScreenDailyTimeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetOnDemandRatingThresholdCommandField {Rating(0),; + private final int id; + SetOnDemandRatingThresholdCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetOnDemandRatingThresholdCommandField value(int id) throws NoSuchFieldError { + for (SetOnDemandRatingThresholdCommandField field : SetOnDemandRatingThresholdCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetScheduledContentRatingThresholdCommandField {Rating(0),; + private final int id; + SetScheduledContentRatingThresholdCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetScheduledContentRatingThresholdCommandField value(int id) throws NoSuchFieldError { + for (SetScheduledContentRatingThresholdCommandField field : SetScheduledContentRatingThresholdCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -13540,8 +15422,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class AccountLogin implements BaseCluster { - public static final long ID = 1294L; + public static class ContentAppObserver implements BaseCluster { + public static final long ID = 1296L; public long getID() { return ID; } @@ -13593,9 +15475,7 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - GetSetupPIN(0L), - Login(2L), - Logout(3L),; + ContentAppMessage(0L),; private final long id; Command(long id) { this.id = id; @@ -13613,34 +15493,17 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum GetSetupPINCommandField {TempAccountIdentifier(0),; - private final int id; - GetSetupPINCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static GetSetupPINCommandField value(int id) throws NoSuchFieldError { - for (GetSetupPINCommandField field : GetSetupPINCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum LoginCommandField {TempAccountIdentifier(0),SetupPIN(1),; + }public enum ContentAppMessageCommandField {Data(0),EncodingHint(1),; private final int id; - LoginCommandField(int id) { + ContentAppMessageCommandField(int id) { this.id = id; } public int getID() { return id; } - public static LoginCommandField value(int id) throws NoSuchFieldError { - for (LoginCommandField field : LoginCommandField.values()) { + public static ContentAppMessageCommandField value(int id) throws NoSuchFieldError { + for (ContentAppMessageCommandField field : ContentAppMessageCommandField.values()) { if (field.getID() == id) { return field; } @@ -14588,7 +16451,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + PingCountEvent(0L),; private final long id; Event(long id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 45eeedd8723d6a..601c43a38b210f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -750,6 +750,27 @@ public void onError(Exception ex) { } } + public static class DelegatedScenesClusterFabricSceneInfoAttributeCallback implements ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedScenesClusterGeneratedCommandListAttributeCallback implements ChipClusters.ScenesCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -3675,13 +3696,13 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Long systemTimeUs, @Nullable Long UTCTimeUs) { + public void onSuccess(Long systemTimeMs, @Nullable Long posixTimeMs) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo systemTimeUsResponseValue = new CommandResponseInfo("systemTimeUs", "Long"); - responseValues.put(systemTimeUsResponseValue, systemTimeUs); - CommandResponseInfo UTCTimeUsResponseValue = new CommandResponseInfo("UTCTimeUs", "Long"); - responseValues.put(UTCTimeUsResponseValue, UTCTimeUs); + CommandResponseInfo systemTimeMsResponseValue = new CommandResponseInfo("systemTimeMs", "Long"); + responseValues.put(systemTimeMsResponseValue, systemTimeMs); + CommandResponseInfo posixTimeMsResponseValue = new CommandResponseInfo("posixTimeMs", "Long"); + responseValues.put(posixTimeMsResponseValue, posixTimeMs); callback.onSuccess(responseValues); } @@ -6500,7 +6521,8 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedIcdManagementClusterRegisteredClientsAttributeCallback implements ChipClusters.IcdManagementCluster.RegisteredClientsAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedIcdManagementClusterStayActiveResponseCallback implements ChipClusters.IcdManagementCluster.StayActiveResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6508,20 +6530,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Long promisedActiveDuration) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo promisedActiveDurationResponseValue = new CommandResponseInfo("promisedActiveDuration", "Long"); + responseValues.put(promisedActiveDurationResponseValue, promisedActiveDuration); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedIcdManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterRegisteredClientsAttributeCallback implements ChipClusters.IcdManagementCluster.RegisteredClientsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6529,9 +6551,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6542,7 +6564,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6563,7 +6585,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterEventListAttributeCallback implements ChipClusters.IcdManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6584,7 +6606,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterAttributeListAttributeCallback implements ChipClusters.IcdManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterEventListAttributeCallback implements ChipClusters.IcdManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6605,29 +6627,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOvenOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OvenOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(ChipStructs.OvenOperationalStateClusterErrorStateStruct commandResponseState) { - Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedOvenOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterAttributeListAttributeCallback implements ChipClusters.IcdManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6635,9 +6635,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6648,49 +6648,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OvenOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedOvenOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OvenOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Long value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedOvenOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimerCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6698,9 +6656,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6711,7 +6669,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OvenOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimerCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6719,10 +6677,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OvenOperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OvenOperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6732,7 +6690,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterEventListAttributeCallback implements ChipClusters.TimerCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6753,7 +6711,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterAttributeListAttributeCallback implements ChipClusters.TimerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6774,7 +6732,8 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenOperationalStateClusterEventListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6782,20 +6741,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedOvenOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OvenOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6803,9 +6762,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6816,7 +6775,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6837,7 +6796,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6845,10 +6804,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6858,7 +6817,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6866,10 +6825,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6879,7 +6838,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6887,9 +6846,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6900,7 +6859,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6921,7 +6880,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6942,7 +6901,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterEventListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6963,7 +6922,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6985,7 +6944,7 @@ public void onError(Exception ex) { } - public static class DelegatedLaundryWasherModeClusterChangeToModeResponseCallback implements ChipClusters.LaundryWasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterChangeToModeResponseCallback implements ChipClusters.OvenModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7008,7 +6967,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedLaundryWasherModeClusterSupportedModesAttributeCallback implements ChipClusters.LaundryWasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.OvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7016,9 +6975,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7029,7 +6988,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterStartUpModeAttributeCallback implements ChipClusters.OvenModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7050,7 +7009,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterOnModeAttributeCallback implements ChipClusters.OvenModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7071,7 +7030,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7092,7 +7051,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7113,7 +7072,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterEventListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterEventListAttributeCallback implements ChipClusters.OvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7134,7 +7093,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterAttributeListAttributeCallback implements ChipClusters.OvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7155,31 +7114,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Optional statusText) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterSupportedModesAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterSupportedDrynessLevelsAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SupportedDrynessLevelsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7187,9 +7122,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7200,7 +7135,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterSelectedDrynessLevelAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SelectedDrynessLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7221,7 +7156,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7229,10 +7164,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7242,7 +7177,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7263,7 +7198,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterEventListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7284,7 +7219,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7305,7 +7240,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7313,10 +7248,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7326,7 +7261,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7334,9 +7269,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7347,7 +7282,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7368,7 +7303,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7376,10 +7311,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7389,7 +7324,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7410,7 +7345,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7431,7 +7366,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7452,7 +7387,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7474,7 +7409,7 @@ public void onError(Exception ex) { } - public static class DelegatedRvcRunModeClusterChangeToModeResponseCallback implements ChipClusters.RvcRunModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterChangeToModeResponseCallback implements ChipClusters.LaundryWasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7497,7 +7432,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedRvcRunModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcRunModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterSupportedModesAttributeCallback implements ChipClusters.LaundryWasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7505,9 +7440,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7518,7 +7453,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7539,7 +7474,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7547,10 +7482,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7560,7 +7495,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7581,7 +7516,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterEventListAttributeCallback implements ChipClusters.RvcRunModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7602,7 +7537,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterAttributeListAttributeCallback implements ChipClusters.RvcRunModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterEventListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7623,8 +7558,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedRvcCleanModeClusterChangeToModeResponseCallback implements ChipClusters.RvcCleanModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7632,22 +7566,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional statusText) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedRvcCleanModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcCleanModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + + + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7655,20 +7588,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterSupportedModesAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7676,10 +7611,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7689,7 +7624,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7697,10 +7632,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7710,7 +7645,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7718,10 +7653,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7731,7 +7666,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterEventListAttributeCallback implements ChipClusters.RvcCleanModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7752,7 +7687,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterAttributeListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7773,7 +7708,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterSupportedTemperatureLevelsAttributeCallback implements ChipClusters.TemperatureControlCluster.SupportedTemperatureLevelsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7781,9 +7716,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7794,7 +7729,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7815,7 +7750,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7823,9 +7758,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7836,7 +7771,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterEventListAttributeCallback implements ChipClusters.TemperatureControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7844,10 +7779,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7857,7 +7792,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterAttributeListAttributeCallback implements ChipClusters.TemperatureControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7865,9 +7800,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7878,7 +7813,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7899,7 +7834,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7920,7 +7855,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7941,7 +7876,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7963,7 +7898,7 @@ public void onError(Exception ex) { } - public static class DelegatedDishwasherModeClusterChangeToModeResponseCallback implements ChipClusters.DishwasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterChangeToModeResponseCallback implements ChipClusters.RvcRunModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7986,7 +7921,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedDishwasherModeClusterSupportedModesAttributeCallback implements ChipClusters.DishwasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcRunModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7994,9 +7929,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8007,7 +7942,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8028,7 +7963,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8036,10 +7971,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8049,7 +7984,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8070,7 +8005,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterEventListAttributeCallback implements ChipClusters.RvcRunModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8091,7 +8026,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterEventListAttributeCallback implements ChipClusters.DishwasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterAttributeListAttributeCallback implements ChipClusters.RvcRunModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8112,7 +8047,8 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterAttributeListAttributeCallback implements ChipClusters.DishwasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRvcCleanModeClusterChangeToModeResponseCallback implements ChipClusters.RvcCleanModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8120,20 +8056,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedAirQualityClusterGeneratedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcCleanModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8141,9 +8079,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8154,7 +8092,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterAcceptedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8162,10 +8100,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8175,7 +8113,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterEventListAttributeCallback implements ChipClusters.AirQualityCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8196,7 +8134,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterAttributeListAttributeCallback implements ChipClusters.AirQualityCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8217,7 +8155,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterEventListAttributeCallback implements ChipClusters.RvcCleanModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8238,7 +8176,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterAttributeListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8259,7 +8197,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterSupportedTemperatureLevelsAttributeCallback implements ChipClusters.TemperatureControlCluster.SupportedTemperatureLevelsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8267,9 +8205,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8280,7 +8218,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8301,7 +8239,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8322,7 +8260,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterEventListAttributeCallback implements ChipClusters.TemperatureControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8343,7 +8281,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterAttributeListAttributeCallback implements ChipClusters.TemperatureControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8364,7 +8302,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8385,7 +8323,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8393,9 +8331,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8406,7 +8344,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8427,7 +8365,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8448,7 +8386,8 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedDishwasherModeClusterChangeToModeResponseCallback implements ChipClusters.DishwasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8456,20 +8395,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterSupportedModesAttributeCallback implements ChipClusters.DishwasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8477,9 +8418,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8490,7 +8431,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8498,10 +8439,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8511,7 +8452,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8519,10 +8460,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8532,7 +8473,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8553,7 +8494,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8574,8 +8515,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterEventListAttributeCallback implements ChipClusters.DishwasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8583,20 +8523,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedDishwasherModeClusterAttributeListAttributeCallback implements ChipClusters.DishwasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8604,9 +8544,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8617,7 +8557,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterGeneratedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8625,11 +8565,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); } @Override @@ -8638,7 +8578,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterAcceptedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8646,10 +8586,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8659,7 +8599,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterEventListAttributeCallback implements ChipClusters.AirQualityCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8667,9 +8607,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8680,7 +8620,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterAttributeListAttributeCallback implements ChipClusters.AirQualityCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8688,10 +8628,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8701,7 +8641,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8722,7 +8662,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8743,7 +8683,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8764,7 +8704,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8785,8 +8725,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8794,20 +8733,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8815,9 +8754,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8828,7 +8767,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8836,10 +8775,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8849,7 +8788,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8857,10 +8796,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8870,7 +8809,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8878,9 +8817,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8891,7 +8830,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8899,10 +8838,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8912,7 +8851,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8933,7 +8872,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8954,7 +8893,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8975,7 +8914,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8996,7 +8935,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9004,10 +8943,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9017,7 +8956,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9025,9 +8964,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9038,7 +8977,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9059,7 +8998,8 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9067,20 +9007,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedHepaFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9088,9 +9028,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9101,7 +9041,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9109,10 +9049,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9122,7 +9062,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9143,7 +9083,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9151,9 +9091,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9164,7 +9104,28 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9185,7 +9146,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9206,7 +9167,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9227,7 +9188,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9249,7 +9210,7 @@ public void onError(Exception ex) { } - public static class DelegatedDoorLockClusterGetWeekDayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetWeekDayScheduleResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9257,25 +9218,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer weekDayIndex, Integer userIndex, Integer status, Optional daysMask, Optional startHour, Optional startMinute, Optional endHour, Optional endMinute) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo weekDayIndexResponseValue = new CommandResponseInfo("weekDayIndex", "Integer"); - responseValues.put(weekDayIndexResponseValue, weekDayIndex); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); - responseValues.put(userIndexResponseValue, userIndex); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo daysMaskResponseValue = new CommandResponseInfo("daysMask", "Optional"); - responseValues.put(daysMaskResponseValue, daysMask); - CommandResponseInfo startHourResponseValue = new CommandResponseInfo("startHour", "Optional"); - responseValues.put(startHourResponseValue, startHour); - CommandResponseInfo startMinuteResponseValue = new CommandResponseInfo("startMinute", "Optional"); - responseValues.put(startMinuteResponseValue, startMinute); - CommandResponseInfo endHourResponseValue = new CommandResponseInfo("endHour", "Optional"); - responseValues.put(endHourResponseValue, endHour); - CommandResponseInfo endMinuteResponseValue = new CommandResponseInfo("endMinute", "Optional"); - responseValues.put(endMinuteResponseValue, endMinute); + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @@ -9284,8 +9231,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - - public static class DelegatedDoorLockClusterGetYearDayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetYearDayScheduleResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9293,29 +9239,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer yearDayIndex, Integer userIndex, Integer status, Optional localStartTime, Optional localEndTime) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo yearDayIndexResponseValue = new CommandResponseInfo("yearDayIndex", "Integer"); - responseValues.put(yearDayIndexResponseValue, yearDayIndex); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); - responseValues.put(userIndexResponseValue, userIndex); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo localStartTimeResponseValue = new CommandResponseInfo("localStartTime", "Optional"); - responseValues.put(localStartTimeResponseValue, localStartTime); - CommandResponseInfo localEndTimeResponseValue = new CommandResponseInfo("localEndTime", "Optional"); - responseValues.put(localEndTimeResponseValue, localEndTime); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedDoorLockClusterGetHolidayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9323,29 +9260,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer holidayIndex, Integer status, Optional localStartTime, Optional localEndTime, Optional operatingMode) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo holidayIndexResponseValue = new CommandResponseInfo("holidayIndex", "Integer"); - responseValues.put(holidayIndexResponseValue, holidayIndex); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo localStartTimeResponseValue = new CommandResponseInfo("localStartTime", "Optional"); - responseValues.put(localStartTimeResponseValue, localStartTime); - CommandResponseInfo localEndTimeResponseValue = new CommandResponseInfo("localEndTime", "Optional"); - responseValues.put(localEndTimeResponseValue, localEndTime); - CommandResponseInfo operatingModeResponseValue = new CommandResponseInfo("operatingMode", "Optional"); - responseValues.put(operatingModeResponseValue, operatingMode); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedDoorLockClusterGetUserResponseCallback implements ChipClusters.DoorLockCluster.GetUserResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9353,95 +9281,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextUserIndex) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); - responseValues.put(userIndexResponseValue, userIndex); - CommandResponseInfo userNameResponseValue = new CommandResponseInfo("userName", "String"); - responseValues.put(userNameResponseValue, userName); - CommandResponseInfo userUniqueIDResponseValue = new CommandResponseInfo("userUniqueID", "Long"); - responseValues.put(userUniqueIDResponseValue, userUniqueID); - CommandResponseInfo userStatusResponseValue = new CommandResponseInfo("userStatus", "Integer"); - responseValues.put(userStatusResponseValue, userStatus); - CommandResponseInfo userTypeResponseValue = new CommandResponseInfo("userType", "Integer"); - responseValues.put(userTypeResponseValue, userType); - CommandResponseInfo credentialRuleResponseValue = new CommandResponseInfo("credentialRule", "Integer"); - responseValues.put(credentialRuleResponseValue, credentialRule); - // credentials: CredentialStruct - // Conversion from this type to Java is not properly implemented yet - - CommandResponseInfo creatorFabricIndexResponseValue = new CommandResponseInfo("creatorFabricIndex", "Integer"); - responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); - CommandResponseInfo lastModifiedFabricIndexResponseValue = new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); - responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); - CommandResponseInfo nextUserIndexResponseValue = new CommandResponseInfo("nextUserIndex", "Integer"); - responseValues.put(nextUserIndexResponseValue, nextUserIndex); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedDoorLockClusterSetCredentialResponseCallback implements ChipClusters.DoorLockCluster.SetCredentialResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, @Nullable Integer userIndex, @Nullable Integer nextCredentialIndex) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); - responseValues.put(userIndexResponseValue, userIndex); - CommandResponseInfo nextCredentialIndexResponseValue = new CommandResponseInfo("nextCredentialIndex", "Integer"); - responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); - callback.onSuccess(responseValues); - } + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedDoorLockClusterGetCredentialStatusResponseCallback implements ChipClusters.DoorLockCluster.GetCredentialStatusResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Boolean credentialExists, @Nullable Integer userIndex, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo credentialExistsResponseValue = new CommandResponseInfo("credentialExists", "Boolean"); - responseValues.put(credentialExistsResponseValue, credentialExists); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); - responseValues.put(userIndexResponseValue, userIndex); - CommandResponseInfo creatorFabricIndexResponseValue = new CommandResponseInfo("creatorFabricIndex", "Integer"); - responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); - CommandResponseInfo lastModifiedFabricIndexResponseValue = new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); - responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); - CommandResponseInfo nextCredentialIndexResponseValue = new CommandResponseInfo("nextCredentialIndex", "Integer"); - responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedDoorLockClusterLockStateAttributeCallback implements ChipClusters.DoorLockCluster.LockStateAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9449,10 +9302,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9462,7 +9315,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDoorLockClusterDoorStateAttributeCallback implements ChipClusters.DoorLockCluster.DoorStateAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9470,9 +9323,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9483,7 +9336,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDoorLockClusterGeneratedCommandListAttributeCallback implements ChipClusters.DoorLockCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9504,7 +9357,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDoorLockClusterAcceptedCommandListAttributeCallback implements ChipClusters.DoorLockCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9525,7 +9378,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDoorLockClusterEventListAttributeCallback implements ChipClusters.DoorLockCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9546,7 +9399,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDoorLockClusterAttributeListAttributeCallback implements ChipClusters.DoorLockCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9567,7 +9420,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionLiftAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9575,9 +9428,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9588,7 +9441,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionTiltAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9596,10 +9449,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9609,7 +9462,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionLiftPercentageAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftPercentageAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9617,10 +9470,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9630,7 +9483,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionTiltPercentageAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltPercentageAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9638,10 +9491,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9651,7 +9504,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterTargetPositionLiftPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.TargetPositionLiftPercent100thsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9659,10 +9512,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9672,7 +9525,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterTargetPositionTiltPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.TargetPositionTiltPercent100thsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9680,10 +9533,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9693,7 +9546,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionLiftPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftPercent100thsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9701,9 +9554,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9714,7 +9567,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterCurrentPositionTiltPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltPercent100thsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9722,10 +9575,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9735,7 +9588,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterGeneratedCommandListAttributeCallback implements ChipClusters.WindowCoveringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9756,7 +9609,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterAcceptedCommandListAttributeCallback implements ChipClusters.WindowCoveringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9777,7 +9630,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterEventListAttributeCallback implements ChipClusters.WindowCoveringCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9798,7 +9651,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWindowCoveringClusterAttributeListAttributeCallback implements ChipClusters.WindowCoveringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9819,7 +9672,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBarrierControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9840,7 +9693,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBarrierControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9861,7 +9714,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBarrierControlClusterEventListAttributeCallback implements ChipClusters.BarrierControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterEventListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9882,7 +9735,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBarrierControlClusterAttributeListAttributeCallback implements ChipClusters.BarrierControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9903,7 +9756,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxPressureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterOpenDurationAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.OpenDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9911,9 +9764,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9924,7 +9777,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxSpeedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterDefaultOpenDurationAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.DefaultOpenDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9932,9 +9785,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9945,7 +9798,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxFlowAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAutoCloseTimeAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AutoCloseTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9953,9 +9806,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9966,7 +9819,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMinConstPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstPressureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterRemainingDurationAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.RemainingDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9974,9 +9827,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9987,7 +9840,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxConstPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstPressureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterCurrentStateAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.CurrentStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10008,7 +9861,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMinCompPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinCompPressureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterTargetStateAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.TargetStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10029,7 +9882,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxCompPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxCompPressureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterCurrentLevelAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.CurrentLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10050,7 +9903,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMinConstSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstSpeedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterTargetLevelAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.TargetLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10071,7 +9924,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxConstSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstSpeedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10079,10 +9932,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10092,7 +9945,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMinConstFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstFlowAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10100,10 +9953,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10113,7 +9966,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxConstFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstFlowAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterEventListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10121,10 +9974,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10134,7 +9987,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMinConstTempAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstTempAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10142,10 +9995,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10155,7 +10008,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterMaxConstTempAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstTempAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterAccuracyAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.AccuracyAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10163,9 +10016,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10176,7 +10029,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterCapacityAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.CapacityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterCumulativeEnergyImportedAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.CumulativeEnergyImportedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10184,9 +10037,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10197,7 +10050,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.SpeedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterCumulativeEnergyExportedAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.CumulativeEnergyExportedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10205,9 +10058,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10218,7 +10071,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterLifetimeRunningHoursAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.LifetimeRunningHoursAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterPeriodicEnergyImportedAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.PeriodicEnergyImportedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10226,9 +10079,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10239,7 +10092,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterPowerAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.PowerAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterPeriodicEnergyExportedAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.PeriodicEnergyExportedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10247,9 +10100,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10260,7 +10113,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterLifetimeEnergyConsumedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.LifetimeEnergyConsumedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10268,10 +10121,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10281,7 +10134,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10302,7 +10155,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterEventListAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10323,7 +10176,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterEventListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedElectricalEnergyMeasurementClusterAttributeListAttributeCallback implements ChipClusters.ElectricalEnergyMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10344,7 +10197,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterLoadControlProgramsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.LoadControlProgramsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10352,9 +10205,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10365,8 +10218,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedThermostatClusterGetWeeklyScheduleResponseCallback implements ChipClusters.ThermostatCluster.GetWeeklyScheduleResponseCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterEventsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.EventsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10374,82 +10226,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); - responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); - CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); - responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); - CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); - responseValues.put(modeForSequenceResponseValue, modeForSequence); - // transitions: ThermostatScheduleTransition - // Conversion from this type to Java is not properly implemented yet - - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedThermostatClusterOutdoorTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback implements ChipClusters.ThermostatCluster.TemperatureSetpointHoldDurationAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } @Override public void onError(Exception ex) { @@ -10457,7 +10239,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterSetpointChangeAmountAttributeCallback implements ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterActiveEventsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.ActiveEventsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10465,10 +10247,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10478,7 +10260,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10486,10 +10268,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10499,7 +10281,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10507,10 +10289,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10520,7 +10302,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterEventListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10528,10 +10310,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10541,7 +10323,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDemandResponseLoadControlClusterAttributeListAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10549,10 +10331,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10562,7 +10344,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterPowerAdjustmentCapabilityAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.PowerAdjustmentCapabilityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10570,10 +10352,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10583,7 +10365,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterForecastAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.ForecastAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10591,9 +10373,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable ChipStructs.DeviceEnergyManagementClusterForecastStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.DeviceEnergyManagementClusterForecastStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10604,7 +10386,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterACCoilTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10612,10 +10394,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -10625,7 +10407,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10646,7 +10428,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterAcceptedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterEventListAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10667,7 +10449,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterEventListAttributeCallback implements ChipClusters.ThermostatCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDeviceEnergyManagementClusterAttributeListAttributeCallback implements ChipClusters.DeviceEnergyManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10688,7 +10470,8 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterAttributeListAttributeCallback implements ChipClusters.ThermostatCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedEnergyEvseClusterGetTargetsResponseCallback implements ChipClusters.EnergyEvseCluster.GetTargetsResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10696,20 +10479,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer dayOfWeekforSequence, ArrayList chargingTargets) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo dayOfWeekforSequenceResponseValue = new CommandResponseInfo("dayOfWeekforSequence", "Integer"); + responseValues.put(dayOfWeekforSequenceResponseValue, dayOfWeekforSequence); + // chargingTargets: ChargingTargetStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedFanControlClusterPercentSettingAttributeCallback implements ChipClusters.FanControlCluster.PercentSettingAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterStateAttributeCallback implements ChipClusters.EnergyEvseCluster.StateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10730,7 +10516,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFanControlClusterSpeedSettingAttributeCallback implements ChipClusters.FanControlCluster.SpeedSettingAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterChargingEnabledUntilAttributeCallback implements ChipClusters.EnergyEvseCluster.ChargingEnabledUntilAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10738,9 +10524,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10751,7 +10537,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFanControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.FanControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterDischargingEnabledUntilAttributeCallback implements ChipClusters.EnergyEvseCluster.DischargingEnabledUntilAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10759,10 +10545,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10772,7 +10558,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFanControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.FanControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterNextChargeStartTimeAttributeCallback implements ChipClusters.EnergyEvseCluster.NextChargeStartTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10780,10 +10566,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10793,7 +10579,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFanControlClusterEventListAttributeCallback implements ChipClusters.FanControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterNextChargeTargetTimeAttributeCallback implements ChipClusters.EnergyEvseCluster.NextChargeTargetTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10801,10 +10587,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10814,7 +10600,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFanControlClusterAttributeListAttributeCallback implements ChipClusters.FanControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterNextChargeRequiredEnergyAttributeCallback implements ChipClusters.EnergyEvseCluster.NextChargeRequiredEnergyAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10822,10 +10608,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10835,7 +10621,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatUserInterfaceConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterNextChargeTargetSoCAttributeCallback implements ChipClusters.EnergyEvseCluster.NextChargeTargetSoCAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10843,10 +10629,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10856,7 +10642,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatUserInterfaceConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterApproximateEVEfficiencyAttributeCallback implements ChipClusters.EnergyEvseCluster.ApproximateEVEfficiencyAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10864,10 +10650,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10877,7 +10663,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatUserInterfaceConfigurationClusterEventListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterStateOfChargeAttributeCallback implements ChipClusters.EnergyEvseCluster.StateOfChargeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10885,10 +10671,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10898,7 +10684,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterBatteryCapacityAttributeCallback implements ChipClusters.EnergyEvseCluster.BatteryCapacityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10906,10 +10692,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10919,7 +10705,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterNumberOfPrimariesAttributeCallback implements ChipClusters.ColorControlCluster.NumberOfPrimariesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterVehicleIDAttributeCallback implements ChipClusters.EnergyEvseCluster.VehicleIDAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10927,9 +10713,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable String value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10940,7 +10726,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary1IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary1IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterSessionIDAttributeCallback implements ChipClusters.EnergyEvseCluster.SessionIDAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10948,9 +10734,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10961,7 +10747,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary2IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary2IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterSessionDurationAttributeCallback implements ChipClusters.EnergyEvseCluster.SessionDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10969,9 +10755,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -10982,7 +10768,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary3IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary3IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterSessionEnergyChargedAttributeCallback implements ChipClusters.EnergyEvseCluster.SessionEnergyChargedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -10990,9 +10776,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11003,7 +10789,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary4IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary4IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterSessionEnergyDischargedAttributeCallback implements ChipClusters.EnergyEvseCluster.SessionEnergyDischargedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11011,9 +10797,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11024,7 +10810,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary5IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary5IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterGeneratedCommandListAttributeCallback implements ChipClusters.EnergyEvseCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11032,10 +10818,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11045,7 +10831,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterPrimary6IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary6IntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterAcceptedCommandListAttributeCallback implements ChipClusters.EnergyEvseCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11053,10 +10839,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11066,7 +10852,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterColorPointRIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointRIntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterEventListAttributeCallback implements ChipClusters.EnergyEvseCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11074,10 +10860,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11087,7 +10873,7 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterColorPointGIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointGIntensityAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEnergyEvseClusterAttributeListAttributeCallback implements ChipClusters.EnergyEvseCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11095,10 +10881,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11108,7 +10894,8 @@ public void onError(Exception ex) { } } - public static class DelegatedColorControlClusterColorPointBIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointBIntensityAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedDoorLockClusterGetWeekDayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetWeekDayScheduleResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11116,20 +10903,35 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Integer weekDayIndex, Integer userIndex, Integer status, Optional daysMask, Optional startHour, Optional startMinute, Optional endHour, Optional endMinute) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo weekDayIndexResponseValue = new CommandResponseInfo("weekDayIndex", "Integer"); + responseValues.put(weekDayIndexResponseValue, weekDayIndex); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); + responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo daysMaskResponseValue = new CommandResponseInfo("daysMask", "Optional"); + responseValues.put(daysMaskResponseValue, daysMask); + CommandResponseInfo startHourResponseValue = new CommandResponseInfo("startHour", "Optional"); + responseValues.put(startHourResponseValue, startHour); + CommandResponseInfo startMinuteResponseValue = new CommandResponseInfo("startMinute", "Optional"); + responseValues.put(startMinuteResponseValue, startMinute); + CommandResponseInfo endHourResponseValue = new CommandResponseInfo("endHour", "Optional"); + responseValues.put(endHourResponseValue, endHour); + CommandResponseInfo endMinuteResponseValue = new CommandResponseInfo("endMinute", "Optional"); + responseValues.put(endMinuteResponseValue, endMinute); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedColorControlClusterStartUpColorTemperatureMiredsAttributeCallback implements ChipClusters.ColorControlCluster.StartUpColorTemperatureMiredsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterGetYearDayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetYearDayScheduleResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11137,20 +10939,29 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Integer yearDayIndex, Integer userIndex, Integer status, Optional localStartTime, Optional localEndTime) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo yearDayIndexResponseValue = new CommandResponseInfo("yearDayIndex", "Integer"); + responseValues.put(yearDayIndexResponseValue, yearDayIndex); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); + responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo localStartTimeResponseValue = new CommandResponseInfo("localStartTime", "Optional"); + responseValues.put(localStartTimeResponseValue, localStartTime); + CommandResponseInfo localEndTimeResponseValue = new CommandResponseInfo("localEndTime", "Optional"); + responseValues.put(localEndTimeResponseValue, localEndTime); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedColorControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ColorControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterGetHolidayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11158,20 +10969,29 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer holidayIndex, Integer status, Optional localStartTime, Optional localEndTime, Optional operatingMode) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo holidayIndexResponseValue = new CommandResponseInfo("holidayIndex", "Integer"); + responseValues.put(holidayIndexResponseValue, holidayIndex); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo localStartTimeResponseValue = new CommandResponseInfo("localStartTime", "Optional"); + responseValues.put(localStartTimeResponseValue, localStartTime); + CommandResponseInfo localEndTimeResponseValue = new CommandResponseInfo("localEndTime", "Optional"); + responseValues.put(localEndTimeResponseValue, localEndTime); + CommandResponseInfo operatingModeResponseValue = new CommandResponseInfo("operatingMode", "Optional"); + responseValues.put(operatingModeResponseValue, operatingMode); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedColorControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.ColorControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterGetUserResponseCallback implements ChipClusters.DoorLockCluster.GetUserResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11179,20 +10999,40 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextUserIndex) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); + responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo userNameResponseValue = new CommandResponseInfo("userName", "String"); + responseValues.put(userNameResponseValue, userName); + CommandResponseInfo userUniqueIDResponseValue = new CommandResponseInfo("userUniqueID", "Long"); + responseValues.put(userUniqueIDResponseValue, userUniqueID); + CommandResponseInfo userStatusResponseValue = new CommandResponseInfo("userStatus", "Integer"); + responseValues.put(userStatusResponseValue, userStatus); + CommandResponseInfo userTypeResponseValue = new CommandResponseInfo("userType", "Integer"); + responseValues.put(userTypeResponseValue, userType); + CommandResponseInfo credentialRuleResponseValue = new CommandResponseInfo("credentialRule", "Integer"); + responseValues.put(credentialRuleResponseValue, credentialRule); + // credentials: CredentialStruct + // Conversion from this type to Java is not properly implemented yet + + CommandResponseInfo creatorFabricIndexResponseValue = new CommandResponseInfo("creatorFabricIndex", "Integer"); + responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); + CommandResponseInfo lastModifiedFabricIndexResponseValue = new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); + responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); + CommandResponseInfo nextUserIndexResponseValue = new CommandResponseInfo("nextUserIndex", "Integer"); + responseValues.put(nextUserIndexResponseValue, nextUserIndex); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedColorControlClusterEventListAttributeCallback implements ChipClusters.ColorControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterSetCredentialResponseCallback implements ChipClusters.DoorLockCluster.SetCredentialResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11200,20 +11040,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, @Nullable Integer userIndex, @Nullable Integer nextCredentialIndex) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); + responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo nextCredentialIndexResponseValue = new CommandResponseInfo("nextCredentialIndex", "Integer"); + responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedColorControlClusterAttributeListAttributeCallback implements ChipClusters.ColorControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterGetCredentialStatusResponseCallback implements ChipClusters.DoorLockCluster.GetCredentialStatusResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11221,20 +11066,28 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Boolean credentialExists, @Nullable Integer userIndex, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo credentialExistsResponseValue = new CommandResponseInfo("credentialExists", "Boolean"); + responseValues.put(credentialExistsResponseValue, credentialExists); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); + responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo creatorFabricIndexResponseValue = new CommandResponseInfo("creatorFabricIndex", "Integer"); + responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); + CommandResponseInfo lastModifiedFabricIndexResponseValue = new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); + responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); + CommandResponseInfo nextCredentialIndexResponseValue = new CommandResponseInfo("nextCredentialIndex", "Integer"); + responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedBallastConfigurationClusterIntrinsicBallastFactorAttributeCallback implements ChipClusters.BallastConfigurationCluster.IntrinsicBallastFactorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterLockStateAttributeCallback implements ChipClusters.DoorLockCluster.LockStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11255,7 +11108,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterBallastFactorAdjustmentAttributeCallback implements ChipClusters.BallastConfigurationCluster.BallastFactorAdjustmentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterDoorStateAttributeCallback implements ChipClusters.DoorLockCluster.DoorStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11276,7 +11129,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterLampRatedHoursAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampRatedHoursAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterGeneratedCommandListAttributeCallback implements ChipClusters.DoorLockCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11284,10 +11137,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11297,7 +11150,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterLampBurnHoursAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampBurnHoursAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterAcceptedCommandListAttributeCallback implements ChipClusters.DoorLockCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11305,10 +11158,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11318,7 +11171,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterLampBurnHoursTripPointAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampBurnHoursTripPointAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterEventListAttributeCallback implements ChipClusters.DoorLockCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11326,10 +11179,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11339,7 +11192,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BallastConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDoorLockClusterAttributeListAttributeCallback implements ChipClusters.DoorLockCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11360,7 +11213,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BallastConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionLiftAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11368,10 +11221,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11381,7 +11234,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterEventListAttributeCallback implements ChipClusters.BallastConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionTiltAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11389,10 +11242,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11402,7 +11255,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBallastConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BallastConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionLiftPercentageAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftPercentageAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11410,10 +11263,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11423,7 +11276,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionTiltPercentageAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltPercentageAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11444,7 +11297,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterTargetPositionLiftPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.TargetPositionLiftPercent100thsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11465,7 +11318,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterTargetPositionTiltPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.TargetPositionTiltPercent100thsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11486,7 +11339,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterLightSensorTypeAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.LightSensorTypeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionLiftPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionLiftPercent100thsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11507,7 +11360,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterCurrentPositionTiltPercent100thsAttributeCallback implements ChipClusters.WindowCoveringCluster.CurrentPositionTiltPercent100thsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11515,10 +11368,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11528,7 +11381,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterGeneratedCommandListAttributeCallback implements ChipClusters.WindowCoveringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11549,7 +11402,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterEventListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterAcceptedCommandListAttributeCallback implements ChipClusters.WindowCoveringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11570,7 +11423,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIlluminanceMeasurementClusterAttributeListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterEventListAttributeCallback implements ChipClusters.WindowCoveringCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11591,7 +11444,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWindowCoveringClusterAttributeListAttributeCallback implements ChipClusters.WindowCoveringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11599,10 +11452,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11612,7 +11465,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBarrierControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11620,10 +11473,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11633,7 +11486,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBarrierControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11641,10 +11494,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -11654,7 +11507,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBarrierControlClusterEventListAttributeCallback implements ChipClusters.BarrierControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11675,7 +11528,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBarrierControlClusterAttributeListAttributeCallback implements ChipClusters.BarrierControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11696,7 +11549,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterEventListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxPressureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11704,10 +11557,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11717,7 +11570,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureMeasurementClusterAttributeListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxSpeedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11725,10 +11578,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11738,7 +11591,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxFlowAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11759,7 +11612,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMinConstPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstPressureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11780,7 +11633,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxConstPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstPressureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11801,7 +11654,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.ScaledValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMinCompPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinCompPressureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11822,7 +11675,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterMinScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MinScaledValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxCompPressureAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxCompPressureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11843,7 +11696,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterMaxScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MaxScaledValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMinConstSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstSpeedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11864,7 +11717,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.PressureMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxConstSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstSpeedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11872,10 +11725,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11885,7 +11738,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.PressureMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMinConstFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstFlowAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11893,10 +11746,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11906,7 +11759,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterEventListAttributeCallback implements ChipClusters.PressureMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxConstFlowAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstFlowAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11914,10 +11767,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11927,7 +11780,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPressureMeasurementClusterAttributeListAttributeCallback implements ChipClusters.PressureMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMinConstTempAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MinConstTempAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11935,10 +11788,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -11948,7 +11801,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterMaxConstTempAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.MaxConstTempAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11969,7 +11822,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterCapacityAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.CapacityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -11990,7 +11843,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterSpeedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.SpeedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12011,7 +11864,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.FlowMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterLifetimeRunningHoursAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.LifetimeRunningHoursAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12019,10 +11872,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12032,7 +11885,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.FlowMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterPowerAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.PowerAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12040,10 +11893,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12053,7 +11906,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterEventListAttributeCallback implements ChipClusters.FlowMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterLifetimeEnergyConsumedAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.LifetimeEnergyConsumedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12061,10 +11914,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12074,7 +11927,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFlowMeasurementClusterAttributeListAttributeCallback implements ChipClusters.FlowMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12095,28 +11948,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRelativeHumidityMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedRelativeHumidityMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12124,10 +11956,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12137,7 +11969,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRelativeHumidityMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterEventListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12145,10 +11977,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12158,7 +11990,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRelativeHumidityMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12179,7 +12011,8 @@ public void onError(Exception ex) { } } - public static class DelegatedRelativeHumidityMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedThermostatClusterGetWeeklyScheduleResponseCallback implements ChipClusters.ThermostatCluster.GetWeeklyScheduleResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12187,20 +12020,27 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); + responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); + CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); + responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); + CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); + responseValues.put(modeForSequenceResponseValue, modeForSequence); + // transitions: WeeklyScheduleTransitionStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedRelativeHumidityMeasurementClusterEventListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12208,10 +12048,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12221,7 +12061,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRelativeHumidityMeasurementClusterAttributeListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterOutdoorTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12229,10 +12069,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12242,7 +12082,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOccupancySensingClusterGeneratedCommandListAttributeCallback implements ChipClusters.OccupancySensingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback implements ChipClusters.ThermostatCluster.TemperatureSetpointHoldDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12250,10 +12090,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12263,7 +12103,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOccupancySensingClusterAcceptedCommandListAttributeCallback implements ChipClusters.OccupancySensingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterSetpointChangeAmountAttributeCallback implements ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12271,10 +12111,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12284,7 +12124,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOccupancySensingClusterEventListAttributeCallback implements ChipClusters.OccupancySensingCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterOccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12292,10 +12132,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12305,7 +12145,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOccupancySensingClusterAttributeListAttributeCallback implements ChipClusters.OccupancySensingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12313,10 +12153,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12326,7 +12166,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12334,9 +12174,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12347,7 +12187,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12355,9 +12195,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12368,7 +12208,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12376,9 +12216,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12389,7 +12229,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12397,9 +12237,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12410,7 +12250,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterACCoilTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12418,9 +12258,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12431,7 +12271,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12452,7 +12292,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterAcceptedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12473,7 +12313,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterEventListAttributeCallback implements ChipClusters.ThermostatCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12494,7 +12334,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterAttributeListAttributeCallback implements ChipClusters.ThermostatCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12515,7 +12355,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterPercentSettingAttributeCallback implements ChipClusters.FanControlCluster.PercentSettingAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12523,9 +12363,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12536,7 +12376,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterSpeedSettingAttributeCallback implements ChipClusters.FanControlCluster.SpeedSettingAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12544,9 +12384,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12557,7 +12397,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.FanControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12565,10 +12405,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12578,7 +12418,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.FanControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12586,10 +12426,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12599,7 +12439,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterEventListAttributeCallback implements ChipClusters.FanControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12607,10 +12447,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12620,7 +12460,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFanControlClusterAttributeListAttributeCallback implements ChipClusters.FanControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12641,7 +12481,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatUserInterfaceConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12662,7 +12502,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatUserInterfaceConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12683,7 +12523,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatUserInterfaceConfigurationClusterEventListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12704,7 +12544,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallback implements ChipClusters.ThermostatUserInterfaceConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12712,10 +12552,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -12725,7 +12565,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterNumberOfPrimariesAttributeCallback implements ChipClusters.ColorControlCluster.NumberOfPrimariesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12733,9 +12573,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12746,7 +12586,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary1IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary1IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12754,9 +12594,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12767,7 +12607,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary2IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary2IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12775,9 +12615,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12788,7 +12628,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary3IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary3IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12796,9 +12636,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12809,49 +12649,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary4IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary4IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12859,10 +12657,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12872,7 +12670,7 @@ public void onError(Exception ex) { } } - public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary5IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary5IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12880,10 +12678,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12893,7 +12691,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterPrimary6IntensityAttributeCallback implements ChipClusters.ColorControlCluster.Primary6IntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12901,9 +12699,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12914,7 +12712,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterColorPointRIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointRIntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12922,9 +12720,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12935,7 +12733,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterColorPointGIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointGIntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12943,9 +12741,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12956,7 +12754,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterColorPointBIntensityAttributeCallback implements ChipClusters.ColorControlCluster.ColorPointBIntensityAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12964,9 +12762,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12977,7 +12775,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterStartUpColorTemperatureMiredsAttributeCallback implements ChipClusters.ColorControlCluster.StartUpColorTemperatureMiredsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12985,9 +12783,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12998,7 +12796,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ColorControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13019,7 +12817,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.ColorControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13040,7 +12838,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterEventListAttributeCallback implements ChipClusters.ColorControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13061,7 +12859,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOzoneConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedColorControlClusterAttributeListAttributeCallback implements ChipClusters.ColorControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13082,7 +12880,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterIntrinsicBallastFactorAttributeCallback implements ChipClusters.BallastConfigurationCluster.IntrinsicBallastFactorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13090,9 +12888,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13103,7 +12901,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterBallastFactorAdjustmentAttributeCallback implements ChipClusters.BallastConfigurationCluster.BallastFactorAdjustmentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13111,9 +12909,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13124,7 +12922,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterLampRatedHoursAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampRatedHoursAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13132,9 +12930,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13145,7 +12943,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterLampBurnHoursAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampBurnHoursAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13153,9 +12951,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13166,7 +12964,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterLampBurnHoursTripPointAttributeCallback implements ChipClusters.BallastConfigurationCluster.LampBurnHoursTripPointAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13174,9 +12972,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13187,7 +12985,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BallastConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13208,7 +13006,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BallastConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13229,7 +13027,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterEventListAttributeCallback implements ChipClusters.BallastConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13250,7 +13048,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm25ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBallastConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BallastConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13271,7 +13069,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13279,9 +13077,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13292,7 +13090,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13300,9 +13098,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13313,7 +13111,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13321,9 +13119,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13334,7 +13132,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterLightSensorTypeAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.LightSensorTypeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13342,9 +13140,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13355,7 +13153,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13363,10 +13161,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13376,7 +13174,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13397,7 +13195,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterEventListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13418,7 +13216,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIlluminanceMeasurementClusterAttributeListAttributeCallback implements ChipClusters.IlluminanceMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13439,7 +13237,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFormaldehydeConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13447,10 +13245,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13460,7 +13258,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13468,9 +13266,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13481,7 +13279,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13489,9 +13287,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13502,7 +13300,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13510,10 +13308,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13523,7 +13321,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13531,10 +13329,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13544,7 +13342,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterEventListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13552,10 +13350,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13565,49 +13363,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPm1ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPm1ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureMeasurementClusterAttributeListAttributeCallback implements ChipClusters.TemperatureMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13628,7 +13384,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm1ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13636,10 +13392,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13649,7 +13405,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13657,9 +13413,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13670,7 +13426,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13678,9 +13434,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13691,7 +13447,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.ScaledValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13699,9 +13455,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13712,7 +13468,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterMinScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MinScaledValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13720,9 +13476,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13733,7 +13489,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterMaxScaledValueAttributeCallback implements ChipClusters.PressureMeasurementCluster.MaxScaledValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13741,9 +13497,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13754,7 +13510,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.PressureMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13775,7 +13531,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.PressureMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13796,7 +13552,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterEventListAttributeCallback implements ChipClusters.PressureMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13817,7 +13573,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPm10ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPressureMeasurementClusterAttributeListAttributeCallback implements ChipClusters.PressureMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13838,7 +13594,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13846,9 +13602,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13859,7 +13615,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13867,9 +13623,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13880,7 +13636,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.FlowMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13888,9 +13644,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -13901,7 +13657,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.FlowMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13909,10 +13665,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13922,7 +13678,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.FlowMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13930,10 +13686,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13943,7 +13699,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterEventListAttributeCallback implements ChipClusters.FlowMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13964,7 +13720,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFlowMeasurementClusterAttributeListAttributeCallback implements ChipClusters.FlowMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13985,7 +13741,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13993,10 +13749,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14006,7 +13762,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14014,10 +13770,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14027,7 +13783,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14035,9 +13791,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14048,7 +13804,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14056,10 +13812,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14069,7 +13825,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14077,10 +13833,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14090,7 +13846,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterEventListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14098,10 +13854,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14111,7 +13867,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRelativeHumidityMeasurementClusterAttributeListAttributeCallback implements ChipClusters.RelativeHumidityMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14119,10 +13875,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14132,7 +13888,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOccupancySensingClusterGeneratedCommandListAttributeCallback implements ChipClusters.OccupancySensingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14153,7 +13909,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOccupancySensingClusterAcceptedCommandListAttributeCallback implements ChipClusters.OccupancySensingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14174,7 +13930,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOccupancySensingClusterEventListAttributeCallback implements ChipClusters.OccupancySensingCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14195,7 +13951,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRadonConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOccupancySensingClusterAttributeListAttributeCallback implements ChipClusters.OccupancySensingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14216,7 +13972,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWakeOnLanClusterGeneratedCommandListAttributeCallback implements ChipClusters.WakeOnLanCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14224,10 +13980,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14237,7 +13993,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWakeOnLanClusterAcceptedCommandListAttributeCallback implements ChipClusters.WakeOnLanCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14245,10 +14001,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14258,7 +14014,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWakeOnLanClusterEventListAttributeCallback implements ChipClusters.WakeOnLanCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14266,10 +14022,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14279,7 +14035,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWakeOnLanClusterAttributeListAttributeCallback implements ChipClusters.WakeOnLanCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14287,10 +14043,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14300,8 +14056,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedChannelClusterChangeChannelResponseCallback implements ChipClusters.ChannelCluster.ChangeChannelResponseCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14309,22 +14064,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedChannelClusterChannelListAttributeCallback implements ChipClusters.ChannelCluster.ChannelListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14332,9 +14085,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14345,7 +14098,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterLineupAttributeCallback implements ChipClusters.ChannelCluster.LineupAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14353,10 +14106,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.ChannelClusterLineupInfoStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ChannelClusterLineupInfoStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14366,7 +14119,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterCurrentChannelAttributeCallback implements ChipClusters.ChannelCluster.CurrentChannelAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14374,10 +14127,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.ChannelClusterChannelInfoStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ChannelClusterChannelInfoStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14387,7 +14140,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterGeneratedCommandListAttributeCallback implements ChipClusters.ChannelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonMonoxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.CarbonMonoxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14408,7 +14161,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterAcceptedCommandListAttributeCallback implements ChipClusters.ChannelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14416,10 +14169,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14429,7 +14182,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterEventListAttributeCallback implements ChipClusters.ChannelCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14437,10 +14190,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14450,7 +14203,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChannelClusterAttributeListAttributeCallback implements ChipClusters.ChannelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14458,10 +14211,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14471,8 +14224,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedTargetNavigatorClusterNavigateTargetResponseCallback implements ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14480,22 +14232,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedTargetNavigatorClusterTargetListAttributeCallback implements ChipClusters.TargetNavigatorCluster.TargetListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14503,10 +14253,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14516,7 +14266,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTargetNavigatorClusterGeneratedCommandListAttributeCallback implements ChipClusters.TargetNavigatorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14537,7 +14287,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTargetNavigatorClusterAcceptedCommandListAttributeCallback implements ChipClusters.TargetNavigatorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14558,7 +14308,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTargetNavigatorClusterEventListAttributeCallback implements ChipClusters.TargetNavigatorCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14579,7 +14329,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTargetNavigatorClusterAttributeListAttributeCallback implements ChipClusters.TargetNavigatorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCarbonDioxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.CarbonDioxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14600,8 +14350,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedMediaPlaybackClusterPlaybackResponseCallback implements ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14609,22 +14358,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedMediaPlaybackClusterStartTimeAttributeCallback implements ChipClusters.MediaPlaybackCluster.StartTimeAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14632,9 +14379,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14645,7 +14392,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterDurationAttributeCallback implements ChipClusters.MediaPlaybackCluster.DurationAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14653,9 +14400,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14666,7 +14413,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterSampledPositionAttributeCallback implements ChipClusters.MediaPlaybackCluster.SampledPositionAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14674,9 +14421,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.MediaPlaybackClusterPlaybackPositionStruct"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14687,7 +14434,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterSeekRangeEndAttributeCallback implements ChipClusters.MediaPlaybackCluster.SeekRangeEndAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14695,9 +14442,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14708,7 +14455,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterSeekRangeStartAttributeCallback implements ChipClusters.MediaPlaybackCluster.SeekRangeStartAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14716,10 +14463,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -14729,7 +14476,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterGeneratedCommandListAttributeCallback implements ChipClusters.MediaPlaybackCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14750,7 +14497,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterAcceptedCommandListAttributeCallback implements ChipClusters.MediaPlaybackCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14771,7 +14518,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterEventListAttributeCallback implements ChipClusters.MediaPlaybackCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedNitrogenDioxideConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.NitrogenDioxideConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14792,7 +14539,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaPlaybackClusterAttributeListAttributeCallback implements ChipClusters.MediaPlaybackCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14800,10 +14547,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14813,7 +14560,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaInputClusterInputListAttributeCallback implements ChipClusters.MediaInputCluster.InputListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14821,10 +14568,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14834,7 +14581,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaInputClusterGeneratedCommandListAttributeCallback implements ChipClusters.MediaInputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14842,10 +14589,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14855,7 +14602,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaInputClusterAcceptedCommandListAttributeCallback implements ChipClusters.MediaInputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14863,10 +14610,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14876,7 +14623,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaInputClusterEventListAttributeCallback implements ChipClusters.MediaInputCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14884,10 +14631,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -14897,7 +14644,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMediaInputClusterAttributeListAttributeCallback implements ChipClusters.MediaInputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14918,7 +14665,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLowPowerClusterGeneratedCommandListAttributeCallback implements ChipClusters.LowPowerCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14939,7 +14686,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLowPowerClusterAcceptedCommandListAttributeCallback implements ChipClusters.LowPowerCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14960,7 +14707,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLowPowerClusterEventListAttributeCallback implements ChipClusters.LowPowerCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOzoneConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.OzoneConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14981,7 +14728,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLowPowerClusterAttributeListAttributeCallback implements ChipClusters.LowPowerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -14989,10 +14736,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15002,8 +14749,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedKeypadInputClusterSendKeyResponseCallback implements ChipClusters.KeypadInputCluster.SendKeyResponseCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15011,20 +14757,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedKeypadInputClusterGeneratedCommandListAttributeCallback implements ChipClusters.KeypadInputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedPm25ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15032,10 +14778,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15045,7 +14791,7 @@ public void onError(Exception ex) { } } - public static class DelegatedKeypadInputClusterAcceptedCommandListAttributeCallback implements ChipClusters.KeypadInputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15053,10 +14799,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15066,7 +14812,7 @@ public void onError(Exception ex) { } } - public static class DelegatedKeypadInputClusterEventListAttributeCallback implements ChipClusters.KeypadInputCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15074,10 +14820,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15087,7 +14833,7 @@ public void onError(Exception ex) { } } - public static class DelegatedKeypadInputClusterAttributeListAttributeCallback implements ChipClusters.KeypadInputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15108,8 +14854,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedContentLauncherClusterLauncherResponseCallback implements ChipClusters.ContentLauncherCluster.LauncherResponseCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15117,22 +14862,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedContentLauncherClusterAcceptHeaderAttributeCallback implements ChipClusters.ContentLauncherCluster.AcceptHeaderAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedPm25ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15140,9 +14883,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -15153,7 +14896,7 @@ public void onError(Exception ex) { } } - public static class DelegatedContentLauncherClusterGeneratedCommandListAttributeCallback implements ChipClusters.ContentLauncherCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm25ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm25ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15174,7 +14917,7 @@ public void onError(Exception ex) { } } - public static class DelegatedContentLauncherClusterAcceptedCommandListAttributeCallback implements ChipClusters.ContentLauncherCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15182,10 +14925,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15195,7 +14938,7 @@ public void onError(Exception ex) { } } - public static class DelegatedContentLauncherClusterEventListAttributeCallback implements ChipClusters.ContentLauncherCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15203,10 +14946,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15216,7 +14959,7 @@ public void onError(Exception ex) { } } - public static class DelegatedContentLauncherClusterAttributeListAttributeCallback implements ChipClusters.ContentLauncherCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15224,10 +14967,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15237,7 +14980,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputClusterOutputListAttributeCallback implements ChipClusters.AudioOutputCluster.OutputListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15245,10 +14988,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15258,7 +15001,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputClusterGeneratedCommandListAttributeCallback implements ChipClusters.AudioOutputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15266,10 +15009,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15279,7 +15022,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputClusterAcceptedCommandListAttributeCallback implements ChipClusters.AudioOutputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15300,7 +15043,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputClusterEventListAttributeCallback implements ChipClusters.AudioOutputCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15321,7 +15064,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputClusterAttributeListAttributeCallback implements ChipClusters.AudioOutputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15342,8 +15085,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedApplicationLauncherClusterLauncherResponseCallback implements ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback, DelegatedClusterCallback { + public static class DelegatedFormaldehydeConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.FormaldehydeConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15351,22 +15093,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedApplicationLauncherClusterCatalogListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.CatalogListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedPm1ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15374,10 +15114,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15387,7 +15127,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationLauncherClusterCurrentAppAttributeCallback implements ChipClusters.ApplicationLauncherCluster.CurrentAppAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15395,9 +15135,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ApplicationLauncherClusterApplicationEPStruct"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15408,7 +15148,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationLauncherClusterGeneratedCommandListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15416,10 +15156,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15429,7 +15169,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationLauncherClusterAcceptedCommandListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15437,10 +15177,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15450,7 +15190,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationLauncherClusterEventListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15458,10 +15198,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15471,7 +15211,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationLauncherClusterAttributeListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15492,7 +15232,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterApplicationAttributeCallback implements ChipClusters.ApplicationBasicCluster.ApplicationAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15500,10 +15240,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.ApplicationBasicClusterApplicationStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ApplicationBasicClusterApplicationStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -15513,7 +15253,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterAllowedVendorListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AllowedVendorListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15521,9 +15261,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -15534,7 +15274,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterGeneratedCommandListAttributeCallback implements ChipClusters.ApplicationBasicCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm1ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm1ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15555,7 +15295,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterAcceptedCommandListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15563,10 +15303,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15576,7 +15316,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterEventListAttributeCallback implements ChipClusters.ApplicationBasicCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15584,10 +15324,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15597,7 +15337,7 @@ public void onError(Exception ex) { } } - public static class DelegatedApplicationBasicClusterAttributeListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15605,10 +15345,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15618,8 +15358,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedAccountLoginClusterGetSetupPINResponseCallback implements ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15627,20 +15366,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(String setupPIN) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo setupPINResponseValue = new CommandResponseInfo("setupPIN", "String"); - responseValues.put(setupPINResponseValue, setupPIN); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedAccountLoginClusterGeneratedCommandListAttributeCallback implements ChipClusters.AccountLoginCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedPm10ConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15648,10 +15387,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15661,7 +15400,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccountLoginClusterAcceptedCommandListAttributeCallback implements ChipClusters.AccountLoginCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15682,7 +15421,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccountLoginClusterEventListAttributeCallback implements ChipClusters.AccountLoginCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15703,7 +15442,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccountLoginClusterAttributeListAttributeCallback implements ChipClusters.AccountLoginCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15724,7 +15463,7 @@ public void onError(Exception ex) { } } - public static class DelegatedElectricalMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPm10ConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.Pm10ConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15745,7 +15484,7 @@ public void onError(Exception ex) { } } - public static class DelegatedElectricalMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15753,10 +15492,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15766,7 +15505,7 @@ public void onError(Exception ex) { } } - public static class DelegatedElectricalMeasurementClusterEventListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15774,10 +15513,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15787,7 +15526,7 @@ public void onError(Exception ex) { } } - public static class DelegatedElectricalMeasurementClusterAttributeListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15795,10 +15534,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -15808,8 +15547,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15817,21 +15555,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer returnValue) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestAddArgumentsResponseCallback implements ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15839,21 +15576,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer returnValue) { + public void onSuccess(@Nullable Float value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestSimpleArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestSimpleArgumentResponseCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15861,21 +15597,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean returnValue) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Boolean"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestStructArrayArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestStructArrayArgumentResponseCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15883,35 +15618,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // arg1: NestedStructList - // Conversion from this type to Java is not properly implemented yet - - // arg2: SimpleStruct - // Conversion from this type to Java is not properly implemented yet - - // arg3: SimpleEnum - // Conversion from this type to Java is not properly implemented yet - - // arg4: boolean - // Conversion from this type to Java is not properly implemented yet - - CommandResponseInfo arg5ResponseValue = new CommandResponseInfo("arg5", "Integer"); - responseValues.put(arg5ResponseValue, arg5); - CommandResponseInfo arg6ResponseValue = new CommandResponseInfo("arg6", "Boolean"); - responseValues.put(arg6ResponseValue, arg6); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterBooleanResponseCallback implements ChipClusters.UnitTestingCluster.BooleanResponseCallback, DelegatedClusterCallback { + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -15919,11 +15639,2304 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Boolean"); - responseValues.put(valueResponseValue, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MeasuredValueAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterMinMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MinMeasuredValueAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterMaxMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.MaxMeasuredValueAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterPeakMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.PeakMeasuredValueAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterAverageMeasuredValueAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AverageMeasuredValueAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterEventListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRadonConcentrationMeasurementClusterAttributeListAttributeCallback implements ChipClusters.RadonConcentrationMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWakeOnLanClusterGeneratedCommandListAttributeCallback implements ChipClusters.WakeOnLanCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWakeOnLanClusterAcceptedCommandListAttributeCallback implements ChipClusters.WakeOnLanCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWakeOnLanClusterEventListAttributeCallback implements ChipClusters.WakeOnLanCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWakeOnLanClusterAttributeListAttributeCallback implements ChipClusters.WakeOnLanCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedChannelClusterChangeChannelResponseCallback implements ChipClusters.ChannelCluster.ChangeChannelResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional data) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedChannelClusterProgramGuideResponseCallback implements ChipClusters.ChannelCluster.ProgramGuideResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer channelPagingStruct, ArrayList programList) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo channelPagingStructResponseValue = new CommandResponseInfo("channelPagingStruct", "Integer"); + responseValues.put(channelPagingStructResponseValue, channelPagingStruct); + // programList: ProgramStruct + // Conversion from this type to Java is not properly implemented yet + + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedChannelClusterChannelListAttributeCallback implements ChipClusters.ChannelCluster.ChannelListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterLineupAttributeCallback implements ChipClusters.ChannelCluster.LineupAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.ChannelClusterLineupInfoStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ChannelClusterLineupInfoStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterCurrentChannelAttributeCallback implements ChipClusters.ChannelCluster.CurrentChannelAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.ChannelClusterChannelInfoStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ChannelClusterChannelInfoStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterGeneratedCommandListAttributeCallback implements ChipClusters.ChannelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterAcceptedCommandListAttributeCallback implements ChipClusters.ChannelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterEventListAttributeCallback implements ChipClusters.ChannelCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterAttributeListAttributeCallback implements ChipClusters.ChannelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedTargetNavigatorClusterNavigateTargetResponseCallback implements ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional data) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedTargetNavigatorClusterTargetListAttributeCallback implements ChipClusters.TargetNavigatorCluster.TargetListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTargetNavigatorClusterGeneratedCommandListAttributeCallback implements ChipClusters.TargetNavigatorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTargetNavigatorClusterAcceptedCommandListAttributeCallback implements ChipClusters.TargetNavigatorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTargetNavigatorClusterEventListAttributeCallback implements ChipClusters.TargetNavigatorCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTargetNavigatorClusterAttributeListAttributeCallback implements ChipClusters.TargetNavigatorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedMediaPlaybackClusterPlaybackResponseCallback implements ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional data) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedMediaPlaybackClusterStartTimeAttributeCallback implements ChipClusters.MediaPlaybackCluster.StartTimeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterDurationAttributeCallback implements ChipClusters.MediaPlaybackCluster.DurationAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterSampledPositionAttributeCallback implements ChipClusters.MediaPlaybackCluster.SampledPositionAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterPlaybackPositionStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.MediaPlaybackClusterPlaybackPositionStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterSeekRangeEndAttributeCallback implements ChipClusters.MediaPlaybackCluster.SeekRangeEndAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterSeekRangeStartAttributeCallback implements ChipClusters.MediaPlaybackCluster.SeekRangeStartAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterActiveAudioTrackAttributeCallback implements ChipClusters.MediaPlaybackCluster.ActiveAudioTrackAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterTrackStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.MediaPlaybackClusterTrackStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterAvailableAudioTracksAttributeCallback implements ChipClusters.MediaPlaybackCluster.AvailableAudioTracksAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterActiveTextTrackAttributeCallback implements ChipClusters.MediaPlaybackCluster.ActiveTextTrackAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.MediaPlaybackClusterTrackStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.MediaPlaybackClusterTrackStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterAvailableTextTracksAttributeCallback implements ChipClusters.MediaPlaybackCluster.AvailableTextTracksAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterGeneratedCommandListAttributeCallback implements ChipClusters.MediaPlaybackCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterAcceptedCommandListAttributeCallback implements ChipClusters.MediaPlaybackCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterEventListAttributeCallback implements ChipClusters.MediaPlaybackCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaPlaybackClusterAttributeListAttributeCallback implements ChipClusters.MediaPlaybackCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaInputClusterInputListAttributeCallback implements ChipClusters.MediaInputCluster.InputListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaInputClusterGeneratedCommandListAttributeCallback implements ChipClusters.MediaInputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaInputClusterAcceptedCommandListAttributeCallback implements ChipClusters.MediaInputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaInputClusterEventListAttributeCallback implements ChipClusters.MediaInputCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMediaInputClusterAttributeListAttributeCallback implements ChipClusters.MediaInputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLowPowerClusterGeneratedCommandListAttributeCallback implements ChipClusters.LowPowerCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLowPowerClusterAcceptedCommandListAttributeCallback implements ChipClusters.LowPowerCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLowPowerClusterEventListAttributeCallback implements ChipClusters.LowPowerCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLowPowerClusterAttributeListAttributeCallback implements ChipClusters.LowPowerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedKeypadInputClusterSendKeyResponseCallback implements ChipClusters.KeypadInputCluster.SendKeyResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedKeypadInputClusterGeneratedCommandListAttributeCallback implements ChipClusters.KeypadInputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedKeypadInputClusterAcceptedCommandListAttributeCallback implements ChipClusters.KeypadInputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedKeypadInputClusterEventListAttributeCallback implements ChipClusters.KeypadInputCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedKeypadInputClusterAttributeListAttributeCallback implements ChipClusters.KeypadInputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedContentLauncherClusterLauncherResponseCallback implements ChipClusters.ContentLauncherCluster.LauncherResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional data) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedContentLauncherClusterAcceptHeaderAttributeCallback implements ChipClusters.ContentLauncherCluster.AcceptHeaderAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentLauncherClusterGeneratedCommandListAttributeCallback implements ChipClusters.ContentLauncherCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentLauncherClusterAcceptedCommandListAttributeCallback implements ChipClusters.ContentLauncherCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentLauncherClusterEventListAttributeCallback implements ChipClusters.ContentLauncherCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentLauncherClusterAttributeListAttributeCallback implements ChipClusters.ContentLauncherCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterOutputListAttributeCallback implements ChipClusters.AudioOutputCluster.OutputListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterGeneratedCommandListAttributeCallback implements ChipClusters.AudioOutputCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterAcceptedCommandListAttributeCallback implements ChipClusters.AudioOutputCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterEventListAttributeCallback implements ChipClusters.AudioOutputCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterAttributeListAttributeCallback implements ChipClusters.AudioOutputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedApplicationLauncherClusterLauncherResponseCallback implements ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional data) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); + responseValues.put(dataResponseValue, data); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedApplicationLauncherClusterCatalogListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.CatalogListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationLauncherClusterCurrentAppAttributeCallback implements ChipClusters.ApplicationLauncherCluster.CurrentAppAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.ApplicationLauncherClusterApplicationEPStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ApplicationLauncherClusterApplicationEPStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationLauncherClusterGeneratedCommandListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationLauncherClusterAcceptedCommandListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationLauncherClusterEventListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationLauncherClusterAttributeListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterApplicationAttributeCallback implements ChipClusters.ApplicationBasicCluster.ApplicationAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.ApplicationBasicClusterApplicationStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ApplicationBasicClusterApplicationStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterAllowedVendorListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AllowedVendorListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterGeneratedCommandListAttributeCallback implements ChipClusters.ApplicationBasicCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterAcceptedCommandListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterEventListAttributeCallback implements ChipClusters.ApplicationBasicCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterAttributeListAttributeCallback implements ChipClusters.ApplicationBasicCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedAccountLoginClusterGetSetupPINResponseCallback implements ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(String setupPIN) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo setupPINResponseValue = new CommandResponseInfo("setupPIN", "String"); + responseValues.put(setupPINResponseValue, setupPIN); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedAccountLoginClusterGeneratedCommandListAttributeCallback implements ChipClusters.AccountLoginCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAccountLoginClusterAcceptedCommandListAttributeCallback implements ChipClusters.AccountLoginCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAccountLoginClusterEventListAttributeCallback implements ChipClusters.AccountLoginCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAccountLoginClusterAttributeListAttributeCallback implements ChipClusters.AccountLoginCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedContentControlClusterResetPINResponseCallback implements ChipClusters.ContentControlCluster.ResetPINResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(String PINCode) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo PINCodeResponseValue = new CommandResponseInfo("PINCode", "String"); + responseValues.put(PINCodeResponseValue, PINCode); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedContentControlClusterOnDemandRatingsAttributeCallback implements ChipClusters.ContentControlCluster.OnDemandRatingsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterScheduledContentRatingsAttributeCallback implements ChipClusters.ContentControlCluster.ScheduledContentRatingsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ContentControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.ContentControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterEventListAttributeCallback implements ChipClusters.ContentControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterAttributeListAttributeCallback implements ChipClusters.ContentControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedContentAppObserverClusterContentAppMessageResponseCallback implements ChipClusters.ContentAppObserverCluster.ContentAppMessageResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Optional status, String data, String encodingHint) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Optional"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + responseValues.put(dataResponseValue, data); + CommandResponseInfo encodingHintResponseValue = new CommandResponseInfo("encodingHint", "String"); + responseValues.put(encodingHintResponseValue, encodingHint); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedContentAppObserverClusterGeneratedCommandListAttributeCallback implements ChipClusters.ContentAppObserverCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentAppObserverClusterAcceptedCommandListAttributeCallback implements ChipClusters.ContentAppObserverCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentAppObserverClusterEventListAttributeCallback implements ChipClusters.ContentAppObserverCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentAppObserverClusterAttributeListAttributeCallback implements ChipClusters.ContentAppObserverCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedElectricalMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedElectricalMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedElectricalMeasurementClusterEventListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedElectricalMeasurementClusterAttributeListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer returnValue) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); + responseValues.put(returnValueResponseValue, returnValue); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedUnitTestingClusterTestAddArgumentsResponseCallback implements ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer returnValue) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); + responseValues.put(returnValueResponseValue, returnValue); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedUnitTestingClusterTestSimpleArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestSimpleArgumentResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Boolean returnValue) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Boolean"); + responseValues.put(returnValueResponseValue, returnValue); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedUnitTestingClusterTestStructArrayArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestStructArrayArgumentResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { + Map responseValues = new LinkedHashMap<>(); + + // arg1: NestedStructList + // Conversion from this type to Java is not properly implemented yet + + // arg2: SimpleStruct + // Conversion from this type to Java is not properly implemented yet + + // arg3: SimpleEnum + // Conversion from this type to Java is not properly implemented yet + + // arg4: boolean + // Conversion from this type to Java is not properly implemented yet + + CommandResponseInfo arg5ResponseValue = new CommandResponseInfo("arg5", "Integer"); + responseValues.put(arg5ResponseValue, arg5); + CommandResponseInfo arg6ResponseValue = new CommandResponseInfo("arg6", "Boolean"); + responseValues.put(arg6ResponseValue, arg6); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedUnitTestingClusterBooleanResponseCallback implements ChipClusters.UnitTestingCluster.BooleanResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Boolean value) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Boolean"); + responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @@ -17445,9 +19458,21 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.IcdManagementCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("icdManagement", icdManagementClusterInfo); - ClusterInfo ovenOperationalStateClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.OvenOperationalStateCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("ovenOperationalState", ovenOperationalStateClusterInfo); + ClusterInfo timerClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.TimerCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("timer", timerClusterInfo); + + ClusterInfo ovenCavityOperationalStateClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OvenCavityOperationalStateCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("ovenCavityOperationalState", ovenCavityOperationalStateClusterInfo); + + ClusterInfo ovenModeClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OvenModeCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("ovenMode", ovenModeClusterInfo); + + ClusterInfo laundryDryerControlsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LaundryDryerControlsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("laundryDryerControls", laundryDryerControlsClusterInfo); ClusterInfo modeSelectClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ModeSelectCluster(ptr, endpointId), new HashMap<>()); @@ -17521,6 +19546,30 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ActivatedCarbonFilterMonitoringCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInfo); + ClusterInfo booleanStateConfigurationClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.BooleanStateConfigurationCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("booleanStateConfiguration", booleanStateConfigurationClusterInfo); + + ClusterInfo valveConfigurationAndControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ValveConfigurationAndControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("valveConfigurationAndControl", valveConfigurationAndControlClusterInfo); + + ClusterInfo electricalEnergyMeasurementClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ElectricalEnergyMeasurementCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("electricalEnergyMeasurement", electricalEnergyMeasurementClusterInfo); + + ClusterInfo demandResponseLoadControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.DemandResponseLoadControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInfo); + + ClusterInfo deviceEnergyManagementClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.DeviceEnergyManagementCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("deviceEnergyManagement", deviceEnergyManagementClusterInfo); + + ClusterInfo energyEvseClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.EnergyEvseCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("energyEvse", energyEvseClusterInfo); + ClusterInfo doorLockClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.DoorLockCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("doorLock", doorLockClusterInfo); @@ -17669,6 +19718,14 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.AccountLoginCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("accountLogin", accountLoginClusterInfo); + ClusterInfo contentControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ContentControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("contentControl", contentControlClusterInfo); + + ClusterInfo contentAppObserverClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ContentAppObserverCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("contentAppObserver", contentAppObserverClusterInfo); + ClusterInfo electricalMeasurementClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo); @@ -17730,7 +19787,10 @@ public void combineCommand(Map destination, Map destination, Map destination, Map> getCommandMap() { ); icdManagementClusterInteractionInfoMap.put("registerClient", icdManagementregisterClientInteractionInfo); - Map icdManagementunregisterClientCommandParams = new LinkedHashMap(); + Map icdManagementunregisterClientCommandParams = new LinkedHashMap(); + + CommandParameterInfo icdManagementunregisterClientcheckInNodeIDCommandParameterInfo = new CommandParameterInfo("checkInNodeID", Long.class, Long.class); + icdManagementunregisterClientCommandParams.put("checkInNodeID",icdManagementunregisterClientcheckInNodeIDCommandParameterInfo); + + CommandParameterInfo icdManagementunregisterClientverificationKeyCommandParameterInfo = new CommandParameterInfo("verificationKey", Optional.class, byte[].class); + icdManagementunregisterClientCommandParams.put("verificationKey",icdManagementunregisterClientverificationKeyCommandParameterInfo); + InteractionInfo icdManagementunregisterClientInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IcdManagementCluster) cluster) + .unregisterClient((DefaultClusterCallback) callback + , (Long) + commandArguments.get("checkInNodeID") + , (Optional) + commandArguments.get("verificationKey") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + icdManagementunregisterClientCommandParams + ); + icdManagementClusterInteractionInfoMap.put("unregisterClient", icdManagementunregisterClientInteractionInfo); + + Map icdManagementstayActiveRequestCommandParams = new LinkedHashMap(); + InteractionInfo icdManagementstayActiveRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IcdManagementCluster) cluster) + .stayActiveRequest((ChipClusters.IcdManagementCluster.StayActiveResponseCallback) callback + ); + }, + () -> new DelegatedIcdManagementClusterStayActiveResponseCallback(), + icdManagementstayActiveRequestCommandParams + ); + icdManagementClusterInteractionInfoMap.put("stayActiveRequest", icdManagementstayActiveRequestInteractionInfo); + + commandMap.put("icdManagement", icdManagementClusterInteractionInfoMap); + + Map timerClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map timersetTimerCommandParams = new LinkedHashMap(); + + CommandParameterInfo timersetTimernewTimeCommandParameterInfo = new CommandParameterInfo("newTime", Long.class, Long.class); + timersetTimerCommandParams.put("newTime",timersetTimernewTimeCommandParameterInfo); + InteractionInfo timersetTimerInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster) + .setTimer((DefaultClusterCallback) callback + , (Long) + commandArguments.get("newTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + timersetTimerCommandParams + ); + timerClusterInteractionInfoMap.put("setTimer", timersetTimerInteractionInfo); + + Map timerresetTimerCommandParams = new LinkedHashMap(); + InteractionInfo timerresetTimerInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster) + .resetTimer((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + timerresetTimerCommandParams + ); + timerClusterInteractionInfoMap.put("resetTimer", timerresetTimerInteractionInfo); - CommandParameterInfo icdManagementunregisterClientcheckInNodeIDCommandParameterInfo = new CommandParameterInfo("checkInNodeID", Long.class, Long.class); - icdManagementunregisterClientCommandParams.put("checkInNodeID",icdManagementunregisterClientcheckInNodeIDCommandParameterInfo); + Map timeraddTimeCommandParams = new LinkedHashMap(); - CommandParameterInfo icdManagementunregisterClientverificationKeyCommandParameterInfo = new CommandParameterInfo("verificationKey", Optional.class, byte[].class); - icdManagementunregisterClientCommandParams.put("verificationKey",icdManagementunregisterClientverificationKeyCommandParameterInfo); - InteractionInfo icdManagementunregisterClientInteractionInfo = new InteractionInfo( + CommandParameterInfo timeraddTimeadditionalTimeCommandParameterInfo = new CommandParameterInfo("additionalTime", Long.class, Long.class); + timeraddTimeCommandParams.put("additionalTime",timeraddTimeadditionalTimeCommandParameterInfo); + InteractionInfo timeraddTimeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.IcdManagementCluster) cluster) - .unregisterClient((DefaultClusterCallback) callback + ((ChipClusters.TimerCluster) cluster) + .addTime((DefaultClusterCallback) callback , (Long) - commandArguments.get("checkInNodeID") - , (Optional) - commandArguments.get("verificationKey") + commandArguments.get("additionalTime") ); }, () -> new DelegatedDefaultClusterCallback(), - icdManagementunregisterClientCommandParams + timeraddTimeCommandParams ); - icdManagementClusterInteractionInfoMap.put("unregisterClient", icdManagementunregisterClientInteractionInfo); + timerClusterInteractionInfoMap.put("addTime", timeraddTimeInteractionInfo); - Map icdManagementstayActiveRequestCommandParams = new LinkedHashMap(); - InteractionInfo icdManagementstayActiveRequestInteractionInfo = new InteractionInfo( + Map timerreduceTimeCommandParams = new LinkedHashMap(); + + CommandParameterInfo timerreduceTimetimeReductionCommandParameterInfo = new CommandParameterInfo("timeReduction", Long.class, Long.class); + timerreduceTimeCommandParams.put("timeReduction",timerreduceTimetimeReductionCommandParameterInfo); + InteractionInfo timerreduceTimeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.IcdManagementCluster) cluster) - .stayActiveRequest((DefaultClusterCallback) callback + ((ChipClusters.TimerCluster) cluster) + .reduceTime((DefaultClusterCallback) callback + , (Long) + commandArguments.get("timeReduction") ); }, () -> new DelegatedDefaultClusterCallback(), - icdManagementstayActiveRequestCommandParams + timerreduceTimeCommandParams ); - icdManagementClusterInteractionInfoMap.put("stayActiveRequest", icdManagementstayActiveRequestInteractionInfo); + timerClusterInteractionInfoMap.put("reduceTime", timerreduceTimeInteractionInfo); - commandMap.put("icdManagement", icdManagementClusterInteractionInfoMap); + commandMap.put("timer", timerClusterInteractionInfoMap); + + Map ovenCavityOperationalStateClusterInteractionInfoMap = new LinkedHashMap<>(); - Map ovenOperationalStateClusterInteractionInfoMap = new LinkedHashMap<>(); + Map ovenCavityOperationalStatepauseCommandParams = new LinkedHashMap(); + InteractionInfo ovenCavityOperationalStatepauseInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster) + .pause((ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback) callback + ); + }, + () -> new DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback(), + ovenCavityOperationalStatepauseCommandParams + ); + ovenCavityOperationalStateClusterInteractionInfoMap.put("pause", ovenCavityOperationalStatepauseInteractionInfo); - Map ovenOperationalStatepauseCommandParams = new LinkedHashMap(); - InteractionInfo ovenOperationalStatepauseInteractionInfo = new InteractionInfo( + Map ovenCavityOperationalStatestopCommandParams = new LinkedHashMap(); + InteractionInfo ovenCavityOperationalStatestopInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster) - .pause((ChipClusters.OvenOperationalStateCluster.OperationalCommandResponseCallback) callback + ((ChipClusters.OvenCavityOperationalStateCluster) cluster) + .stop((ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback) callback ); }, - () -> new DelegatedOvenOperationalStateClusterOperationalCommandResponseCallback(), - ovenOperationalStatepauseCommandParams + () -> new DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback(), + ovenCavityOperationalStatestopCommandParams ); - ovenOperationalStateClusterInteractionInfoMap.put("pause", ovenOperationalStatepauseInteractionInfo); + ovenCavityOperationalStateClusterInteractionInfoMap.put("stop", ovenCavityOperationalStatestopInteractionInfo); - Map ovenOperationalStatestopCommandParams = new LinkedHashMap(); - InteractionInfo ovenOperationalStatestopInteractionInfo = new InteractionInfo( + Map ovenCavityOperationalStatestartCommandParams = new LinkedHashMap(); + InteractionInfo ovenCavityOperationalStatestartInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster) - .stop((ChipClusters.OvenOperationalStateCluster.OperationalCommandResponseCallback) callback + ((ChipClusters.OvenCavityOperationalStateCluster) cluster) + .start((ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback) callback ); }, - () -> new DelegatedOvenOperationalStateClusterOperationalCommandResponseCallback(), - ovenOperationalStatestopCommandParams + () -> new DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback(), + ovenCavityOperationalStatestartCommandParams ); - ovenOperationalStateClusterInteractionInfoMap.put("stop", ovenOperationalStatestopInteractionInfo); + ovenCavityOperationalStateClusterInteractionInfoMap.put("start", ovenCavityOperationalStatestartInteractionInfo); - Map ovenOperationalStatestartCommandParams = new LinkedHashMap(); - InteractionInfo ovenOperationalStatestartInteractionInfo = new InteractionInfo( + Map ovenCavityOperationalStateresumeCommandParams = new LinkedHashMap(); + InteractionInfo ovenCavityOperationalStateresumeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster) - .start((ChipClusters.OvenOperationalStateCluster.OperationalCommandResponseCallback) callback + ((ChipClusters.OvenCavityOperationalStateCluster) cluster) + .resume((ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback) callback ); }, - () -> new DelegatedOvenOperationalStateClusterOperationalCommandResponseCallback(), - ovenOperationalStatestartCommandParams + () -> new DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback(), + ovenCavityOperationalStateresumeCommandParams ); - ovenOperationalStateClusterInteractionInfoMap.put("start", ovenOperationalStatestartInteractionInfo); + ovenCavityOperationalStateClusterInteractionInfoMap.put("resume", ovenCavityOperationalStateresumeInteractionInfo); - Map ovenOperationalStateresumeCommandParams = new LinkedHashMap(); - InteractionInfo ovenOperationalStateresumeInteractionInfo = new InteractionInfo( + commandMap.put("ovenCavityOperationalState", ovenCavityOperationalStateClusterInteractionInfoMap); + + Map ovenModeClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map ovenModechangeToModeCommandParams = new LinkedHashMap(); + + CommandParameterInfo ovenModechangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + ovenModechangeToModeCommandParams.put("newMode",ovenModechangeToModenewModeCommandParameterInfo); + InteractionInfo ovenModechangeToModeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster) - .resume((ChipClusters.OvenOperationalStateCluster.OperationalCommandResponseCallback) callback + ((ChipClusters.OvenModeCluster) cluster) + .changeToMode((ChipClusters.OvenModeCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + ); }, - () -> new DelegatedOvenOperationalStateClusterOperationalCommandResponseCallback(), - ovenOperationalStateresumeCommandParams + () -> new DelegatedOvenModeClusterChangeToModeResponseCallback(), + ovenModechangeToModeCommandParams ); - ovenOperationalStateClusterInteractionInfoMap.put("resume", ovenOperationalStateresumeInteractionInfo); + ovenModeClusterInteractionInfoMap.put("changeToMode", ovenModechangeToModeInteractionInfo); + + commandMap.put("ovenMode", ovenModeClusterInteractionInfoMap); + + Map laundryDryerControlsClusterInteractionInfoMap = new LinkedHashMap<>(); - commandMap.put("ovenOperationalState", ovenOperationalStateClusterInteractionInfoMap); + commandMap.put("laundryDryerControls", laundryDryerControlsClusterInteractionInfoMap); Map modeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -20432,75 +22593,486 @@ public Map> getCommandMap() { ); rvcOperationalStateClusterInteractionInfoMap.put("pause", rvcOperationalStatepauseInteractionInfo); - Map rvcOperationalStatestopCommandParams = new LinkedHashMap(); - InteractionInfo rvcOperationalStatestopInteractionInfo = new InteractionInfo( + Map rvcOperationalStatestopCommandParams = new LinkedHashMap(); + InteractionInfo rvcOperationalStatestopInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcOperationalStateCluster) cluster) + .stop((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback + ); + }, + () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), + rvcOperationalStatestopCommandParams + ); + rvcOperationalStateClusterInteractionInfoMap.put("stop", rvcOperationalStatestopInteractionInfo); + + Map rvcOperationalStatestartCommandParams = new LinkedHashMap(); + InteractionInfo rvcOperationalStatestartInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcOperationalStateCluster) cluster) + .start((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback + ); + }, + () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), + rvcOperationalStatestartCommandParams + ); + rvcOperationalStateClusterInteractionInfoMap.put("start", rvcOperationalStatestartInteractionInfo); + + Map rvcOperationalStateresumeCommandParams = new LinkedHashMap(); + InteractionInfo rvcOperationalStateresumeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcOperationalStateCluster) cluster) + .resume((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback + ); + }, + () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), + rvcOperationalStateresumeCommandParams + ); + rvcOperationalStateClusterInteractionInfoMap.put("resume", rvcOperationalStateresumeInteractionInfo); + + commandMap.put("rvcOperationalState", rvcOperationalStateClusterInteractionInfoMap); + + Map hepaFilterMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map hepaFilterMonitoringresetConditionCommandParams = new LinkedHashMap(); + InteractionInfo hepaFilterMonitoringresetConditionInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.HepaFilterMonitoringCluster) cluster) + .resetCondition((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + hepaFilterMonitoringresetConditionCommandParams + ); + hepaFilterMonitoringClusterInteractionInfoMap.put("resetCondition", hepaFilterMonitoringresetConditionInteractionInfo); + + commandMap.put("hepaFilterMonitoring", hepaFilterMonitoringClusterInteractionInfoMap); + + Map activatedCarbonFilterMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map activatedCarbonFilterMonitoringresetConditionCommandParams = new LinkedHashMap(); + InteractionInfo activatedCarbonFilterMonitoringresetConditionInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ActivatedCarbonFilterMonitoringCluster) cluster) + .resetCondition((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + activatedCarbonFilterMonitoringresetConditionCommandParams + ); + activatedCarbonFilterMonitoringClusterInteractionInfoMap.put("resetCondition", activatedCarbonFilterMonitoringresetConditionInteractionInfo); + + commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap); + + Map booleanStateConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map booleanStateConfigurationsuppressAlarmCommandParams = new LinkedHashMap(); + + CommandParameterInfo booleanStateConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); + booleanStateConfigurationsuppressAlarmCommandParams.put("alarmsToSuppress",booleanStateConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo); + InteractionInfo booleanStateConfigurationsuppressAlarmInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanStateConfigurationCluster) cluster) + .suppressAlarm((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("alarmsToSuppress") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + booleanStateConfigurationsuppressAlarmCommandParams + ); + booleanStateConfigurationClusterInteractionInfoMap.put("suppressAlarm", booleanStateConfigurationsuppressAlarmInteractionInfo); + + Map booleanStateConfigurationenableDisableAlarmCommandParams = new LinkedHashMap(); + + CommandParameterInfo booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo = new CommandParameterInfo("alarmsToEnableDisable", Integer.class, Integer.class); + booleanStateConfigurationenableDisableAlarmCommandParams.put("alarmsToEnableDisable",booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo); + InteractionInfo booleanStateConfigurationenableDisableAlarmInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanStateConfigurationCluster) cluster) + .enableDisableAlarm((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("alarmsToEnableDisable") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + booleanStateConfigurationenableDisableAlarmCommandParams + ); + booleanStateConfigurationClusterInteractionInfoMap.put("enableDisableAlarm", booleanStateConfigurationenableDisableAlarmInteractionInfo); + + commandMap.put("booleanStateConfiguration", booleanStateConfigurationClusterInteractionInfoMap); + + Map valveConfigurationAndControlClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map valveConfigurationAndControlopenCommandParams = new LinkedHashMap(); + + CommandParameterInfo valveConfigurationAndControlopenopenDurationCommandParameterInfo = new CommandParameterInfo("openDuration", Optional.class, Long.class); + valveConfigurationAndControlopenCommandParams.put("openDuration",valveConfigurationAndControlopenopenDurationCommandParameterInfo); + + CommandParameterInfo valveConfigurationAndControlopentargetLevelCommandParameterInfo = new CommandParameterInfo("targetLevel", Optional.class, Integer.class); + valveConfigurationAndControlopenCommandParams.put("targetLevel",valveConfigurationAndControlopentargetLevelCommandParameterInfo); + InteractionInfo valveConfigurationAndControlopenInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster) + .open((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("openDuration") + , (Optional) + commandArguments.get("targetLevel") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + valveConfigurationAndControlopenCommandParams + ); + valveConfigurationAndControlClusterInteractionInfoMap.put("open", valveConfigurationAndControlopenInteractionInfo); + + Map valveConfigurationAndControlcloseCommandParams = new LinkedHashMap(); + InteractionInfo valveConfigurationAndControlcloseInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster) + .close((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + valveConfigurationAndControlcloseCommandParams + ); + valveConfigurationAndControlClusterInteractionInfoMap.put("close", valveConfigurationAndControlcloseInteractionInfo); + + commandMap.put("valveConfigurationAndControl", valveConfigurationAndControlClusterInteractionInfoMap); + + Map electricalEnergyMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("electricalEnergyMeasurement", electricalEnergyMeasurementClusterInteractionInfoMap); + + Map demandResponseLoadControlClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map demandResponseLoadControlregisterLoadControlProgramRequestCommandParams = new LinkedHashMap(); + + InteractionInfo demandResponseLoadControlregisterLoadControlProgramRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster) + .registerLoadControlProgramRequest((DefaultClusterCallback) callback + , (ChipStructs.DemandResponseLoadControlClusterLoadControlProgramStruct) + commandArguments.get("loadControlProgram") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + demandResponseLoadControlregisterLoadControlProgramRequestCommandParams + ); + demandResponseLoadControlClusterInteractionInfoMap.put("registerLoadControlProgramRequest", demandResponseLoadControlregisterLoadControlProgramRequestInteractionInfo); + + Map demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo demandResponseLoadControlunregisterLoadControlProgramRequestloadControlProgramIDCommandParameterInfo = new CommandParameterInfo("loadControlProgramID", byte[].class, byte[].class); + demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams.put("loadControlProgramID",demandResponseLoadControlunregisterLoadControlProgramRequestloadControlProgramIDCommandParameterInfo); + InteractionInfo demandResponseLoadControlunregisterLoadControlProgramRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster) + .unregisterLoadControlProgramRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("loadControlProgramID") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + demandResponseLoadControlunregisterLoadControlProgramRequestCommandParams + ); + demandResponseLoadControlClusterInteractionInfoMap.put("unregisterLoadControlProgramRequest", demandResponseLoadControlunregisterLoadControlProgramRequestInteractionInfo); + + Map demandResponseLoadControladdLoadControlEventRequestCommandParams = new LinkedHashMap(); + + InteractionInfo demandResponseLoadControladdLoadControlEventRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster) + .addLoadControlEventRequest((DefaultClusterCallback) callback + , (ChipStructs.DemandResponseLoadControlClusterLoadControlEventStruct) + commandArguments.get("event") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + demandResponseLoadControladdLoadControlEventRequestCommandParams + ); + demandResponseLoadControlClusterInteractionInfoMap.put("addLoadControlEventRequest", demandResponseLoadControladdLoadControlEventRequestInteractionInfo); + + Map demandResponseLoadControlremoveLoadControlEventRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo demandResponseLoadControlremoveLoadControlEventRequesteventIDCommandParameterInfo = new CommandParameterInfo("eventID", byte[].class, byte[].class); + demandResponseLoadControlremoveLoadControlEventRequestCommandParams.put("eventID",demandResponseLoadControlremoveLoadControlEventRequesteventIDCommandParameterInfo); + + CommandParameterInfo demandResponseLoadControlremoveLoadControlEventRequestcancelControlCommandParameterInfo = new CommandParameterInfo("cancelControl", Integer.class, Integer.class); + demandResponseLoadControlremoveLoadControlEventRequestCommandParams.put("cancelControl",demandResponseLoadControlremoveLoadControlEventRequestcancelControlCommandParameterInfo); + InteractionInfo demandResponseLoadControlremoveLoadControlEventRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster) + .removeLoadControlEventRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("eventID") + , (Integer) + commandArguments.get("cancelControl") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + demandResponseLoadControlremoveLoadControlEventRequestCommandParams + ); + demandResponseLoadControlClusterInteractionInfoMap.put("removeLoadControlEventRequest", demandResponseLoadControlremoveLoadControlEventRequestInteractionInfo); + + Map demandResponseLoadControlclearLoadControlEventsRequestCommandParams = new LinkedHashMap(); + InteractionInfo demandResponseLoadControlclearLoadControlEventsRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster) + .clearLoadControlEventsRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + demandResponseLoadControlclearLoadControlEventsRequestCommandParams + ); + demandResponseLoadControlClusterInteractionInfoMap.put("clearLoadControlEventsRequest", demandResponseLoadControlclearLoadControlEventsRequestInteractionInfo); + + commandMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInteractionInfoMap); + + Map deviceEnergyManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map deviceEnergyManagementpowerAdjustRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo deviceEnergyManagementpowerAdjustRequestpowerCommandParameterInfo = new CommandParameterInfo("power", Long.class, Long.class); + deviceEnergyManagementpowerAdjustRequestCommandParams.put("power",deviceEnergyManagementpowerAdjustRequestpowerCommandParameterInfo); + + CommandParameterInfo deviceEnergyManagementpowerAdjustRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Long.class, Long.class); + deviceEnergyManagementpowerAdjustRequestCommandParams.put("duration",deviceEnergyManagementpowerAdjustRequestdurationCommandParameterInfo); + InteractionInfo deviceEnergyManagementpowerAdjustRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .powerAdjustRequest((DefaultClusterCallback) callback + , (Long) + commandArguments.get("power") + , (Long) + commandArguments.get("duration") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementpowerAdjustRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("powerAdjustRequest", deviceEnergyManagementpowerAdjustRequestInteractionInfo); + + Map deviceEnergyManagementcancelPowerAdjustRequestCommandParams = new LinkedHashMap(); + InteractionInfo deviceEnergyManagementcancelPowerAdjustRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .cancelPowerAdjustRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementcancelPowerAdjustRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("cancelPowerAdjustRequest", deviceEnergyManagementcancelPowerAdjustRequestInteractionInfo); + + Map deviceEnergyManagementstartTimeAdjustRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo deviceEnergyManagementstartTimeAdjustRequestrequestedStartTimeCommandParameterInfo = new CommandParameterInfo("requestedStartTime", Long.class, Long.class); + deviceEnergyManagementstartTimeAdjustRequestCommandParams.put("requestedStartTime",deviceEnergyManagementstartTimeAdjustRequestrequestedStartTimeCommandParameterInfo); + InteractionInfo deviceEnergyManagementstartTimeAdjustRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .startTimeAdjustRequest((DefaultClusterCallback) callback + , (Long) + commandArguments.get("requestedStartTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementstartTimeAdjustRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("startTimeAdjustRequest", deviceEnergyManagementstartTimeAdjustRequestInteractionInfo); + + Map deviceEnergyManagementpauseRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo deviceEnergyManagementpauseRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Long.class, Long.class); + deviceEnergyManagementpauseRequestCommandParams.put("duration",deviceEnergyManagementpauseRequestdurationCommandParameterInfo); + InteractionInfo deviceEnergyManagementpauseRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .pauseRequest((DefaultClusterCallback) callback + , (Long) + commandArguments.get("duration") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementpauseRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("pauseRequest", deviceEnergyManagementpauseRequestInteractionInfo); + + Map deviceEnergyManagementresumeRequestCommandParams = new LinkedHashMap(); + InteractionInfo deviceEnergyManagementresumeRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .resumeRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementresumeRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("resumeRequest", deviceEnergyManagementresumeRequestInteractionInfo); + + Map deviceEnergyManagementmodifyForecastRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo deviceEnergyManagementmodifyForecastRequestforecastIdCommandParameterInfo = new CommandParameterInfo("forecastId", Long.class, Long.class); + deviceEnergyManagementmodifyForecastRequestCommandParams.put("forecastId",deviceEnergyManagementmodifyForecastRequestforecastIdCommandParameterInfo); + + InteractionInfo deviceEnergyManagementmodifyForecastRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .modifyForecastRequest((DefaultClusterCallback) callback + , (Long) + commandArguments.get("forecastId") + , (ArrayList) + commandArguments.get("slotAdjustments") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementmodifyForecastRequestCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("modifyForecastRequest", deviceEnergyManagementmodifyForecastRequestInteractionInfo); + + Map deviceEnergyManagementrequestConstraintBasedForecastCommandParams = new LinkedHashMap(); + + InteractionInfo deviceEnergyManagementrequestConstraintBasedForecastInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster) + .requestConstraintBasedForecast((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("constraints") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + deviceEnergyManagementrequestConstraintBasedForecastCommandParams + ); + deviceEnergyManagementClusterInteractionInfoMap.put("requestConstraintBasedForecast", deviceEnergyManagementrequestConstraintBasedForecastInteractionInfo); + + commandMap.put("deviceEnergyManagement", deviceEnergyManagementClusterInteractionInfoMap); + + Map energyEvseClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map energyEvsedisableCommandParams = new LinkedHashMap(); + InteractionInfo energyEvsedisableInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster) + .disable((DefaultClusterCallback) callback, 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + energyEvsedisableCommandParams + ); + energyEvseClusterInteractionInfoMap.put("disable", energyEvsedisableInteractionInfo); + + Map energyEvseenableChargingCommandParams = new LinkedHashMap(); + + CommandParameterInfo energyEvseenableChargingchargingEnabledUntilCommandParameterInfo = new CommandParameterInfo("chargingEnabledUntil", Long.class, Long.class); + energyEvseenableChargingCommandParams.put("chargingEnabledUntil",energyEvseenableChargingchargingEnabledUntilCommandParameterInfo); + + CommandParameterInfo energyEvseenableChargingminimumChargeCurrentCommandParameterInfo = new CommandParameterInfo("minimumChargeCurrent", Long.class, Long.class); + energyEvseenableChargingCommandParams.put("minimumChargeCurrent",energyEvseenableChargingminimumChargeCurrentCommandParameterInfo); + + CommandParameterInfo energyEvseenableChargingmaximumChargeCurrentCommandParameterInfo = new CommandParameterInfo("maximumChargeCurrent", Long.class, Long.class); + energyEvseenableChargingCommandParams.put("maximumChargeCurrent",energyEvseenableChargingmaximumChargeCurrentCommandParameterInfo); + InteractionInfo energyEvseenableChargingInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcOperationalStateCluster) cluster) - .stop((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback - ); - }, - () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), - rvcOperationalStatestopCommandParams - ); - rvcOperationalStateClusterInteractionInfoMap.put("stop", rvcOperationalStatestopInteractionInfo); + ((ChipClusters.EnergyEvseCluster) cluster) + .enableCharging((DefaultClusterCallback) callback + , (Long) + commandArguments.get("chargingEnabledUntil") + , (Long) + commandArguments.get("minimumChargeCurrent") + , (Long) + commandArguments.get("maximumChargeCurrent"), 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + energyEvseenableChargingCommandParams + ); + energyEvseClusterInteractionInfoMap.put("enableCharging", energyEvseenableChargingInteractionInfo); - Map rvcOperationalStatestartCommandParams = new LinkedHashMap(); - InteractionInfo rvcOperationalStatestartInteractionInfo = new InteractionInfo( + Map energyEvseenableDischargingCommandParams = new LinkedHashMap(); + + CommandParameterInfo energyEvseenableDischargingdischargingEnabledUntilCommandParameterInfo = new CommandParameterInfo("dischargingEnabledUntil", Long.class, Long.class); + energyEvseenableDischargingCommandParams.put("dischargingEnabledUntil",energyEvseenableDischargingdischargingEnabledUntilCommandParameterInfo); + + CommandParameterInfo energyEvseenableDischargingmaximumDischargeCurrentCommandParameterInfo = new CommandParameterInfo("maximumDischargeCurrent", Long.class, Long.class); + energyEvseenableDischargingCommandParams.put("maximumDischargeCurrent",energyEvseenableDischargingmaximumDischargeCurrentCommandParameterInfo); + InteractionInfo energyEvseenableDischargingInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcOperationalStateCluster) cluster) - .start((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback - ); - }, - () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), - rvcOperationalStatestartCommandParams - ); - rvcOperationalStateClusterInteractionInfoMap.put("start", rvcOperationalStatestartInteractionInfo); + ((ChipClusters.EnergyEvseCluster) cluster) + .enableDischarging((DefaultClusterCallback) callback + , (Long) + commandArguments.get("dischargingEnabledUntil") + , (Long) + commandArguments.get("maximumDischargeCurrent"), 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + energyEvseenableDischargingCommandParams + ); + energyEvseClusterInteractionInfoMap.put("enableDischarging", energyEvseenableDischargingInteractionInfo); - Map rvcOperationalStateresumeCommandParams = new LinkedHashMap(); - InteractionInfo rvcOperationalStateresumeInteractionInfo = new InteractionInfo( + Map energyEvsestartDiagnosticsCommandParams = new LinkedHashMap(); + InteractionInfo energyEvsestartDiagnosticsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcOperationalStateCluster) cluster) - .resume((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback - ); - }, - () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), - rvcOperationalStateresumeCommandParams - ); - rvcOperationalStateClusterInteractionInfoMap.put("resume", rvcOperationalStateresumeInteractionInfo); + ((ChipClusters.EnergyEvseCluster) cluster) + .startDiagnostics((DefaultClusterCallback) callback, 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + energyEvsestartDiagnosticsCommandParams + ); + energyEvseClusterInteractionInfoMap.put("startDiagnostics", energyEvsestartDiagnosticsInteractionInfo); - commandMap.put("rvcOperationalState", rvcOperationalStateClusterInteractionInfoMap); + Map energyEvsesetTargetsCommandParams = new LinkedHashMap(); - Map hepaFilterMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekforSequence", Integer.class, Integer.class); + energyEvsesetTargetsCommandParams.put("dayOfWeekforSequence",energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo); - Map hepaFilterMonitoringresetConditionCommandParams = new LinkedHashMap(); - InteractionInfo hepaFilterMonitoringresetConditionInteractionInfo = new InteractionInfo( + InteractionInfo energyEvsesetTargetsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.HepaFilterMonitoringCluster) cluster) - .resetCondition((DefaultClusterCallback) callback + ((ChipClusters.EnergyEvseCluster) cluster) + .setTargets((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("dayOfWeekforSequence") + , (ArrayList) + commandArguments.get("chargingTargets"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), - hepaFilterMonitoringresetConditionCommandParams + energyEvsesetTargetsCommandParams ); - hepaFilterMonitoringClusterInteractionInfoMap.put("resetCondition", hepaFilterMonitoringresetConditionInteractionInfo); + energyEvseClusterInteractionInfoMap.put("setTargets", energyEvsesetTargetsInteractionInfo); - commandMap.put("hepaFilterMonitoring", hepaFilterMonitoringClusterInteractionInfoMap); + Map energyEvsegetTargetsCommandParams = new LinkedHashMap(); - Map activatedCarbonFilterMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo energyEvsegetTargetsdaysToReturnCommandParameterInfo = new CommandParameterInfo("daysToReturn", Integer.class, Integer.class); + energyEvsegetTargetsCommandParams.put("daysToReturn",energyEvsegetTargetsdaysToReturnCommandParameterInfo); + InteractionInfo energyEvsegetTargetsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster) + .getTargets((ChipClusters.EnergyEvseCluster.GetTargetsResponseCallback) callback + , (Integer) + commandArguments.get("daysToReturn") - Map activatedCarbonFilterMonitoringresetConditionCommandParams = new LinkedHashMap(); - InteractionInfo activatedCarbonFilterMonitoringresetConditionInteractionInfo = new InteractionInfo( + , 10000); + }, + () -> new DelegatedEnergyEvseClusterGetTargetsResponseCallback(), + energyEvsegetTargetsCommandParams + ); + energyEvseClusterInteractionInfoMap.put("getTargets", energyEvsegetTargetsInteractionInfo); + + Map energyEvseclearTargetsCommandParams = new LinkedHashMap(); + InteractionInfo energyEvseclearTargetsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ActivatedCarbonFilterMonitoringCluster) cluster) - .resetCondition((DefaultClusterCallback) callback + ((ChipClusters.EnergyEvseCluster) cluster) + .clearTargets((DefaultClusterCallback) callback, 10000 ); }, () -> new DelegatedDefaultClusterCallback(), - activatedCarbonFilterMonitoringresetConditionCommandParams + energyEvseclearTargetsCommandParams ); - activatedCarbonFilterMonitoringClusterInteractionInfoMap.put("resetCondition", activatedCarbonFilterMonitoringresetConditionInteractionInfo); + energyEvseClusterInteractionInfoMap.put("clearTargets", energyEvseclearTargetsInteractionInfo); - commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap); + commandMap.put("energyEvse", energyEvseClusterInteractionInfoMap); Map doorLockClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -21166,7 +23738,7 @@ public Map> getCommandMap() { commandArguments.get("dayOfWeekForSequence") , (Integer) commandArguments.get("modeForSequence") - , (ArrayList) + , (ArrayList) commandArguments.get("transitions") ); }, @@ -22066,6 +24638,114 @@ public Map> getCommandMap() { ); channelClusterInteractionInfoMap.put("skipChannel", channelskipChannelInteractionInfo); + Map channelgetProgramGuideCommandParams = new LinkedHashMap(); + + CommandParameterInfo channelgetProgramGuidestartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("startTime",channelgetProgramGuidestartTimeCommandParameterInfo); + + CommandParameterInfo channelgetProgramGuideendTimeCommandParameterInfo = new CommandParameterInfo("endTime", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("endTime",channelgetProgramGuideendTimeCommandParameterInfo); + + + + CommandParameterInfo channelgetProgramGuiderecordingFlagCommandParameterInfo = new CommandParameterInfo("recordingFlag", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("recordingFlag",channelgetProgramGuiderecordingFlagCommandParameterInfo); + + + CommandParameterInfo channelgetProgramGuidedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); + channelgetProgramGuideCommandParams.put("data",channelgetProgramGuidedataCommandParameterInfo); + InteractionInfo channelgetProgramGuideInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .getProgramGuide((ChipClusters.ChannelCluster.ProgramGuideResponseCallback) callback + , (Optional) + commandArguments.get("startTime") + + , (Optional) + commandArguments.get("endTime") + + , (Optional>) + commandArguments.get("channelList") + + , (Optional) + commandArguments.get("pageToken") + + , (Optional) + commandArguments.get("recordingFlag") + + , (Optional>) + commandArguments.get("externalIDList") + + , (Optional) + commandArguments.get("data") + + ); + }, + () -> new DelegatedChannelClusterProgramGuideResponseCallback(), + channelgetProgramGuideCommandParams + ); + channelClusterInteractionInfoMap.put("getProgramGuide", channelgetProgramGuideInteractionInfo); + + Map channelrecordProgramCommandParams = new LinkedHashMap(); + + CommandParameterInfo channelrecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); + channelrecordProgramCommandParams.put("programIdentifier",channelrecordProgramprogramIdentifierCommandParameterInfo); + + CommandParameterInfo channelrecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); + channelrecordProgramCommandParams.put("shouldRecordSeries",channelrecordProgramshouldRecordSeriesCommandParameterInfo); + + + CommandParameterInfo channelrecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + channelrecordProgramCommandParams.put("data",channelrecordProgramdataCommandParameterInfo); + InteractionInfo channelrecordProgramInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .recordProgram((DefaultClusterCallback) callback + , (String) + commandArguments.get("programIdentifier") + , (Boolean) + commandArguments.get("shouldRecordSeries") + , (ArrayList) + commandArguments.get("externalIDList") + , (byte[]) + commandArguments.get("data") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + channelrecordProgramCommandParams + ); + channelClusterInteractionInfoMap.put("recordProgram", channelrecordProgramInteractionInfo); + + Map channelcancelRecordProgramCommandParams = new LinkedHashMap(); + + CommandParameterInfo channelcancelRecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); + channelcancelRecordProgramCommandParams.put("programIdentifier",channelcancelRecordProgramprogramIdentifierCommandParameterInfo); + + CommandParameterInfo channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); + channelcancelRecordProgramCommandParams.put("shouldRecordSeries",channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo); + + + CommandParameterInfo channelcancelRecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + channelcancelRecordProgramCommandParams.put("data",channelcancelRecordProgramdataCommandParameterInfo); + InteractionInfo channelcancelRecordProgramInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .cancelRecordProgram((DefaultClusterCallback) callback + , (String) + commandArguments.get("programIdentifier") + , (Boolean) + commandArguments.get("shouldRecordSeries") + , (ArrayList) + commandArguments.get("externalIDList") + , (byte[]) + commandArguments.get("data") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + channelcancelRecordProgramCommandParams + ); + channelClusterInteractionInfoMap.put("cancelRecordProgram", channelcancelRecordProgramInteractionInfo); + commandMap.put("channel", channelClusterInteractionInfoMap); Map targetNavigatorClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -22171,10 +24851,16 @@ public Map> getCommandMap() { mediaPlaybackClusterInteractionInfoMap.put("next", mediaPlaybacknextInteractionInfo); Map mediaPlaybackrewindCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); + mediaPlaybackrewindCommandParams.put("audioAdvanceUnmuted",mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo); InteractionInfo mediaPlaybackrewindInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) .rewind((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Optional) + commandArguments.get("audioAdvanceUnmuted") + ); }, () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), @@ -22183,10 +24869,16 @@ public Map> getCommandMap() { mediaPlaybackClusterInteractionInfoMap.put("rewind", mediaPlaybackrewindInteractionInfo); Map mediaPlaybackfastForwardCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); + mediaPlaybackfastForwardCommandParams.put("audioAdvanceUnmuted",mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo); InteractionInfo mediaPlaybackfastForwardInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) .fastForward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Optional) + commandArguments.get("audioAdvanceUnmuted") + ); }, () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), @@ -22248,6 +24940,57 @@ public Map> getCommandMap() { ); mediaPlaybackClusterInteractionInfoMap.put("seek", mediaPlaybackseekInteractionInfo); + Map mediaPlaybackactivateAudioTrackCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); + mediaPlaybackactivateAudioTrackCommandParams.put("trackID",mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo); + + CommandParameterInfo mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo = new CommandParameterInfo("audioOutputIndex", Integer.class, Integer.class); + mediaPlaybackactivateAudioTrackCommandParams.put("audioOutputIndex",mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo); + InteractionInfo mediaPlaybackactivateAudioTrackInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .activateAudioTrack((DefaultClusterCallback) callback + , (String) + commandArguments.get("trackID") + , (Integer) + commandArguments.get("audioOutputIndex") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + mediaPlaybackactivateAudioTrackCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("activateAudioTrack", mediaPlaybackactivateAudioTrackInteractionInfo); + + Map mediaPlaybackactivateTextTrackCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaPlaybackactivateTextTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); + mediaPlaybackactivateTextTrackCommandParams.put("trackID",mediaPlaybackactivateTextTracktrackIDCommandParameterInfo); + InteractionInfo mediaPlaybackactivateTextTrackInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .activateTextTrack((DefaultClusterCallback) callback + , (String) + commandArguments.get("trackID") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + mediaPlaybackactivateTextTrackCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("activateTextTrack", mediaPlaybackactivateTextTrackInteractionInfo); + + Map mediaPlaybackdeactivateTextTrackCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackdeactivateTextTrackInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .deactivateTextTrack((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + mediaPlaybackdeactivateTextTrackCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("deactivateTextTrack", mediaPlaybackdeactivateTextTrackInteractionInfo); + commandMap.put("mediaPlayback", mediaPlaybackClusterInteractionInfoMap); Map mediaInputClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -22365,6 +25108,10 @@ public Map> getCommandMap() { CommandParameterInfo contentLauncherlaunchContentdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); contentLauncherlaunchContentCommandParams.put("data",contentLauncherlaunchContentdataCommandParameterInfo); + + + CommandParameterInfo contentLauncherlaunchContentuseCurrentContextCommandParameterInfo = new CommandParameterInfo("useCurrentContext", Optional.class, Boolean.class); + contentLauncherlaunchContentCommandParams.put("useCurrentContext",contentLauncherlaunchContentuseCurrentContextCommandParameterInfo); InteractionInfo contentLauncherlaunchContentInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentLauncherCluster) cluster) @@ -22378,6 +25125,12 @@ public Map> getCommandMap() { , (Optional) commandArguments.get("data") + , (Optional) + commandArguments.get("playbackPreferences") + + , (Optional) + commandArguments.get("useCurrentContext") + ); }, () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), @@ -22547,6 +25300,9 @@ public Map> getCommandMap() { CommandParameterInfo accountLoginloginsetupPINCommandParameterInfo = new CommandParameterInfo("setupPIN", String.class, String.class); accountLoginloginCommandParams.put("setupPIN",accountLoginloginsetupPINCommandParameterInfo); + + CommandParameterInfo accountLoginloginnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); + accountLoginloginCommandParams.put("node",accountLoginloginnodeCommandParameterInfo); InteractionInfo accountLoginloginInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.AccountLoginCluster) cluster) @@ -22554,7 +25310,9 @@ public Map> getCommandMap() { , (String) commandArguments.get("tempAccountIdentifier") , (String) - commandArguments.get("setupPIN"), 10000 + commandArguments.get("setupPIN") + , (Optional) + commandArguments.get("node"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -22563,10 +25321,15 @@ public Map> getCommandMap() { accountLoginClusterInteractionInfoMap.put("login", accountLoginloginInteractionInfo); Map accountLoginlogoutCommandParams = new LinkedHashMap(); + + CommandParameterInfo accountLoginlogoutnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); + accountLoginlogoutCommandParams.put("node",accountLoginlogoutnodeCommandParameterInfo); InteractionInfo accountLoginlogoutInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.AccountLoginCluster) cluster) - .logout((DefaultClusterCallback) callback, 10000 + .logout((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("node"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -22576,6 +25339,193 @@ public Map> getCommandMap() { commandMap.put("accountLogin", accountLoginClusterInteractionInfoMap); + Map contentControlClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map contentControlupdatePINCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlupdatePINoldPINCommandParameterInfo = new CommandParameterInfo("oldPIN", Optional.class, String.class); + contentControlupdatePINCommandParams.put("oldPIN",contentControlupdatePINoldPINCommandParameterInfo); + + CommandParameterInfo contentControlupdatePINnewPINCommandParameterInfo = new CommandParameterInfo("newPIN", String.class, String.class); + contentControlupdatePINCommandParams.put("newPIN",contentControlupdatePINnewPINCommandParameterInfo); + InteractionInfo contentControlupdatePINInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .updatePIN((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("oldPIN") + , (String) + commandArguments.get("newPIN") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlupdatePINCommandParams + ); + contentControlClusterInteractionInfoMap.put("updatePIN", contentControlupdatePINInteractionInfo); + + Map contentControlresetPINCommandParams = new LinkedHashMap(); + InteractionInfo contentControlresetPINInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .resetPIN((ChipClusters.ContentControlCluster.ResetPINResponseCallback) callback + ); + }, + () -> new DelegatedContentControlClusterResetPINResponseCallback(), + contentControlresetPINCommandParams + ); + contentControlClusterInteractionInfoMap.put("resetPIN", contentControlresetPINInteractionInfo); + + Map contentControlenableCommandParams = new LinkedHashMap(); + InteractionInfo contentControlenableInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .enable((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlenableCommandParams + ); + contentControlClusterInteractionInfoMap.put("enable", contentControlenableInteractionInfo); + + Map contentControldisableCommandParams = new LinkedHashMap(); + InteractionInfo contentControldisableInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .disable((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControldisableCommandParams + ); + contentControlClusterInteractionInfoMap.put("disable", contentControldisableInteractionInfo); + + Map contentControladdBonusTimeCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControladdBonusTimePINCodeCommandParameterInfo = new CommandParameterInfo("PINCode", Optional.class, String.class); + contentControladdBonusTimeCommandParams.put("PINCode",contentControladdBonusTimePINCodeCommandParameterInfo); + + CommandParameterInfo contentControladdBonusTimebonusTimeCommandParameterInfo = new CommandParameterInfo("bonusTime", Optional.class, Long.class); + contentControladdBonusTimeCommandParams.put("bonusTime",contentControladdBonusTimebonusTimeCommandParameterInfo); + InteractionInfo contentControladdBonusTimeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .addBonusTime((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("PINCode") + , (Optional) + commandArguments.get("bonusTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControladdBonusTimeCommandParams + ); + contentControlClusterInteractionInfoMap.put("addBonusTime", contentControladdBonusTimeInteractionInfo); + + Map contentControlsetScreenDailyTimeCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlsetScreenDailyTimescreenTimeCommandParameterInfo = new CommandParameterInfo("screenTime", Long.class, Long.class); + contentControlsetScreenDailyTimeCommandParams.put("screenTime",contentControlsetScreenDailyTimescreenTimeCommandParameterInfo); + InteractionInfo contentControlsetScreenDailyTimeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .setScreenDailyTime((DefaultClusterCallback) callback + , (Long) + commandArguments.get("screenTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlsetScreenDailyTimeCommandParams + ); + contentControlClusterInteractionInfoMap.put("setScreenDailyTime", contentControlsetScreenDailyTimeInteractionInfo); + + Map contentControlblockUnratedContentCommandParams = new LinkedHashMap(); + InteractionInfo contentControlblockUnratedContentInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .blockUnratedContent((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlblockUnratedContentCommandParams + ); + contentControlClusterInteractionInfoMap.put("blockUnratedContent", contentControlblockUnratedContentInteractionInfo); + + Map contentControlunblockUnratedContentCommandParams = new LinkedHashMap(); + InteractionInfo contentControlunblockUnratedContentInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .unblockUnratedContent((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlunblockUnratedContentCommandParams + ); + contentControlClusterInteractionInfoMap.put("unblockUnratedContent", contentControlunblockUnratedContentInteractionInfo); + + Map contentControlsetOnDemandRatingThresholdCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlsetOnDemandRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); + contentControlsetOnDemandRatingThresholdCommandParams.put("rating",contentControlsetOnDemandRatingThresholdratingCommandParameterInfo); + InteractionInfo contentControlsetOnDemandRatingThresholdInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .setOnDemandRatingThreshold((DefaultClusterCallback) callback + , (String) + commandArguments.get("rating") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlsetOnDemandRatingThresholdCommandParams + ); + contentControlClusterInteractionInfoMap.put("setOnDemandRatingThreshold", contentControlsetOnDemandRatingThresholdInteractionInfo); + + Map contentControlsetScheduledContentRatingThresholdCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); + contentControlsetScheduledContentRatingThresholdCommandParams.put("rating",contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo); + InteractionInfo contentControlsetScheduledContentRatingThresholdInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .setScheduledContentRatingThreshold((DefaultClusterCallback) callback + , (String) + commandArguments.get("rating") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlsetScheduledContentRatingThresholdCommandParams + ); + contentControlClusterInteractionInfoMap.put("setScheduledContentRatingThreshold", contentControlsetScheduledContentRatingThresholdInteractionInfo); + + commandMap.put("contentControl", contentControlClusterInteractionInfoMap); + + Map contentAppObserverClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map contentAppObservercontentAppMessageCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentAppObservercontentAppMessagedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); + contentAppObservercontentAppMessageCommandParams.put("data",contentAppObservercontentAppMessagedataCommandParameterInfo); + + CommandParameterInfo contentAppObservercontentAppMessageencodingHintCommandParameterInfo = new CommandParameterInfo("encodingHint", String.class, String.class); + contentAppObservercontentAppMessageCommandParams.put("encodingHint",contentAppObservercontentAppMessageencodingHintCommandParameterInfo); + InteractionInfo contentAppObservercontentAppMessageInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster) + .contentAppMessage((ChipClusters.ContentAppObserverCluster.ContentAppMessageResponseCallback) callback + , (Optional) + commandArguments.get("data") + + , (String) + commandArguments.get("encodingHint") + + ); + }, + () -> new DelegatedContentAppObserverClusterContentAppMessageResponseCallback(), + contentAppObservercontentAppMessageCommandParams + ); + contentAppObserverClusterInteractionInfoMap.put("contentAppMessage", contentAppObservercontentAppMessageInteractionInfo); + + commandMap.put("contentAppObserver", contentAppObserverClusterInteractionInfoMap); + Map electricalMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); Map electricalMeasurementgetProfileInfoCommandCommandParams = 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 4f771db6a3c877..3ff5881314f8a3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -276,17 +276,17 @@ private static Map readScenesInteractionInfo() { readScenesSceneTableSizeCommandParams ); result.put("readSceneTableSizeAttribute", readScenesSceneTableSizeAttributeInteractionInfo); - Map readScenesRemainingCapacityCommandParams = new LinkedHashMap(); - InteractionInfo readScenesRemainingCapacityAttributeInteractionInfo = new InteractionInfo( + Map readScenesFabricSceneInfoCommandParams = new LinkedHashMap(); + InteractionInfo readScenesFabricSceneInfoAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readRemainingCapacityAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.ScenesCluster) cluster).readFabricSceneInfoAttribute( + (ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesRemainingCapacityCommandParams + () -> new ClusterInfoMapping.DelegatedScenesClusterFabricSceneInfoAttributeCallback(), + readScenesFabricSceneInfoCommandParams ); - result.put("readRemainingCapacityAttribute", readScenesRemainingCapacityAttributeInteractionInfo); + result.put("readFabricSceneInfoAttribute", readScenesFabricSceneInfoAttributeInteractionInfo); Map readScenesGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readScenesGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -1680,6 +1680,28 @@ private static Map readBasicInformationInteractionInfo( readBasicInformationUniqueIDCommandParams ); result.put("readUniqueIDAttribute", readBasicInformationUniqueIDAttributeInteractionInfo); + Map readBasicInformationSpecificationVersionCommandParams = new LinkedHashMap(); + InteractionInfo readBasicInformationSpecificationVersionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BasicInformationCluster) cluster).readSpecificationVersionAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readBasicInformationSpecificationVersionCommandParams + ); + result.put("readSpecificationVersionAttribute", readBasicInformationSpecificationVersionAttributeInteractionInfo); + Map readBasicInformationMaxPathsPerInvokeCommandParams = new LinkedHashMap(); + InteractionInfo readBasicInformationMaxPathsPerInvokeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BasicInformationCluster) cluster).readMaxPathsPerInvokeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBasicInformationMaxPathsPerInvokeCommandParams + ); + result.put("readMaxPathsPerInvokeAttribute", readBasicInformationMaxPathsPerInvokeAttributeInteractionInfo); Map readBasicInformationGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readBasicInformationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5997,128 +6019,437 @@ private static Map readIcdManagementInteractionInfo() { return result; } - private static Map readOvenOperationalStateInteractionInfo() { - Map result = new LinkedHashMap<>();Map readOvenOperationalStatePhaseListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStatePhaseListAttributeInteractionInfo = new InteractionInfo( + private static Map readTimerInteractionInfo() { + Map result = new LinkedHashMap<>();Map readTimerSetTimeCommandParams = new LinkedHashMap(); + InteractionInfo readTimerSetTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readSetTimeAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readTimerSetTimeCommandParams + ); + result.put("readSetTimeAttribute", readTimerSetTimeAttributeInteractionInfo); + Map readTimerTimeRemainingCommandParams = new LinkedHashMap(); + InteractionInfo readTimerTimeRemainingAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readTimeRemainingAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readTimerTimeRemainingCommandParams + ); + result.put("readTimeRemainingAttribute", readTimerTimeRemainingAttributeInteractionInfo); + Map readTimerTimerStateCommandParams = new LinkedHashMap(); + InteractionInfo readTimerTimerStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readTimerStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimerTimerStateCommandParams + ); + result.put("readTimerStateAttribute", readTimerTimerStateAttributeInteractionInfo); + Map readTimerGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readTimerGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.TimerCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedTimerClusterGeneratedCommandListAttributeCallback(), + readTimerGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readTimerGeneratedCommandListAttributeInteractionInfo); + Map readTimerAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readTimerAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.TimerCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedTimerClusterAcceptedCommandListAttributeCallback(), + readTimerAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readTimerAcceptedCommandListAttributeInteractionInfo); + Map readTimerEventListCommandParams = new LinkedHashMap(); + InteractionInfo readTimerEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readEventListAttribute( + (ChipClusters.TimerCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedTimerClusterEventListAttributeCallback(), + readTimerEventListCommandParams + ); + result.put("readEventListAttribute", readTimerEventListAttributeInteractionInfo); + Map readTimerAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readTimerAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readAttributeListAttribute( + (ChipClusters.TimerCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedTimerClusterAttributeListAttributeCallback(), + readTimerAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readTimerAttributeListAttributeInteractionInfo); + Map readTimerFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readTimerFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readTimerFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readTimerFeatureMapAttributeInteractionInfo); + Map readTimerClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readTimerClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimerCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimerClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readTimerClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readOvenCavityOperationalStateInteractionInfo() { + Map result = new LinkedHashMap<>();Map readOvenCavityOperationalStatePhaseListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStatePhaseListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readPhaseListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.PhaseListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterPhaseListAttributeCallback(), + readOvenCavityOperationalStatePhaseListCommandParams + ); + result.put("readPhaseListAttribute", readOvenCavityOperationalStatePhaseListAttributeInteractionInfo); + Map readOvenCavityOperationalStateCurrentPhaseCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateCurrentPhaseAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readCurrentPhaseAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.CurrentPhaseAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterCurrentPhaseAttributeCallback(), + readOvenCavityOperationalStateCurrentPhaseCommandParams + ); + result.put("readCurrentPhaseAttribute", readOvenCavityOperationalStateCurrentPhaseAttributeInteractionInfo); + Map readOvenCavityOperationalStateCountdownTimeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateCountdownTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readCountdownTimeAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.CountdownTimeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterCountdownTimeAttributeCallback(), + readOvenCavityOperationalStateCountdownTimeCommandParams + ); + result.put("readCountdownTimeAttribute", readOvenCavityOperationalStateCountdownTimeAttributeInteractionInfo); + Map readOvenCavityOperationalStateOperationalStateListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateOperationalStateListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readOperationalStateListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.OperationalStateListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterOperationalStateListAttributeCallback(), + readOvenCavityOperationalStateOperationalStateListCommandParams + ); + result.put("readOperationalStateListAttribute", readOvenCavityOperationalStateOperationalStateListAttributeInteractionInfo); + Map readOvenCavityOperationalStateOperationalStateCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateOperationalStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readOperationalStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOvenCavityOperationalStateOperationalStateCommandParams + ); + result.put("readOperationalStateAttribute", readOvenCavityOperationalStateOperationalStateAttributeInteractionInfo); + Map readOvenCavityOperationalStateGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterGeneratedCommandListAttributeCallback(), + readOvenCavityOperationalStateGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readOvenCavityOperationalStateGeneratedCommandListAttributeInteractionInfo); + Map readOvenCavityOperationalStateAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterAcceptedCommandListAttributeCallback(), + readOvenCavityOperationalStateAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readOvenCavityOperationalStateAcceptedCommandListAttributeInteractionInfo); + Map readOvenCavityOperationalStateEventListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readEventListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterEventListAttributeCallback(), + readOvenCavityOperationalStateEventListCommandParams + ); + result.put("readEventListAttribute", readOvenCavityOperationalStateEventListAttributeInteractionInfo); + Map readOvenCavityOperationalStateAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readAttributeListAttribute( + (ChipClusters.OvenCavityOperationalStateCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenCavityOperationalStateClusterAttributeListAttributeCallback(), + readOvenCavityOperationalStateAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readOvenCavityOperationalStateAttributeListAttributeInteractionInfo); + Map readOvenCavityOperationalStateFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readOvenCavityOperationalStateFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readOvenCavityOperationalStateFeatureMapAttributeInteractionInfo); + Map readOvenCavityOperationalStateClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readOvenCavityOperationalStateClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenCavityOperationalStateCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOvenCavityOperationalStateClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readOvenCavityOperationalStateClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readOvenModeInteractionInfo() { + Map result = new LinkedHashMap<>();Map readOvenModeSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readSupportedModesAttribute( + (ChipClusters.OvenModeCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterSupportedModesAttributeCallback(), + readOvenModeSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readOvenModeSupportedModesAttributeInteractionInfo); + Map readOvenModeCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOvenModeCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readOvenModeCurrentModeAttributeInteractionInfo); + Map readOvenModeStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readStartUpModeAttribute( + (ChipClusters.OvenModeCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterStartUpModeAttributeCallback(), + readOvenModeStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readOvenModeStartUpModeAttributeInteractionInfo); + Map readOvenModeOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readOnModeAttribute( + (ChipClusters.OvenModeCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterOnModeAttributeCallback(), + readOvenModeOnModeCommandParams + ); + result.put("readOnModeAttribute", readOvenModeOnModeAttributeInteractionInfo); + Map readOvenModeGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterGeneratedCommandListAttributeCallback(), + readOvenModeGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readOvenModeGeneratedCommandListAttributeInteractionInfo); + Map readOvenModeAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readPhaseListAttribute( - (ChipClusters.OvenOperationalStateCluster.PhaseListAttributeCallback) callback + ((ChipClusters.OvenModeCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterPhaseListAttributeCallback(), - readOvenOperationalStatePhaseListCommandParams + () -> new ClusterInfoMapping.DelegatedOvenModeClusterAcceptedCommandListAttributeCallback(), + readOvenModeAcceptedCommandListCommandParams ); - result.put("readPhaseListAttribute", readOvenOperationalStatePhaseListAttributeInteractionInfo); - Map readOvenOperationalStateCurrentPhaseCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateCurrentPhaseAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readOvenModeAcceptedCommandListAttributeInteractionInfo); + Map readOvenModeEventListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readCurrentPhaseAttribute( - (ChipClusters.OvenOperationalStateCluster.CurrentPhaseAttributeCallback) callback + ((ChipClusters.OvenModeCluster) cluster).readEventListAttribute( + (ChipClusters.OvenModeCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterCurrentPhaseAttributeCallback(), - readOvenOperationalStateCurrentPhaseCommandParams + () -> new ClusterInfoMapping.DelegatedOvenModeClusterEventListAttributeCallback(), + readOvenModeEventListCommandParams ); - result.put("readCurrentPhaseAttribute", readOvenOperationalStateCurrentPhaseAttributeInteractionInfo); - Map readOvenOperationalStateCountdownTimeCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateCountdownTimeAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readOvenModeEventListAttributeInteractionInfo); + Map readOvenModeAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readCountdownTimeAttribute( - (ChipClusters.OvenOperationalStateCluster.CountdownTimeAttributeCallback) callback + ((ChipClusters.OvenModeCluster) cluster).readAttributeListAttribute( + (ChipClusters.OvenModeCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterCountdownTimeAttributeCallback(), - readOvenOperationalStateCountdownTimeCommandParams + () -> new ClusterInfoMapping.DelegatedOvenModeClusterAttributeListAttributeCallback(), + readOvenModeAttributeListCommandParams ); - result.put("readCountdownTimeAttribute", readOvenOperationalStateCountdownTimeAttributeInteractionInfo); - Map readOvenOperationalStateOperationalStateListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateOperationalStateListAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readOvenModeAttributeListAttributeInteractionInfo); + Map readOvenModeFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readOperationalStateListAttribute( - (ChipClusters.OvenOperationalStateCluster.OperationalStateListAttributeCallback) callback + ((ChipClusters.OvenModeCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterOperationalStateListAttributeCallback(), - readOvenOperationalStateOperationalStateListCommandParams + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readOvenModeFeatureMapCommandParams ); - result.put("readOperationalStateListAttribute", readOvenOperationalStateOperationalStateListAttributeInteractionInfo); - Map readOvenOperationalStateOperationalStateCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateOperationalStateAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readOvenModeFeatureMapAttributeInteractionInfo); + Map readOvenModeClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readOperationalStateAttribute( + ((ChipClusters.OvenModeCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readOvenOperationalStateOperationalStateCommandParams + readOvenModeClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readOvenModeClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readLaundryDryerControlsInteractionInfo() { + Map result = new LinkedHashMap<>();Map readLaundryDryerControlsSupportedDrynessLevelsCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsSupportedDrynessLevelsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryDryerControlsCluster) cluster).readSupportedDrynessLevelsAttribute( + (ChipClusters.LaundryDryerControlsCluster.SupportedDrynessLevelsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterSupportedDrynessLevelsAttributeCallback(), + readLaundryDryerControlsSupportedDrynessLevelsCommandParams + ); + result.put("readSupportedDrynessLevelsAttribute", readLaundryDryerControlsSupportedDrynessLevelsAttributeInteractionInfo); + Map readLaundryDryerControlsSelectedDrynessLevelCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsSelectedDrynessLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryDryerControlsCluster) cluster).readSelectedDrynessLevelAttribute( + (ChipClusters.LaundryDryerControlsCluster.SelectedDrynessLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterSelectedDrynessLevelAttributeCallback(), + readLaundryDryerControlsSelectedDrynessLevelCommandParams ); - result.put("readOperationalStateAttribute", readOvenOperationalStateOperationalStateAttributeInteractionInfo); - Map readOvenOperationalStateGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readSelectedDrynessLevelAttribute", readLaundryDryerControlsSelectedDrynessLevelAttributeInteractionInfo); + Map readLaundryDryerControlsGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.OvenOperationalStateCluster.GeneratedCommandListAttributeCallback) callback + ((ChipClusters.LaundryDryerControlsCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.LaundryDryerControlsCluster.GeneratedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterGeneratedCommandListAttributeCallback(), - readOvenOperationalStateGeneratedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterGeneratedCommandListAttributeCallback(), + readLaundryDryerControlsGeneratedCommandListCommandParams ); - result.put("readGeneratedCommandListAttribute", readOvenOperationalStateGeneratedCommandListAttributeInteractionInfo); - Map readOvenOperationalStateAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readGeneratedCommandListAttribute", readLaundryDryerControlsGeneratedCommandListAttributeInteractionInfo); + Map readLaundryDryerControlsAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.OvenOperationalStateCluster.AcceptedCommandListAttributeCallback) callback + ((ChipClusters.LaundryDryerControlsCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.LaundryDryerControlsCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterAcceptedCommandListAttributeCallback(), - readOvenOperationalStateAcceptedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterAcceptedCommandListAttributeCallback(), + readLaundryDryerControlsAcceptedCommandListCommandParams ); - result.put("readAcceptedCommandListAttribute", readOvenOperationalStateAcceptedCommandListAttributeInteractionInfo); - Map readOvenOperationalStateEventListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateEventListAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readLaundryDryerControlsAcceptedCommandListAttributeInteractionInfo); + Map readLaundryDryerControlsEventListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readEventListAttribute( - (ChipClusters.OvenOperationalStateCluster.EventListAttributeCallback) callback + ((ChipClusters.LaundryDryerControlsCluster) cluster).readEventListAttribute( + (ChipClusters.LaundryDryerControlsCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterEventListAttributeCallback(), - readOvenOperationalStateEventListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterEventListAttributeCallback(), + readLaundryDryerControlsEventListCommandParams ); - result.put("readEventListAttribute", readOvenOperationalStateEventListAttributeInteractionInfo); - Map readOvenOperationalStateAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateAttributeListAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readLaundryDryerControlsEventListAttributeInteractionInfo); + Map readLaundryDryerControlsAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readAttributeListAttribute( - (ChipClusters.OvenOperationalStateCluster.AttributeListAttributeCallback) callback + ((ChipClusters.LaundryDryerControlsCluster) cluster).readAttributeListAttribute( + (ChipClusters.LaundryDryerControlsCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedOvenOperationalStateClusterAttributeListAttributeCallback(), - readOvenOperationalStateAttributeListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryDryerControlsClusterAttributeListAttributeCallback(), + readLaundryDryerControlsAttributeListCommandParams ); - result.put("readAttributeListAttribute", readOvenOperationalStateAttributeListAttributeInteractionInfo); - Map readOvenOperationalStateFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateFeatureMapAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readLaundryDryerControlsAttributeListAttributeInteractionInfo); + Map readLaundryDryerControlsFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readFeatureMapAttribute( + ((ChipClusters.LaundryDryerControlsCluster) cluster).readFeatureMapAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readOvenOperationalStateFeatureMapCommandParams + readLaundryDryerControlsFeatureMapCommandParams ); - result.put("readFeatureMapAttribute", readOvenOperationalStateFeatureMapAttributeInteractionInfo); - Map readOvenOperationalStateClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readOvenOperationalStateClusterRevisionAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readLaundryDryerControlsFeatureMapAttributeInteractionInfo); + Map readLaundryDryerControlsClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryDryerControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.OvenOperationalStateCluster) cluster).readClusterRevisionAttribute( + ((ChipClusters.LaundryDryerControlsCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readOvenOperationalStateClusterRevisionCommandParams + readLaundryDryerControlsClusterRevisionCommandParams ); - result.put("readClusterRevisionAttribute", readOvenOperationalStateClusterRevisionAttributeInteractionInfo); + result.put("readClusterRevisionAttribute", readLaundryDryerControlsClusterRevisionAttributeInteractionInfo); return result; } @@ -8306,163 +8637,1210 @@ private static Map readActivatedCarbonFilterMonitoringI return result; } - private static Map readDoorLockInteractionInfo() { - Map result = new LinkedHashMap<>();Map readDoorLockLockStateCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockLockStateAttributeInteractionInfo = new InteractionInfo( + private static Map readBooleanStateConfigurationInteractionInfo() { + Map result = new LinkedHashMap<>();Map readBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readLockStateAttribute( - (ChipClusters.DoorLockCluster.LockStateAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readCurrentSensitivityLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedDoorLockClusterLockStateAttributeCallback(), - readDoorLockLockStateCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanStateConfigurationCurrentSensitivityLevelCommandParams ); - result.put("readLockStateAttribute", readDoorLockLockStateAttributeInteractionInfo); - Map readDoorLockLockTypeCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockLockTypeAttributeInteractionInfo = new InteractionInfo( + result.put("readCurrentSensitivityLevelAttribute", readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo); + Map readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readLockTypeAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSupportedSensitivityLevelsAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockLockTypeCommandParams + readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams ); - result.put("readLockTypeAttribute", readDoorLockLockTypeAttributeInteractionInfo); - Map readDoorLockActuatorEnabledCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockActuatorEnabledAttributeInteractionInfo = new InteractionInfo( + result.put("readSupportedSensitivityLevelsAttribute", readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo); + Map readBooleanStateConfigurationDefaultSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readActuatorEnabledAttribute( - (ChipClusters.BooleanAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readDefaultSensitivityLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), - readDoorLockActuatorEnabledCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanStateConfigurationDefaultSensitivityLevelCommandParams ); - result.put("readActuatorEnabledAttribute", readDoorLockActuatorEnabledAttributeInteractionInfo); - Map readDoorLockDoorStateCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockDoorStateAttributeInteractionInfo = new InteractionInfo( + result.put("readDefaultSensitivityLevelAttribute", readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsActiveCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readDoorStateAttribute( - (ChipClusters.DoorLockCluster.DoorStateAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsActiveAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedDoorLockClusterDoorStateAttributeCallback(), - readDoorLockDoorStateCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanStateConfigurationAlarmsActiveCommandParams ); - result.put("readDoorStateAttribute", readDoorLockDoorStateAttributeInteractionInfo); - Map readDoorLockDoorOpenEventsCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockDoorOpenEventsAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsActiveAttribute", readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readDoorOpenEventsAttribute( - (ChipClusters.LongAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSuppressedAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readDoorLockDoorOpenEventsCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanStateConfigurationAlarmsSuppressedCommandParams ); - result.put("readDoorOpenEventsAttribute", readDoorLockDoorOpenEventsAttributeInteractionInfo); - Map readDoorLockDoorClosedEventsCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockDoorClosedEventsAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsSuppressedAttribute", readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readDoorClosedEventsAttribute( - (ChipClusters.LongAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsEnabledAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readDoorLockDoorClosedEventsCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanStateConfigurationAlarmsEnabledCommandParams ); - result.put("readDoorClosedEventsAttribute", readDoorLockDoorClosedEventsAttributeInteractionInfo); - Map readDoorLockOpenPeriodCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockOpenPeriodAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsEnabledAttribute", readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readOpenPeriodAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSupportedAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockOpenPeriodCommandParams + readBooleanStateConfigurationAlarmsSupportedCommandParams ); - result.put("readOpenPeriodAttribute", readDoorLockOpenPeriodAttributeInteractionInfo); - Map readDoorLockNumberOfTotalUsersSupportedCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfTotalUsersSupportedAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsSupportedAttribute", readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo); + Map readBooleanStateConfigurationSensorFaultCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationSensorFaultAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfTotalUsersSupportedAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSensorFaultAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfTotalUsersSupportedCommandParams + readBooleanStateConfigurationSensorFaultCommandParams ); - result.put("readNumberOfTotalUsersSupportedAttribute", readDoorLockNumberOfTotalUsersSupportedAttributeInteractionInfo); - Map readDoorLockNumberOfPINUsersSupportedCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfPINUsersSupportedAttributeInteractionInfo = new InteractionInfo( + result.put("readSensorFaultAttribute", readBooleanStateConfigurationSensorFaultAttributeInteractionInfo); + Map readBooleanStateConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfPINUsersSupportedAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.GeneratedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfPINUsersSupportedCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterGeneratedCommandListAttributeCallback(), + readBooleanStateConfigurationGeneratedCommandListCommandParams ); - result.put("readNumberOfPINUsersSupportedAttribute", readDoorLockNumberOfPINUsersSupportedAttributeInteractionInfo); - Map readDoorLockNumberOfRFIDUsersSupportedCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfRFIDUsersSupportedAttributeInteractionInfo = new InteractionInfo( + result.put("readGeneratedCommandListAttribute", readBooleanStateConfigurationGeneratedCommandListAttributeInteractionInfo); + Map readBooleanStateConfigurationAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfRFIDUsersSupportedAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfRFIDUsersSupportedCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterAcceptedCommandListAttributeCallback(), + readBooleanStateConfigurationAcceptedCommandListCommandParams ); - result.put("readNumberOfRFIDUsersSupportedAttribute", readDoorLockNumberOfRFIDUsersSupportedAttributeInteractionInfo); - Map readDoorLockNumberOfWeekDaySchedulesSupportedPerUserCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfWeekDaySchedulesSupportedPerUserAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readBooleanStateConfigurationAcceptedCommandListAttributeInteractionInfo); + Map readBooleanStateConfigurationEventListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfWeekDaySchedulesSupportedPerUserAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readEventListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfWeekDaySchedulesSupportedPerUserCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterEventListAttributeCallback(), + readBooleanStateConfigurationEventListCommandParams ); - result.put("readNumberOfWeekDaySchedulesSupportedPerUserAttribute", readDoorLockNumberOfWeekDaySchedulesSupportedPerUserAttributeInteractionInfo); - Map readDoorLockNumberOfYearDaySchedulesSupportedPerUserCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfYearDaySchedulesSupportedPerUserAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readBooleanStateConfigurationEventListAttributeInteractionInfo); + Map readBooleanStateConfigurationAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfYearDaySchedulesSupportedPerUserAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAttributeListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfYearDaySchedulesSupportedPerUserCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterAttributeListAttributeCallback(), + readBooleanStateConfigurationAttributeListCommandParams ); - result.put("readNumberOfYearDaySchedulesSupportedPerUserAttribute", readDoorLockNumberOfYearDaySchedulesSupportedPerUserAttributeInteractionInfo); - Map readDoorLockNumberOfHolidaySchedulesSupportedCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockNumberOfHolidaySchedulesSupportedAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readBooleanStateConfigurationAttributeListAttributeInteractionInfo); + Map readBooleanStateConfigurationFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readNumberOfHolidaySchedulesSupportedAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockNumberOfHolidaySchedulesSupportedCommandParams + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readBooleanStateConfigurationFeatureMapCommandParams ); - result.put("readNumberOfHolidaySchedulesSupportedAttribute", readDoorLockNumberOfHolidaySchedulesSupportedAttributeInteractionInfo); - Map readDoorLockMaxPINCodeLengthCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockMaxPINCodeLengthAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readBooleanStateConfigurationFeatureMapAttributeInteractionInfo); + Map readBooleanStateConfigurationClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DoorLockCluster) cluster).readMaxPINCodeLengthAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDoorLockMaxPINCodeLengthCommandParams + readBooleanStateConfigurationClusterRevisionCommandParams ); - result.put("readMaxPINCodeLengthAttribute", readDoorLockMaxPINCodeLengthAttributeInteractionInfo); - Map readDoorLockMinPINCodeLengthCommandParams = new LinkedHashMap(); - InteractionInfo readDoorLockMinPINCodeLengthAttributeInteractionInfo = new InteractionInfo( + result.put("readClusterRevisionAttribute", readBooleanStateConfigurationClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readValveConfigurationAndControlInteractionInfo() { + Map result = new LinkedHashMap<>();Map readValveConfigurationAndControlOpenDurationCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlOpenDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readOpenDurationAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.OpenDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterOpenDurationAttributeCallback(), + readValveConfigurationAndControlOpenDurationCommandParams + ); + result.put("readOpenDurationAttribute", readValveConfigurationAndControlOpenDurationAttributeInteractionInfo); + Map readValveConfigurationAndControlDefaultOpenDurationCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlDefaultOpenDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readDefaultOpenDurationAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.DefaultOpenDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterDefaultOpenDurationAttributeCallback(), + readValveConfigurationAndControlDefaultOpenDurationCommandParams + ); + result.put("readDefaultOpenDurationAttribute", readValveConfigurationAndControlDefaultOpenDurationAttributeInteractionInfo); + Map readValveConfigurationAndControlAutoCloseTimeCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAutoCloseTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAutoCloseTimeAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AutoCloseTimeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAutoCloseTimeAttributeCallback(), + readValveConfigurationAndControlAutoCloseTimeCommandParams + ); + result.put("readAutoCloseTimeAttribute", readValveConfigurationAndControlAutoCloseTimeAttributeInteractionInfo); + Map readValveConfigurationAndControlRemainingDurationCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlRemainingDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readRemainingDurationAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.RemainingDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterRemainingDurationAttributeCallback(), + readValveConfigurationAndControlRemainingDurationCommandParams + ); + result.put("readRemainingDurationAttribute", readValveConfigurationAndControlRemainingDurationAttributeInteractionInfo); + Map readValveConfigurationAndControlCurrentStateCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlCurrentStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readCurrentStateAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.CurrentStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterCurrentStateAttributeCallback(), + readValveConfigurationAndControlCurrentStateCommandParams + ); + result.put("readCurrentStateAttribute", readValveConfigurationAndControlCurrentStateAttributeInteractionInfo); + Map readValveConfigurationAndControlTargetStateCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlTargetStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readTargetStateAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.TargetStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterTargetStateAttributeCallback(), + readValveConfigurationAndControlTargetStateCommandParams + ); + result.put("readTargetStateAttribute", readValveConfigurationAndControlTargetStateAttributeInteractionInfo); + Map readValveConfigurationAndControlCurrentLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlCurrentLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readCurrentLevelAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.CurrentLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterCurrentLevelAttributeCallback(), + readValveConfigurationAndControlCurrentLevelCommandParams + ); + result.put("readCurrentLevelAttribute", readValveConfigurationAndControlCurrentLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlTargetLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlTargetLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readTargetLevelAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.TargetLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterTargetLevelAttributeCallback(), + readValveConfigurationAndControlTargetLevelCommandParams + ); + result.put("readTargetLevelAttribute", readValveConfigurationAndControlTargetLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlDefaultOpenLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlDefaultOpenLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readDefaultOpenLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlDefaultOpenLevelCommandParams + ); + result.put("readDefaultOpenLevelAttribute", readValveConfigurationAndControlDefaultOpenLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlValveFaultCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlValveFaultAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readValveFaultAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlValveFaultCommandParams + ); + result.put("readValveFaultAttribute", readValveConfigurationAndControlValveFaultAttributeInteractionInfo); + Map readValveConfigurationAndControlGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterGeneratedCommandListAttributeCallback(), + readValveConfigurationAndControlGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readValveConfigurationAndControlGeneratedCommandListAttributeInteractionInfo); + Map readValveConfigurationAndControlAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAcceptedCommandListAttributeCallback(), + readValveConfigurationAndControlAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readValveConfigurationAndControlAcceptedCommandListAttributeInteractionInfo); + Map readValveConfigurationAndControlEventListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readEventListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterEventListAttributeCallback(), + readValveConfigurationAndControlEventListCommandParams + ); + result.put("readEventListAttribute", readValveConfigurationAndControlEventListAttributeInteractionInfo); + Map readValveConfigurationAndControlAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAttributeListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAttributeListAttributeCallback(), + readValveConfigurationAndControlAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readValveConfigurationAndControlAttributeListAttributeInteractionInfo); + Map readValveConfigurationAndControlFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readValveConfigurationAndControlFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readValveConfigurationAndControlFeatureMapAttributeInteractionInfo); + Map readValveConfigurationAndControlClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readValveConfigurationAndControlClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readElectricalEnergyMeasurementInteractionInfo() { + Map result = new LinkedHashMap<>();Map readElectricalEnergyMeasurementGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ElectricalEnergyMeasurementCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedElectricalEnergyMeasurementClusterGeneratedCommandListAttributeCallback(), + readElectricalEnergyMeasurementGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readElectricalEnergyMeasurementGeneratedCommandListAttributeInteractionInfo); + Map readElectricalEnergyMeasurementAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ElectricalEnergyMeasurementCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedElectricalEnergyMeasurementClusterAcceptedCommandListAttributeCallback(), + readElectricalEnergyMeasurementAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readElectricalEnergyMeasurementAcceptedCommandListAttributeInteractionInfo); + Map readElectricalEnergyMeasurementEventListCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readEventListAttribute( + (ChipClusters.ElectricalEnergyMeasurementCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedElectricalEnergyMeasurementClusterEventListAttributeCallback(), + readElectricalEnergyMeasurementEventListCommandParams + ); + result.put("readEventListAttribute", readElectricalEnergyMeasurementEventListAttributeInteractionInfo); + Map readElectricalEnergyMeasurementAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readAttributeListAttribute( + (ChipClusters.ElectricalEnergyMeasurementCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedElectricalEnergyMeasurementClusterAttributeListAttributeCallback(), + readElectricalEnergyMeasurementAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readElectricalEnergyMeasurementAttributeListAttributeInteractionInfo); + Map readElectricalEnergyMeasurementFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readElectricalEnergyMeasurementFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readElectricalEnergyMeasurementFeatureMapAttributeInteractionInfo); + Map readElectricalEnergyMeasurementClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readElectricalEnergyMeasurementClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalEnergyMeasurementCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readElectricalEnergyMeasurementClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readElectricalEnergyMeasurementClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readDemandResponseLoadControlInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDemandResponseLoadControlLoadControlProgramsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readLoadControlProgramsAttribute( + (ChipClusters.DemandResponseLoadControlCluster.LoadControlProgramsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterLoadControlProgramsAttributeCallback(), + readDemandResponseLoadControlLoadControlProgramsCommandParams + ); + result.put("readLoadControlProgramsAttribute", readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo); + Map readDemandResponseLoadControlNumberOfLoadControlProgramsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlNumberOfLoadControlProgramsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfLoadControlProgramsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlNumberOfLoadControlProgramsCommandParams + ); + result.put("readNumberOfLoadControlProgramsAttribute", readDemandResponseLoadControlNumberOfLoadControlProgramsAttributeInteractionInfo); + Map readDemandResponseLoadControlEventsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlEventsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readEventsAttribute( + (ChipClusters.DemandResponseLoadControlCluster.EventsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterEventsAttributeCallback(), + readDemandResponseLoadControlEventsCommandParams + ); + result.put("readEventsAttribute", readDemandResponseLoadControlEventsAttributeInteractionInfo); + Map readDemandResponseLoadControlActiveEventsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlActiveEventsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readActiveEventsAttribute( + (ChipClusters.DemandResponseLoadControlCluster.ActiveEventsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterActiveEventsAttributeCallback(), + readDemandResponseLoadControlActiveEventsCommandParams + ); + result.put("readActiveEventsAttribute", readDemandResponseLoadControlActiveEventsAttributeInteractionInfo); + Map readDemandResponseLoadControlNumberOfEventsPerProgramCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlNumberOfEventsPerProgramAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfEventsPerProgramAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlNumberOfEventsPerProgramCommandParams + ); + result.put("readNumberOfEventsPerProgramAttribute", readDemandResponseLoadControlNumberOfEventsPerProgramAttributeInteractionInfo); + Map readDemandResponseLoadControlNumberOfTransitionsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlNumberOfTransitionsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfTransitionsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlNumberOfTransitionsCommandParams + ); + result.put("readNumberOfTransitionsAttribute", readDemandResponseLoadControlNumberOfTransitionsAttributeInteractionInfo); + Map readDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDefaultRandomStartAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlDefaultRandomStartCommandParams + ); + result.put("readDefaultRandomStartAttribute", readDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo); + Map readDemandResponseLoadControlDefaultRandomDurationCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDefaultRandomDurationAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlDefaultRandomDurationCommandParams + ); + result.put("readDefaultRandomDurationAttribute", readDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo); + Map readDemandResponseLoadControlGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.DemandResponseLoadControlCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterGeneratedCommandListAttributeCallback(), + readDemandResponseLoadControlGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readDemandResponseLoadControlGeneratedCommandListAttributeInteractionInfo); + Map readDemandResponseLoadControlAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.DemandResponseLoadControlCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterAcceptedCommandListAttributeCallback(), + readDemandResponseLoadControlAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readDemandResponseLoadControlAcceptedCommandListAttributeInteractionInfo); + Map readDemandResponseLoadControlEventListCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readEventListAttribute( + (ChipClusters.DemandResponseLoadControlCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterEventListAttributeCallback(), + readDemandResponseLoadControlEventListCommandParams + ); + result.put("readEventListAttribute", readDemandResponseLoadControlEventListAttributeInteractionInfo); + Map readDemandResponseLoadControlAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readAttributeListAttribute( + (ChipClusters.DemandResponseLoadControlCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDemandResponseLoadControlClusterAttributeListAttributeCallback(), + readDemandResponseLoadControlAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readDemandResponseLoadControlAttributeListAttributeInteractionInfo); + Map readDemandResponseLoadControlFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDemandResponseLoadControlFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readDemandResponseLoadControlFeatureMapAttributeInteractionInfo); + Map readDemandResponseLoadControlClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDemandResponseLoadControlClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readDemandResponseLoadControlClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readDeviceEnergyManagementInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDeviceEnergyManagementESATypeCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementESATypeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readESATypeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDeviceEnergyManagementESATypeCommandParams + ); + result.put("readESATypeAttribute", readDeviceEnergyManagementESATypeAttributeInteractionInfo); + Map readDeviceEnergyManagementESACanGenerateCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementESACanGenerateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readESACanGenerateAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readDeviceEnergyManagementESACanGenerateCommandParams + ); + result.put("readESACanGenerateAttribute", readDeviceEnergyManagementESACanGenerateAttributeInteractionInfo); + Map readDeviceEnergyManagementESAStateCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementESAStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readESAStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDeviceEnergyManagementESAStateCommandParams + ); + result.put("readESAStateAttribute", readDeviceEnergyManagementESAStateAttributeInteractionInfo); + Map readDeviceEnergyManagementAbsMinPowerCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementAbsMinPowerAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readAbsMinPowerAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDeviceEnergyManagementAbsMinPowerCommandParams + ); + result.put("readAbsMinPowerAttribute", readDeviceEnergyManagementAbsMinPowerAttributeInteractionInfo); + Map readDeviceEnergyManagementAbsMaxPowerCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementAbsMaxPowerAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readAbsMaxPowerAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDeviceEnergyManagementAbsMaxPowerCommandParams + ); + result.put("readAbsMaxPowerAttribute", readDeviceEnergyManagementAbsMaxPowerAttributeInteractionInfo); + Map readDeviceEnergyManagementPowerAdjustmentCapabilityCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementPowerAdjustmentCapabilityAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readPowerAdjustmentCapabilityAttribute( + (ChipClusters.DeviceEnergyManagementCluster.PowerAdjustmentCapabilityAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterPowerAdjustmentCapabilityAttributeCallback(), + readDeviceEnergyManagementPowerAdjustmentCapabilityCommandParams + ); + result.put("readPowerAdjustmentCapabilityAttribute", readDeviceEnergyManagementPowerAdjustmentCapabilityAttributeInteractionInfo); + Map readDeviceEnergyManagementGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.DeviceEnergyManagementCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterGeneratedCommandListAttributeCallback(), + readDeviceEnergyManagementGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readDeviceEnergyManagementGeneratedCommandListAttributeInteractionInfo); + Map readDeviceEnergyManagementAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.DeviceEnergyManagementCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterAcceptedCommandListAttributeCallback(), + readDeviceEnergyManagementAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readDeviceEnergyManagementAcceptedCommandListAttributeInteractionInfo); + Map readDeviceEnergyManagementEventListCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readEventListAttribute( + (ChipClusters.DeviceEnergyManagementCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterEventListAttributeCallback(), + readDeviceEnergyManagementEventListCommandParams + ); + result.put("readEventListAttribute", readDeviceEnergyManagementEventListAttributeInteractionInfo); + Map readDeviceEnergyManagementAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readAttributeListAttribute( + (ChipClusters.DeviceEnergyManagementCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterAttributeListAttributeCallback(), + readDeviceEnergyManagementAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readDeviceEnergyManagementAttributeListAttributeInteractionInfo); + Map readDeviceEnergyManagementFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDeviceEnergyManagementFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readDeviceEnergyManagementFeatureMapAttributeInteractionInfo); + Map readDeviceEnergyManagementClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readDeviceEnergyManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DeviceEnergyManagementCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDeviceEnergyManagementClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readDeviceEnergyManagementClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readEnergyEvseInteractionInfo() { + Map result = new LinkedHashMap<>();Map readEnergyEvseStateCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readStateAttribute( + (ChipClusters.EnergyEvseCluster.StateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterStateAttributeCallback(), + readEnergyEvseStateCommandParams + ); + result.put("readStateAttribute", readEnergyEvseStateAttributeInteractionInfo); + Map readEnergyEvseSupplyStateCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseSupplyStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readSupplyStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readEnergyEvseSupplyStateCommandParams + ); + result.put("readSupplyStateAttribute", readEnergyEvseSupplyStateAttributeInteractionInfo); + Map readEnergyEvseFaultStateCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseFaultStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readFaultStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readEnergyEvseFaultStateCommandParams + ); + result.put("readFaultStateAttribute", readEnergyEvseFaultStateAttributeInteractionInfo); + Map readEnergyEvseChargingEnabledUntilCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseChargingEnabledUntilAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readChargingEnabledUntilAttribute( + (ChipClusters.EnergyEvseCluster.ChargingEnabledUntilAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterChargingEnabledUntilAttributeCallback(), + readEnergyEvseChargingEnabledUntilCommandParams + ); + result.put("readChargingEnabledUntilAttribute", readEnergyEvseChargingEnabledUntilAttributeInteractionInfo); + Map readEnergyEvseDischargingEnabledUntilCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseDischargingEnabledUntilAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readDischargingEnabledUntilAttribute( + (ChipClusters.EnergyEvseCluster.DischargingEnabledUntilAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterDischargingEnabledUntilAttributeCallback(), + readEnergyEvseDischargingEnabledUntilCommandParams + ); + result.put("readDischargingEnabledUntilAttribute", readEnergyEvseDischargingEnabledUntilAttributeInteractionInfo); + Map readEnergyEvseCircuitCapacityCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseCircuitCapacityAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readCircuitCapacityAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseCircuitCapacityCommandParams + ); + result.put("readCircuitCapacityAttribute", readEnergyEvseCircuitCapacityAttributeInteractionInfo); + Map readEnergyEvseMinimumChargeCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseMinimumChargeCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readMinimumChargeCurrentAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseMinimumChargeCurrentCommandParams + ); + result.put("readMinimumChargeCurrentAttribute", readEnergyEvseMinimumChargeCurrentAttributeInteractionInfo); + Map readEnergyEvseMaximumChargeCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseMaximumChargeCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readMaximumChargeCurrentAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseMaximumChargeCurrentCommandParams + ); + result.put("readMaximumChargeCurrentAttribute", readEnergyEvseMaximumChargeCurrentAttributeInteractionInfo); + Map readEnergyEvseMaximumDischargeCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseMaximumDischargeCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readMaximumDischargeCurrentAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseMaximumDischargeCurrentCommandParams + ); + result.put("readMaximumDischargeCurrentAttribute", readEnergyEvseMaximumDischargeCurrentAttributeInteractionInfo); + Map readEnergyEvseUserMaximumChargeCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseUserMaximumChargeCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readUserMaximumChargeCurrentAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseUserMaximumChargeCurrentCommandParams + ); + result.put("readUserMaximumChargeCurrentAttribute", readEnergyEvseUserMaximumChargeCurrentAttributeInteractionInfo); + Map readEnergyEvseRandomizationDelayWindowCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseRandomizationDelayWindowAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readRandomizationDelayWindowAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseRandomizationDelayWindowCommandParams + ); + result.put("readRandomizationDelayWindowAttribute", readEnergyEvseRandomizationDelayWindowAttributeInteractionInfo); + Map readEnergyEvseNumberOfWeeklyTargetsCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfWeeklyTargetsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readEnergyEvseNumberOfWeeklyTargetsCommandParams + ); + result.put("readNumberOfWeeklyTargetsAttribute", readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo); + Map readEnergyEvseNumberOfDailyTargetsCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfDailyTargetsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readEnergyEvseNumberOfDailyTargetsCommandParams + ); + result.put("readNumberOfDailyTargetsAttribute", readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo); + Map readEnergyEvseNextChargeStartTimeCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNextChargeStartTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNextChargeStartTimeAttribute( + (ChipClusters.EnergyEvseCluster.NextChargeStartTimeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterNextChargeStartTimeAttributeCallback(), + readEnergyEvseNextChargeStartTimeCommandParams + ); + result.put("readNextChargeStartTimeAttribute", readEnergyEvseNextChargeStartTimeAttributeInteractionInfo); + Map readEnergyEvseNextChargeTargetTimeCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNextChargeTargetTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNextChargeTargetTimeAttribute( + (ChipClusters.EnergyEvseCluster.NextChargeTargetTimeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterNextChargeTargetTimeAttributeCallback(), + readEnergyEvseNextChargeTargetTimeCommandParams + ); + result.put("readNextChargeTargetTimeAttribute", readEnergyEvseNextChargeTargetTimeAttributeInteractionInfo); + Map readEnergyEvseNextChargeRequiredEnergyCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNextChargeRequiredEnergyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNextChargeRequiredEnergyAttribute( + (ChipClusters.EnergyEvseCluster.NextChargeRequiredEnergyAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterNextChargeRequiredEnergyAttributeCallback(), + readEnergyEvseNextChargeRequiredEnergyCommandParams + ); + result.put("readNextChargeRequiredEnergyAttribute", readEnergyEvseNextChargeRequiredEnergyAttributeInteractionInfo); + Map readEnergyEvseNextChargeTargetSoCCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseNextChargeTargetSoCAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readNextChargeTargetSoCAttribute( + (ChipClusters.EnergyEvseCluster.NextChargeTargetSoCAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterNextChargeTargetSoCAttributeCallback(), + readEnergyEvseNextChargeTargetSoCCommandParams + ); + result.put("readNextChargeTargetSoCAttribute", readEnergyEvseNextChargeTargetSoCAttributeInteractionInfo); + Map readEnergyEvseApproximateEVEfficiencyCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseApproximateEVEfficiencyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readApproximateEVEfficiencyAttribute( + (ChipClusters.EnergyEvseCluster.ApproximateEVEfficiencyAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterApproximateEVEfficiencyAttributeCallback(), + readEnergyEvseApproximateEVEfficiencyCommandParams + ); + result.put("readApproximateEVEfficiencyAttribute", readEnergyEvseApproximateEVEfficiencyAttributeInteractionInfo); + Map readEnergyEvseStateOfChargeCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseStateOfChargeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readStateOfChargeAttribute( + (ChipClusters.EnergyEvseCluster.StateOfChargeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterStateOfChargeAttributeCallback(), + readEnergyEvseStateOfChargeCommandParams + ); + result.put("readStateOfChargeAttribute", readEnergyEvseStateOfChargeAttributeInteractionInfo); + Map readEnergyEvseBatteryCapacityCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseBatteryCapacityAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readBatteryCapacityAttribute( + (ChipClusters.EnergyEvseCluster.BatteryCapacityAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterBatteryCapacityAttributeCallback(), + readEnergyEvseBatteryCapacityCommandParams + ); + result.put("readBatteryCapacityAttribute", readEnergyEvseBatteryCapacityAttributeInteractionInfo); + Map readEnergyEvseVehicleIDCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseVehicleIDAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readVehicleIDAttribute( + (ChipClusters.EnergyEvseCluster.VehicleIDAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterVehicleIDAttributeCallback(), + readEnergyEvseVehicleIDCommandParams + ); + result.put("readVehicleIDAttribute", readEnergyEvseVehicleIDAttributeInteractionInfo); + Map readEnergyEvseSessionIDCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseSessionIDAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readSessionIDAttribute( + (ChipClusters.EnergyEvseCluster.SessionIDAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterSessionIDAttributeCallback(), + readEnergyEvseSessionIDCommandParams + ); + result.put("readSessionIDAttribute", readEnergyEvseSessionIDAttributeInteractionInfo); + Map readEnergyEvseSessionDurationCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseSessionDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readSessionDurationAttribute( + (ChipClusters.EnergyEvseCluster.SessionDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterSessionDurationAttributeCallback(), + readEnergyEvseSessionDurationCommandParams + ); + result.put("readSessionDurationAttribute", readEnergyEvseSessionDurationAttributeInteractionInfo); + Map readEnergyEvseSessionEnergyChargedCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseSessionEnergyChargedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readSessionEnergyChargedAttribute( + (ChipClusters.EnergyEvseCluster.SessionEnergyChargedAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterSessionEnergyChargedAttributeCallback(), + readEnergyEvseSessionEnergyChargedCommandParams + ); + result.put("readSessionEnergyChargedAttribute", readEnergyEvseSessionEnergyChargedAttributeInteractionInfo); + Map readEnergyEvseSessionEnergyDischargedCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseSessionEnergyDischargedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readSessionEnergyDischargedAttribute( + (ChipClusters.EnergyEvseCluster.SessionEnergyDischargedAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterSessionEnergyDischargedAttributeCallback(), + readEnergyEvseSessionEnergyDischargedCommandParams + ); + result.put("readSessionEnergyDischargedAttribute", readEnergyEvseSessionEnergyDischargedAttributeInteractionInfo); + Map readEnergyEvseGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.EnergyEvseCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterGeneratedCommandListAttributeCallback(), + readEnergyEvseGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readEnergyEvseGeneratedCommandListAttributeInteractionInfo); + Map readEnergyEvseAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.EnergyEvseCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterAcceptedCommandListAttributeCallback(), + readEnergyEvseAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readEnergyEvseAcceptedCommandListAttributeInteractionInfo); + Map readEnergyEvseEventListCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readEventListAttribute( + (ChipClusters.EnergyEvseCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterEventListAttributeCallback(), + readEnergyEvseEventListCommandParams + ); + result.put("readEventListAttribute", readEnergyEvseEventListAttributeInteractionInfo); + Map readEnergyEvseAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readAttributeListAttribute( + (ChipClusters.EnergyEvseCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedEnergyEvseClusterAttributeListAttributeCallback(), + readEnergyEvseAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readEnergyEvseAttributeListAttributeInteractionInfo); + Map readEnergyEvseFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readEnergyEvseFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readEnergyEvseFeatureMapAttributeInteractionInfo); + Map readEnergyEvseClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readEnergyEvseClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readEnergyEvseClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readEnergyEvseClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readDoorLockInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDoorLockLockStateCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockLockStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readLockStateAttribute( + (ChipClusters.DoorLockCluster.LockStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterLockStateAttributeCallback(), + readDoorLockLockStateCommandParams + ); + result.put("readLockStateAttribute", readDoorLockLockStateAttributeInteractionInfo); + Map readDoorLockLockTypeCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockLockTypeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readLockTypeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockLockTypeCommandParams + ); + result.put("readLockTypeAttribute", readDoorLockLockTypeAttributeInteractionInfo); + Map readDoorLockActuatorEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockActuatorEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readActuatorEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readDoorLockActuatorEnabledCommandParams + ); + result.put("readActuatorEnabledAttribute", readDoorLockActuatorEnabledAttributeInteractionInfo); + Map readDoorLockDoorStateCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockDoorStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readDoorStateAttribute( + (ChipClusters.DoorLockCluster.DoorStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterDoorStateAttributeCallback(), + readDoorLockDoorStateCommandParams + ); + result.put("readDoorStateAttribute", readDoorLockDoorStateAttributeInteractionInfo); + Map readDoorLockDoorOpenEventsCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockDoorOpenEventsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readDoorOpenEventsAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDoorLockDoorOpenEventsCommandParams + ); + result.put("readDoorOpenEventsAttribute", readDoorLockDoorOpenEventsAttributeInteractionInfo); + Map readDoorLockDoorClosedEventsCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockDoorClosedEventsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readDoorClosedEventsAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDoorLockDoorClosedEventsCommandParams + ); + result.put("readDoorClosedEventsAttribute", readDoorLockDoorClosedEventsAttributeInteractionInfo); + Map readDoorLockOpenPeriodCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockOpenPeriodAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readOpenPeriodAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockOpenPeriodCommandParams + ); + result.put("readOpenPeriodAttribute", readDoorLockOpenPeriodAttributeInteractionInfo); + Map readDoorLockNumberOfTotalUsersSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfTotalUsersSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfTotalUsersSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfTotalUsersSupportedCommandParams + ); + result.put("readNumberOfTotalUsersSupportedAttribute", readDoorLockNumberOfTotalUsersSupportedAttributeInteractionInfo); + Map readDoorLockNumberOfPINUsersSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfPINUsersSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfPINUsersSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfPINUsersSupportedCommandParams + ); + result.put("readNumberOfPINUsersSupportedAttribute", readDoorLockNumberOfPINUsersSupportedAttributeInteractionInfo); + Map readDoorLockNumberOfRFIDUsersSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfRFIDUsersSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfRFIDUsersSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfRFIDUsersSupportedCommandParams + ); + result.put("readNumberOfRFIDUsersSupportedAttribute", readDoorLockNumberOfRFIDUsersSupportedAttributeInteractionInfo); + Map readDoorLockNumberOfWeekDaySchedulesSupportedPerUserCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfWeekDaySchedulesSupportedPerUserAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfWeekDaySchedulesSupportedPerUserAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfWeekDaySchedulesSupportedPerUserCommandParams + ); + result.put("readNumberOfWeekDaySchedulesSupportedPerUserAttribute", readDoorLockNumberOfWeekDaySchedulesSupportedPerUserAttributeInteractionInfo); + Map readDoorLockNumberOfYearDaySchedulesSupportedPerUserCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfYearDaySchedulesSupportedPerUserAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfYearDaySchedulesSupportedPerUserAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfYearDaySchedulesSupportedPerUserCommandParams + ); + result.put("readNumberOfYearDaySchedulesSupportedPerUserAttribute", readDoorLockNumberOfYearDaySchedulesSupportedPerUserAttributeInteractionInfo); + Map readDoorLockNumberOfHolidaySchedulesSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfHolidaySchedulesSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfHolidaySchedulesSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfHolidaySchedulesSupportedCommandParams + ); + result.put("readNumberOfHolidaySchedulesSupportedAttribute", readDoorLockNumberOfHolidaySchedulesSupportedAttributeInteractionInfo); + Map readDoorLockMaxPINCodeLengthCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockMaxPINCodeLengthAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readMaxPINCodeLengthAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockMaxPINCodeLengthCommandParams + ); + result.put("readMaxPINCodeLengthAttribute", readDoorLockMaxPINCodeLengthAttributeInteractionInfo); + Map readDoorLockMinPINCodeLengthCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockMinPINCodeLengthAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DoorLockCluster) cluster).readMinPINCodeLengthAttribute( (ChipClusters.IntegerAttributeCallback) callback @@ -14447,6 +15825,28 @@ private static Map readMediaPlaybackInteractionInfo() { readMediaPlaybackSeekRangeStartCommandParams ); result.put("readSeekRangeStartAttribute", readMediaPlaybackSeekRangeStartAttributeInteractionInfo); + Map readMediaPlaybackAvailableAudioTracksCommandParams = new LinkedHashMap(); + InteractionInfo readMediaPlaybackAvailableAudioTracksAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster).readAvailableAudioTracksAttribute( + (ChipClusters.MediaPlaybackCluster.AvailableAudioTracksAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedMediaPlaybackClusterAvailableAudioTracksAttributeCallback(), + readMediaPlaybackAvailableAudioTracksCommandParams + ); + result.put("readAvailableAudioTracksAttribute", readMediaPlaybackAvailableAudioTracksAttributeInteractionInfo); + Map readMediaPlaybackAvailableTextTracksCommandParams = new LinkedHashMap(); + InteractionInfo readMediaPlaybackAvailableTextTracksAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster).readAvailableTextTracksAttribute( + (ChipClusters.MediaPlaybackCluster.AvailableTextTracksAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedMediaPlaybackClusterAvailableTextTracksAttributeCallback(), + readMediaPlaybackAvailableTextTracksCommandParams + ); + result.put("readAvailableTextTracksAttribute", readMediaPlaybackAvailableTextTracksAttributeInteractionInfo); Map readMediaPlaybackGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readMediaPlaybackGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -15230,6 +16630,234 @@ private static Map readAccountLoginInteractionInfo() { return result; } + private static Map readContentControlInteractionInfo() { + Map result = new LinkedHashMap<>();Map readContentControlEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readContentControlEnabledCommandParams + ); + result.put("readEnabledAttribute", readContentControlEnabledAttributeInteractionInfo); + Map readContentControlOnDemandRatingsCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlOnDemandRatingsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readOnDemandRatingsAttribute( + (ChipClusters.ContentControlCluster.OnDemandRatingsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterOnDemandRatingsAttributeCallback(), + readContentControlOnDemandRatingsCommandParams + ); + result.put("readOnDemandRatingsAttribute", readContentControlOnDemandRatingsAttributeInteractionInfo); + Map readContentControlOnDemandRatingThresholdCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlOnDemandRatingThresholdAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readOnDemandRatingThresholdAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readContentControlOnDemandRatingThresholdCommandParams + ); + result.put("readOnDemandRatingThresholdAttribute", readContentControlOnDemandRatingThresholdAttributeInteractionInfo); + Map readContentControlScheduledContentRatingsCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlScheduledContentRatingsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readScheduledContentRatingsAttribute( + (ChipClusters.ContentControlCluster.ScheduledContentRatingsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterScheduledContentRatingsAttributeCallback(), + readContentControlScheduledContentRatingsCommandParams + ); + result.put("readScheduledContentRatingsAttribute", readContentControlScheduledContentRatingsAttributeInteractionInfo); + Map readContentControlScheduledContentRatingThresholdCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlScheduledContentRatingThresholdAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readScheduledContentRatingThresholdAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readContentControlScheduledContentRatingThresholdCommandParams + ); + result.put("readScheduledContentRatingThresholdAttribute", readContentControlScheduledContentRatingThresholdAttributeInteractionInfo); + Map readContentControlScreenDailyTimeCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlScreenDailyTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readScreenDailyTimeAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readContentControlScreenDailyTimeCommandParams + ); + result.put("readScreenDailyTimeAttribute", readContentControlScreenDailyTimeAttributeInteractionInfo); + Map readContentControlRemainingScreenTimeCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlRemainingScreenTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readRemainingScreenTimeAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readContentControlRemainingScreenTimeCommandParams + ); + result.put("readRemainingScreenTimeAttribute", readContentControlRemainingScreenTimeAttributeInteractionInfo); + Map readContentControlBlockUnratedCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlBlockUnratedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readBlockUnratedAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readContentControlBlockUnratedCommandParams + ); + result.put("readBlockUnratedAttribute", readContentControlBlockUnratedAttributeInteractionInfo); + Map readContentControlGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ContentControlCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterGeneratedCommandListAttributeCallback(), + readContentControlGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readContentControlGeneratedCommandListAttributeInteractionInfo); + Map readContentControlAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ContentControlCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterAcceptedCommandListAttributeCallback(), + readContentControlAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readContentControlAcceptedCommandListAttributeInteractionInfo); + Map readContentControlEventListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readEventListAttribute( + (ChipClusters.ContentControlCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterEventListAttributeCallback(), + readContentControlEventListCommandParams + ); + result.put("readEventListAttribute", readContentControlEventListAttributeInteractionInfo); + Map readContentControlAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readAttributeListAttribute( + (ChipClusters.ContentControlCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterAttributeListAttributeCallback(), + readContentControlAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readContentControlAttributeListAttributeInteractionInfo); + Map readContentControlFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readContentControlFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readContentControlFeatureMapAttributeInteractionInfo); + Map readContentControlClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readContentControlClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readContentControlClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readContentAppObserverInteractionInfo() { + Map result = new LinkedHashMap<>();Map readContentAppObserverGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ContentAppObserverCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentAppObserverClusterGeneratedCommandListAttributeCallback(), + readContentAppObserverGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readContentAppObserverGeneratedCommandListAttributeInteractionInfo); + Map readContentAppObserverAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ContentAppObserverCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentAppObserverClusterAcceptedCommandListAttributeCallback(), + readContentAppObserverAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readContentAppObserverAcceptedCommandListAttributeInteractionInfo); + Map readContentAppObserverEventListCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readEventListAttribute( + (ChipClusters.ContentAppObserverCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentAppObserverClusterEventListAttributeCallback(), + readContentAppObserverEventListCommandParams + ); + result.put("readEventListAttribute", readContentAppObserverEventListAttributeInteractionInfo); + Map readContentAppObserverAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readAttributeListAttribute( + (ChipClusters.ContentAppObserverCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentAppObserverClusterAttributeListAttributeCallback(), + readContentAppObserverAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readContentAppObserverAttributeListAttributeInteractionInfo); + Map readContentAppObserverFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readContentAppObserverFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readContentAppObserverFeatureMapAttributeInteractionInfo); + Map readContentAppObserverClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readContentAppObserverClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentAppObserverCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readContentAppObserverClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readContentAppObserverClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readElectricalMeasurementInteractionInfo() { Map result = new LinkedHashMap<>();Map readElectricalMeasurementMeasurementTypeCommandParams = new LinkedHashMap(); InteractionInfo readElectricalMeasurementMeasurementTypeAttributeInteractionInfo = new InteractionInfo( @@ -17854,7 +19482,10 @@ public Map> getReadAttributeMap() { put("proxyValid", readProxyValidInteractionInfo()); put("booleanState", readBooleanStateInteractionInfo()); put("icdManagement", readIcdManagementInteractionInfo()); - put("ovenOperationalState", readOvenOperationalStateInteractionInfo()); + put("timer", readTimerInteractionInfo()); + put("ovenCavityOperationalState", readOvenCavityOperationalStateInteractionInfo()); + put("ovenMode", readOvenModeInteractionInfo()); + put("laundryDryerControls", readLaundryDryerControlsInteractionInfo()); put("modeSelect", readModeSelectInteractionInfo()); put("laundryWasherMode", readLaundryWasherModeInteractionInfo()); put("refrigeratorAndTemperatureControlledCabinetMode", readRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo()); @@ -17873,6 +19504,12 @@ public Map> getReadAttributeMap() { put("rvcOperationalState", readRvcOperationalStateInteractionInfo()); put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo()); put("activatedCarbonFilterMonitoring", readActivatedCarbonFilterMonitoringInteractionInfo()); + put("booleanStateConfiguration", readBooleanStateConfigurationInteractionInfo()); + put("valveConfigurationAndControl", readValveConfigurationAndControlInteractionInfo()); + put("electricalEnergyMeasurement", readElectricalEnergyMeasurementInteractionInfo()); + put("demandResponseLoadControl", readDemandResponseLoadControlInteractionInfo()); + put("deviceEnergyManagement", readDeviceEnergyManagementInteractionInfo()); + put("energyEvse", readEnergyEvseInteractionInfo()); put("doorLock", readDoorLockInteractionInfo()); put("windowCovering", readWindowCoveringInteractionInfo()); put("barrierControl", readBarrierControlInteractionInfo()); @@ -17910,6 +19547,8 @@ public Map> getReadAttributeMap() { put("applicationLauncher", readApplicationLauncherInteractionInfo()); put("applicationBasic", readApplicationBasicInteractionInfo()); put("accountLogin", readAccountLoginInteractionInfo()); + put("contentControl", readContentControlInteractionInfo()); + put("contentAppObserver", readContentAppObserverInteractionInfo()); put("electricalMeasurement", readElectricalMeasurementInteractionInfo()); put("unitTesting", readUnitTestingInteractionInfo()); put("faultInjection", readFaultInjectionInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 86c79821a42bfd..6eb5f233a5d3db 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -724,8 +724,80 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("booleanState", writeBooleanStateInteractionInfo); Map writeIcdManagementInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("icdManagement", writeIcdManagementInteractionInfo); - Map writeOvenOperationalStateInteractionInfo = new LinkedHashMap<>(); - writeAttributeMap.put("ovenOperationalState", writeOvenOperationalStateInteractionInfo); + Map writeTimerInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("timer", writeTimerInteractionInfo); + Map writeOvenCavityOperationalStateInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("ovenCavityOperationalState", writeOvenCavityOperationalStateInteractionInfo); + Map writeOvenModeInteractionInfo = new LinkedHashMap<>(); + Map writeOvenModeStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo ovenModestartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeOvenModeStartUpModeCommandParams.put( + "value", + ovenModestartUpModeCommandParameterInfo + ); + InteractionInfo writeOvenModeStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeOvenModeStartUpModeCommandParams + ); + writeOvenModeInteractionInfo.put("writeStartUpModeAttribute", writeOvenModeStartUpModeAttributeInteractionInfo); + Map writeOvenModeOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo ovenModeonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeOvenModeOnModeCommandParams.put( + "value", + ovenModeonModeCommandParameterInfo + ); + InteractionInfo writeOvenModeOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeOvenModeOnModeCommandParams + ); + writeOvenModeInteractionInfo.put("writeOnModeAttribute", writeOvenModeOnModeAttributeInteractionInfo); + writeAttributeMap.put("ovenMode", writeOvenModeInteractionInfo); + Map writeLaundryDryerControlsInteractionInfo = new LinkedHashMap<>(); + Map writeLaundryDryerControlsSelectedDrynessLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryDryerControlsselectedDrynessLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeLaundryDryerControlsSelectedDrynessLevelCommandParams.put( + "value", + laundryDryerControlsselectedDrynessLevelCommandParameterInfo + ); + InteractionInfo writeLaundryDryerControlsSelectedDrynessLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LaundryDryerControlsCluster) cluster).writeSelectedDrynessLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeLaundryDryerControlsSelectedDrynessLevelCommandParams + ); + writeLaundryDryerControlsInteractionInfo.put("writeSelectedDrynessLevelAttribute", writeLaundryDryerControlsSelectedDrynessLevelAttributeInteractionInfo); + writeAttributeMap.put("laundryDryerControls", writeLaundryDryerControlsInteractionInfo); Map writeModeSelectInteractionInfo = new LinkedHashMap<>(); Map writeModeSelectStartUpModeCommandParams = new LinkedHashMap(); CommandParameterInfo modeSelectstartUpModeCommandParameterInfo = @@ -1092,6 +1164,194 @@ public Map> getWriteAttributeMap() { ); writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo); writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo); + Map writeBooleanStateConfigurationInteractionInfo = new LinkedHashMap<>(); + Map writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams.put( + "value", + booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo + ); + InteractionInfo writeBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanStateConfigurationCluster) cluster).writeCurrentSensitivityLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams + ); + writeBooleanStateConfigurationInteractionInfo.put("writeCurrentSensitivityLevelAttribute", writeBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo); + writeAttributeMap.put("booleanStateConfiguration", writeBooleanStateConfigurationInteractionInfo); + Map writeValveConfigurationAndControlInteractionInfo = new LinkedHashMap<>(); + Map writeValveConfigurationAndControlDefaultOpenDurationCommandParams = new LinkedHashMap(); + CommandParameterInfo valveConfigurationAndControldefaultOpenDurationCommandParameterInfo = + new CommandParameterInfo( + "value", + Long.class, + Long.class + ); + writeValveConfigurationAndControlDefaultOpenDurationCommandParams.put( + "value", + valveConfigurationAndControldefaultOpenDurationCommandParameterInfo + ); + InteractionInfo writeValveConfigurationAndControlDefaultOpenDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).writeDefaultOpenDurationAttribute( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeValveConfigurationAndControlDefaultOpenDurationCommandParams + ); + writeValveConfigurationAndControlInteractionInfo.put("writeDefaultOpenDurationAttribute", writeValveConfigurationAndControlDefaultOpenDurationAttributeInteractionInfo); + Map writeValveConfigurationAndControlDefaultOpenLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo valveConfigurationAndControldefaultOpenLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeValveConfigurationAndControlDefaultOpenLevelCommandParams.put( + "value", + valveConfigurationAndControldefaultOpenLevelCommandParameterInfo + ); + InteractionInfo writeValveConfigurationAndControlDefaultOpenLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).writeDefaultOpenLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeValveConfigurationAndControlDefaultOpenLevelCommandParams + ); + writeValveConfigurationAndControlInteractionInfo.put("writeDefaultOpenLevelAttribute", writeValveConfigurationAndControlDefaultOpenLevelAttributeInteractionInfo); + writeAttributeMap.put("valveConfigurationAndControl", writeValveConfigurationAndControlInteractionInfo); + Map writeElectricalEnergyMeasurementInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("electricalEnergyMeasurement", writeElectricalEnergyMeasurementInteractionInfo); + Map writeDemandResponseLoadControlInteractionInfo = new LinkedHashMap<>(); + Map writeDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap(); + CommandParameterInfo demandResponseLoadControldefaultRandomStartCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeDemandResponseLoadControlDefaultRandomStartCommandParams.put( + "value", + demandResponseLoadControldefaultRandomStartCommandParameterInfo + ); + InteractionInfo writeDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).writeDefaultRandomStartAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeDemandResponseLoadControlDefaultRandomStartCommandParams + ); + writeDemandResponseLoadControlInteractionInfo.put("writeDefaultRandomStartAttribute", writeDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo); + Map writeDemandResponseLoadControlDefaultRandomDurationCommandParams = new LinkedHashMap(); + CommandParameterInfo demandResponseLoadControldefaultRandomDurationCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeDemandResponseLoadControlDefaultRandomDurationCommandParams.put( + "value", + demandResponseLoadControldefaultRandomDurationCommandParameterInfo + ); + InteractionInfo writeDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DemandResponseLoadControlCluster) cluster).writeDefaultRandomDurationAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeDemandResponseLoadControlDefaultRandomDurationCommandParams + ); + writeDemandResponseLoadControlInteractionInfo.put("writeDefaultRandomDurationAttribute", writeDemandResponseLoadControlDefaultRandomDurationAttributeInteractionInfo); + writeAttributeMap.put("demandResponseLoadControl", writeDemandResponseLoadControlInteractionInfo); + Map writeDeviceEnergyManagementInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("deviceEnergyManagement", writeDeviceEnergyManagementInteractionInfo); + Map writeEnergyEvseInteractionInfo = new LinkedHashMap<>(); + Map writeEnergyEvseUserMaximumChargeCurrentCommandParams = new LinkedHashMap(); + CommandParameterInfo energyEvseuserMaximumChargeCurrentCommandParameterInfo = + new CommandParameterInfo( + "value", + Long.class, + Long.class + ); + writeEnergyEvseUserMaximumChargeCurrentCommandParams.put( + "value", + energyEvseuserMaximumChargeCurrentCommandParameterInfo + ); + InteractionInfo writeEnergyEvseUserMaximumChargeCurrentAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).writeUserMaximumChargeCurrentAttribute( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeEnergyEvseUserMaximumChargeCurrentCommandParams + ); + writeEnergyEvseInteractionInfo.put("writeUserMaximumChargeCurrentAttribute", writeEnergyEvseUserMaximumChargeCurrentAttributeInteractionInfo); + Map writeEnergyEvseRandomizationDelayWindowCommandParams = new LinkedHashMap(); + CommandParameterInfo energyEvserandomizationDelayWindowCommandParameterInfo = + new CommandParameterInfo( + "value", + Long.class, + Long.class + ); + writeEnergyEvseRandomizationDelayWindowCommandParams.put( + "value", + energyEvserandomizationDelayWindowCommandParameterInfo + ); + InteractionInfo writeEnergyEvseRandomizationDelayWindowAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).writeRandomizationDelayWindowAttribute( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeEnergyEvseRandomizationDelayWindowCommandParams + ); + writeEnergyEvseInteractionInfo.put("writeRandomizationDelayWindowAttribute", writeEnergyEvseRandomizationDelayWindowAttributeInteractionInfo); + Map writeEnergyEvseApproximateEVEfficiencyCommandParams = new LinkedHashMap(); + CommandParameterInfo energyEvseapproximateEVEfficiencyCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeEnergyEvseApproximateEVEfficiencyCommandParams.put( + "value", + energyEvseapproximateEVEfficiencyCommandParameterInfo + ); + InteractionInfo writeEnergyEvseApproximateEVEfficiencyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EnergyEvseCluster) cluster).writeApproximateEVEfficiencyAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeEnergyEvseApproximateEVEfficiencyCommandParams + ); + writeEnergyEvseInteractionInfo.put("writeApproximateEVEfficiencyAttribute", writeEnergyEvseApproximateEVEfficiencyAttributeInteractionInfo); + writeAttributeMap.put("energyEvse", writeEnergyEvseInteractionInfo); Map writeDoorLockInteractionInfo = new LinkedHashMap<>(); Map writeDoorLockDoorOpenEventsCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockdoorOpenEventsCommandParameterInfo = @@ -3300,6 +3560,10 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("applicationBasic", writeApplicationBasicInteractionInfo); Map writeAccountLoginInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("accountLogin", writeAccountLoginInteractionInfo); + Map writeContentControlInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("contentControl", writeContentControlInteractionInfo); + Map writeContentAppObserverInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("contentAppObserver", writeContentAppObserverInteractionInfo); Map writeElectricalMeasurementInteractionInfo = new LinkedHashMap<>(); Map writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams = new LinkedHashMap(); CommandParameterInfo electricalMeasurementaverageRmsVoltageMeasurementPeriodCommandParameterInfo = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 8b0a8805cf720d..363e418f960f6d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -16,19 +16,47 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterPageTokenStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCastStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterConstraintsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterCostStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotAdjustmentStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt", @@ -41,6 +69,8 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt", @@ -53,8 +83,10 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenOperationalStateClusterErrorStateStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenOperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", @@ -68,9 +100,10 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", @@ -92,37 +125,52 @@ structs_sources = [ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStartedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStoppedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVConnectedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVNotDetectedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterRFIDEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenOperationalStateClusterOperationalErrorEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenOperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt", @@ -136,12 +184,15 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index e066b0ffeb6e54..3732f1a9629a7e 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -492,8 +492,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::RemainingCapacity::Id: { - using TypeInfo = Attributes::RemainingCapacity::TypeInfo; + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -501,11 +501,79 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); + return nullptr; + } + jmethodID sceneInfoStructStructCtor_1 = + env->GetMethodID(sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V"); + if (sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -3555,6 +3623,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_primaryColor); return value; } + case Attributes::SpecificationVersion::Id: { + using TypeInfo = Attributes::SpecificationVersion::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::MaxPathsPerInvoke::Id: { + using TypeInfo = Attributes::MaxPathsPerInvoke::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::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12696,8 +12796,198 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::OvenOperationalState::Id: { - using namespace app::Clusters::OvenOperationalState; + case app::Clusters::Timer::Id: { + using namespace app::Clusters::Timer; + switch (aPath.mAttributeId) + { + case Attributes::SetTime::Id: { + using TypeInfo = Attributes::SetTime::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::TimeRemaining::Id: { + using TypeInfo = Attributes::TimeRemaining::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::TimerState::Id: { + using TypeInfo = Attributes::TimerState::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::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::OvenCavityOperationalState::Id: { + using namespace app::Clusters::OvenCavityOperationalState; switch (aPath.mAttributeId) { case Attributes::PhaseList::Id: { @@ -12813,18 +13103,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenOperationalStateClusterOperationalStateStruct", + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenOperationalStateClusterOperationalStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); return nullptr; } jmethodID operationalStateStructStructCtor_1 = env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); if (operationalStateStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenOperationalStateClusterOperationalStateStruct constructor"); + ChipLogError(Zcl, + "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); return nullptr; } @@ -12893,18 +13184,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenOperationalStateClusterErrorStateStruct", + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenOperationalStateClusterErrorStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); return nullptr; } jmethodID errorStateStructStructCtor_0 = env->GetMethodID( errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); if (errorStateStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenOperationalStateClusterErrorStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); return nullptr; } @@ -13050,47 +13341,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ModeSelect::Id: { - using namespace app::Clusters::ModeSelect; + case app::Clusters::OvenMode::Id: { + using namespace app::Clusters::OvenMode; switch (aPath.mAttributeId) { - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); - return value; - } - case Attributes::StandardNamespace::Id: { - using TypeInfo = Attributes::StandardNamespace::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13114,21 +13370,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -13137,46 +13403,45 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", - semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); return nullptr; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, - newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13381,12 +13646,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::LaundryWasherMode::Id: { - using namespace app::Clusters::LaundryWasherMode; + case app::Clusters::LaundryDryerControls::Id: { + using namespace app::Clusters::LaundryDryerControls; switch (aPath.mAttributeId) { - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::SupportedDrynessLevels::Id: { + using TypeInfo = Attributes::SupportedDrynessLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13401,133 +13666,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), - newElement_0_modeCtorSignature.c_str(), - jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, - newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); - return nullptr; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); - return nullptr; - } - - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); - return nullptr; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( - modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::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::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; + case Attributes::SelectedDrynessLevel::Id: { + using TypeInfo = Attributes::SelectedDrynessLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13687,10 +13836,45 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { - using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; + case app::Clusters::ModeSelect::Id: { + using namespace app::Clusters::ModeSelect; switch (aPath.mAttributeId) { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::StandardNamespace::Id: { + using TypeInfo = Attributes::StandardNamespace::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13716,31 +13900,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, - newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -13749,56 +13923,46 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, - "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", + semanticTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) + jmethodID semanticTagStructStructCtor_3 = + env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (semanticTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, + newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14003,12 +14167,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::LaundryWasherControls::Id: { - using namespace app::Clusters::LaundryWasherControls; + case app::Clusters::LaundryWasherMode::Id: { + using namespace app::Clusters::LaundryWasherMode; switch (aPath.mAttributeId) { - case Attributes::SpinSpeeds::Id: { - using TypeInfo = Attributes::SpinSpeeds::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14023,13 +14187,110 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::SpinSpeedCurrent::Id: { - using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::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::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14051,8 +14312,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::NumberOfRinses::Id: { - using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14060,35 +14321,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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::SupportedRinses::Id: { - using TypeInfo = Attributes::SupportedRinses::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = nullptr; } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) + else { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -14230,8 +14473,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RvcRunMode::Id: { - using namespace app::Clusters::RvcRunMode; + case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { + using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { @@ -14294,17 +14537,23 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + env, + "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, + "Could not find " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); return nullptr; } @@ -14315,17 +14564,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, + "Could not find " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); return nullptr; } @@ -14351,8 +14605,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14374,8 +14628,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14383,7 +14637,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + 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; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) @@ -14512,12 +14789,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RvcCleanMode::Id: { - using namespace app::Clusters::RvcCleanMode; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mAttributeId) { - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14532,93 +14809,36 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), - newElement_0_modeCtorSignature.c_str(), - jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, - newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); - return nullptr; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); - return nullptr; - } - - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); - return nullptr; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( - modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14633,8 +14853,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14642,17 +14862,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } @@ -14794,92 +15016,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::TemperatureControl::Id: { - using namespace app::Clusters::TemperatureControl; + case app::Clusters::RvcRunMode::Id: { + using namespace app::Clusters::RvcRunMode; switch (aPath.mAttributeId) { - case Attributes::TemperatureSetpoint::Id: { - using TypeInfo = Attributes::TemperatureSetpoint::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::MinTemperature::Id: { - using TypeInfo = Attributes::MinTemperature::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::MaxTemperature::Id: { - using TypeInfo = Attributes::MaxTemperature::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::Step::Id: { - using TypeInfo = Attributes::Step::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::SelectedTemperatureLevel::Id: { - using TypeInfo = Attributes::SelectedTemperatureLevel::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::SupportedTemperatureLevels::Id: { - using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14894,129 +15036,93 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + return nullptr; + } - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15031,18 +15137,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case app::Clusters::RefrigeratorAlarm::Id: { - using namespace app::Clusters::RefrigeratorAlarm; - switch (aPath.mAttributeId) - { - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15050,43 +15146,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = nullptr; } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::Supported::Id: { - using TypeInfo = Attributes::Supported::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + else { - return nullptr; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -15227,8 +15298,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::DishwasherMode::Id: { - using namespace app::Clusters::DishwasherMode; + case app::Clusters::RvcCleanMode::Id: { + using namespace app::Clusters::RvcCleanMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { @@ -15291,17 +15362,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); return nullptr; } @@ -15312,17 +15383,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); return nullptr; } @@ -15348,29 +15419,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15532,12 +15580,76 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::AirQuality::Id: { - using namespace app::Clusters::AirQuality; + case app::Clusters::TemperatureControl::Id: { + using namespace app::Clusters::TemperatureControl; switch (aPath.mAttributeId) { - case Attributes::AirQuality::Id: { - using TypeInfo = Attributes::AirQuality::TypeInfo; + case Attributes::TemperatureSetpoint::Id: { + using TypeInfo = Attributes::TemperatureSetpoint::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::MinTemperature::Id: { + using TypeInfo = Attributes::MinTemperature::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::MaxTemperature::Id: { + using TypeInfo = Attributes::MaxTemperature::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::Step::Id: { + using TypeInfo = Attributes::Step::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::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15552,6 +15664,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::SupportedTemperatureLevels::Id: { + using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15690,12 +15823,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::SmokeCoAlarm::Id: { - using namespace app::Clusters::SmokeCoAlarm; + case app::Clusters::RefrigeratorAlarm::Id: { + using namespace app::Clusters::RefrigeratorAlarm; switch (aPath.mAttributeId) { - case Attributes::ExpressedState::Id: { - using TypeInfo = Attributes::ExpressedState::TypeInfo; + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15703,15 +15836,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::SmokeState::Id: { - using TypeInfo = Attributes::SmokeState::TypeInfo; + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15719,15 +15852,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::COState::Id: { - using TypeInfo = Attributes::COState::TypeInfo; + case Attributes::Supported::Id: { + using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15735,15 +15868,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::BatteryAlert::Id: { - using TypeInfo = Attributes::BatteryAlert::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15751,31 +15884,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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::DeviceMuted::Id: { - using TypeInfo = Attributes::DeviceMuted::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - return nullptr; + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } - 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::TestInProgress::Id: { - using TypeInfo = Attributes::TestInProgress::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15783,15 +15909,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::HardwareFaultAlert::Id: { - using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15799,15 +15934,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::EndOfServiceAlert::Id: { - using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15815,15 +15959,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::InterconnectSmokeAlarm::Id: { - using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15831,15 +15984,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::InterconnectCOAlarm::Id: { - using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15854,8 +16007,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::ContaminationState::Id: { - using TypeInfo = Attributes::ContaminationState::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::DishwasherMode::Id: { + using namespace app::Clusters::DishwasherMode; + switch (aPath.mAttributeId) + { + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15863,15 +16026,100 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::SmokeSensitivityLevel::Id: { - using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15886,8 +16134,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::ExpiryDate::Id: { - using TypeInfo = Attributes::ExpiryDate::TypeInfo; + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -15895,11 +16143,41 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -16040,12 +16318,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::DishwasherAlarm::Id: { - using namespace app::Clusters::DishwasherAlarm; + case app::Clusters::AirQuality::Id: { + using namespace app::Clusters::AirQuality; switch (aPath.mAttributeId) { - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; + case Attributes::AirQuality::Id: { + using TypeInfo = Attributes::AirQuality::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16053,15 +16331,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, 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::Latch::Id: { - using TypeInfo = Attributes::Latch::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16069,72 +16347,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - return nullptr; + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); return value; } - case Attributes::Supported::Id: { - using TypeInfo = Attributes::Supported::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.Raw()); - 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; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16246,12 +16476,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::MicrowaveOvenMode::Id: { - using namespace app::Clusters::MicrowaveOvenMode; + case app::Clusters::SmokeCoAlarm::Id: { + using namespace app::Clusters::SmokeCoAlarm; switch (aPath.mAttributeId) { - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::ExpressedState::Id: { + using TypeInfo = Attributes::ExpressedState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16259,101 +16489,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), - newElement_0_modeCtorSignature.c_str(), - jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, - newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); - return nullptr; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); - return nullptr; - } - - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return nullptr; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( - modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + 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::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; + case Attributes::SmokeState::Id: { + using TypeInfo = Attributes::SmokeState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16368,8 +16512,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::COState::Id: { + using TypeInfo = Attributes::COState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16377,24 +16521,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + 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::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::BatteryAlert::Id: { + using TypeInfo = Attributes::BatteryAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16402,24 +16537,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + 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::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::DeviceMuted::Id: { + using TypeInfo = Attributes::DeviceMuted::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16427,24 +16553,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + 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::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::TestInProgress::Id: { + using TypeInfo = Attributes::TestInProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16452,24 +16569,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::HardwareFaultAlert::Id: { + using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16477,15 +16585,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::EndOfServiceAlert::Id: { + using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16500,18 +16608,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case app::Clusters::MicrowaveOvenControl::Id: { - using namespace app::Clusters::MicrowaveOvenControl; - switch (aPath.mAttributeId) - { - case Attributes::CookTime::Id: { - using TypeInfo = Attributes::CookTime::TypeInfo; + case Attributes::InterconnectSmokeAlarm::Id: { + using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16519,15 +16617,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::PowerSetting::Id: { - using TypeInfo = Attributes::PowerSetting::TypeInfo; + case Attributes::InterconnectCOAlarm::Id: { + using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16542,8 +16640,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MinPower::Id: { - using TypeInfo = Attributes::MinPower::TypeInfo; + case Attributes::ContaminationState::Id: { + using TypeInfo = Attributes::ContaminationState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16558,8 +16656,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MaxPower::Id: { - using TypeInfo = Attributes::MaxPower::TypeInfo; + case Attributes::SmokeSensitivityLevel::Id: { + using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16574,8 +16672,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::PowerStep::Id: { - using TypeInfo = Attributes::PowerStep::TypeInfo; + case Attributes::ExpiryDate::Id: { + using TypeInfo = Attributes::ExpiryDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16583,11 +16681,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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: { @@ -16728,63 +16826,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::OperationalState::Id: { - using namespace app::Clusters::OperationalState; + case app::Clusters::DishwasherAlarm::Id: { + using namespace app::Clusters::DishwasherAlarm; switch (aPath.mAttributeId) { - case Attributes::PhaseList::Id: { - using TypeInfo = Attributes::PhaseList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_1 = cppValue.Value().begin(); - while (iter_value_1.Next()) - { - auto & entry_1 = iter_value_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(value, newElement_1); - } - } - return value; - } - case Attributes::CurrentPhase::Id: { - using TypeInfo = Attributes::CurrentPhase::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::CountdownTime::Id: { - using TypeInfo = Attributes::CountdownTime::TypeInfo; + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16792,22 +16839,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::OperationalStateList::Id: { - using TypeInfo = Attributes::OperationalStateList::TypeInfo; + case Attributes::Latch::Id: { + using TypeInfo = Attributes::Latch::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16815,59 +16855,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return nullptr; - } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::OperationalState::Id: { - using TypeInfo = Attributes::OperationalState::TypeInfo; + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16875,15 +16871,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::OperationalError::Id: { - using TypeInfo = Attributes::OperationalError::TypeInfo; + case Attributes::Supported::Id: { + using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -16891,56 +16887,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_errorStateID; - std::string value_errorStateIDClassName = "java/lang/Integer"; - std::string value_errorStateIDCtorSignature = "(I)V"; - jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), - value_errorStateIDCtorSignature.c_str(), - jnivalue_errorStateID, value_errorStateID); - jobject value_errorStateLabel; - if (!cppValue.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); - } - else - { - jobject value_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), - value_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); - } - jobject value_errorStateDetails; - if (!cppValue.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); - } - else - { - jobject value_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), - value_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); - return nullptr; - } - jmethodID errorStateStructStructCtor_0 = env->GetMethodID( - errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); - if (errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } - - value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, - value_errorStateLabel, value_errorStateDetails); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -17081,86 +17032,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RvcOperationalState::Id: { - using namespace app::Clusters::RvcOperationalState; + case app::Clusters::MicrowaveOvenMode::Id: { + using namespace app::Clusters::MicrowaveOvenMode; switch (aPath.mAttributeId) { - case Attributes::PhaseList::Id: { - using TypeInfo = Attributes::PhaseList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_1 = cppValue.Value().begin(); - while (iter_value_1.Next()) - { - auto & entry_1 = iter_value_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(value, newElement_1); - } - } - return value; - } - case Attributes::CurrentPhase::Id: { - using TypeInfo = Attributes::CurrentPhase::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::CountdownTime::Id: { - using TypeInfo = Attributes::CountdownTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OperationalStateList::Id: { - using TypeInfo = Attributes::OperationalStateList::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17175,52 +17052,94 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } - jclass operationalStateStructStructClass_1; + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); return nullptr; } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::OperationalState::Id: { - using TypeInfo = Attributes::OperationalState::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17235,67 +17154,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OperationalError::Id: { - using TypeInfo = Attributes::OperationalError::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - jobject value_errorStateID; - std::string value_errorStateIDClassName = "java/lang/Integer"; - std::string value_errorStateIDCtorSignature = "(I)V"; - jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), - value_errorStateIDCtorSignature.c_str(), - jnivalue_errorStateID, value_errorStateID); - jobject value_errorStateLabel; - if (!cppValue.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); - } - else - { - jobject value_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), - value_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); - } - jobject value_errorStateDetails; - if (!cppValue.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); - } - else - { - jobject value_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), - value_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); - return nullptr; - } - jmethodID errorStateStructStructCtor_0 = env->GetMethodID( - errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); - if (errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } - - value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, - value_errorStateLabel, value_errorStateDetails); - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -17434,12 +17292,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::HepaFilterMonitoring::Id: { - using namespace app::Clusters::HepaFilterMonitoring; + case app::Clusters::MicrowaveOvenControl::Id: { + using namespace app::Clusters::MicrowaveOvenControl; switch (aPath.mAttributeId) { - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::CookTime::Id: { + using TypeInfo = Attributes::CookTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17447,15 +17305,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::PowerSetting::Id: { + using TypeInfo = Attributes::PowerSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17470,8 +17328,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::MinPower::Id: { + using TypeInfo = Attributes::MinPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17486,24 +17344,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::LastChangedTime::Id: { - using TypeInfo = Attributes::LastChangedTime::TypeInfo; + case Attributes::MaxPower::Id: { + using TypeInfo = Attributes::MaxPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17511,22 +17353,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, 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::ReplacementProductList::Id: { - using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + case Attributes::PowerStep::Id: { + using TypeInfo = Attributes::PowerStep::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17534,45 +17369,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); - return nullptr; - } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + 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::GeneratedCommandList::Id: { @@ -17713,12 +17514,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { - using namespace app::Clusters::ActivatedCarbonFilterMonitoring; + case app::Clusters::OperationalState::Id: { + using namespace app::Clusters::OperationalState; switch (aPath.mAttributeId) { - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::PhaseList::Id: { + using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17726,47 +17527,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = 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::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + else { - return nullptr; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_1 = cppValue.Value().begin(); + while (iter_value_1.Next()) + { + auto & entry_1 = iter_value_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(value, newElement_1); + } } - 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::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::CurrentPhase::Id: { + using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17774,15 +17555,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); + } return value; } - case Attributes::LastChangedTime::Id: { - using TypeInfo = Attributes::LastChangedTime::TypeInfo; + case Attributes::CountdownTime::Id: { + using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17804,8 +17592,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::ReplacementProductList::Id: { - using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + case Attributes::OperationalStateList::Id: { + using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17820,43 +17608,5245 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } - jclass replacementProductStructStructClass_1; + jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); return nullptr; } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } + case Attributes::OperationalState::Id: { + using TypeInfo = Attributes::OperationalState::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::OperationalError::Id: { + using TypeInfo = Attributes::OperationalError::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_errorStateID; + std::string value_errorStateIDClassName = "java/lang/Integer"; + std::string value_errorStateIDCtorSignature = "(I)V"; + jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), + value_errorStateIDCtorSignature.c_str(), + jnivalue_errorStateID, value_errorStateID); + jobject value_errorStateLabel; + if (!cppValue.errorStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); + } + else + { + jobject value_errorStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), + value_errorStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); + } + jobject value_errorStateDetails; + if (!cppValue.errorStateDetails.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); + } + else + { + jobject value_errorStateDetailsInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), + value_errorStateDetailsInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); + } + + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); + return nullptr; + } + jmethodID errorStateStructStructCtor_0 = env->GetMethodID( + errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } + + value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, + value_errorStateLabel, value_errorStateDetails); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcOperationalState::Id: { + using namespace app::Clusters::RvcOperationalState; + switch (aPath.mAttributeId) + { + case Attributes::PhaseList::Id: { + using TypeInfo = Attributes::PhaseList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_1 = cppValue.Value().begin(); + while (iter_value_1.Next()) + { + auto & entry_1 = iter_value_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(value, newElement_1); + } + } + return value; + } + case Attributes::CurrentPhase::Id: { + using TypeInfo = Attributes::CurrentPhase::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::CountdownTime::Id: { + using TypeInfo = Attributes::CountdownTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::OperationalStateList::Id: { + using TypeInfo = Attributes::OperationalStateList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + return nullptr; + } + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::OperationalState::Id: { + using TypeInfo = Attributes::OperationalState::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::OperationalError::Id: { + using TypeInfo = Attributes::OperationalError::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_errorStateID; + std::string value_errorStateIDClassName = "java/lang/Integer"; + std::string value_errorStateIDCtorSignature = "(I)V"; + jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), + value_errorStateIDCtorSignature.c_str(), + jnivalue_errorStateID, value_errorStateID); + jobject value_errorStateLabel; + if (!cppValue.errorStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); + } + else + { + jobject value_errorStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), + value_errorStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); + } + jobject value_errorStateDetails; + if (!cppValue.errorStateDetails.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); + } + else + { + jobject value_errorStateDetailsInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), + value_errorStateDetailsInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); + } + + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); + return nullptr; + } + jmethodID errorStateStructStructCtor_0 = env->GetMethodID( + errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } + + value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, + value_errorStateLabel, value_errorStateDetails); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::HepaFilterMonitoring::Id: { + using namespace app::Clusters::HepaFilterMonitoring; + switch (aPath.mAttributeId) + { + case Attributes::Condition::Id: { + using TypeInfo = Attributes::Condition::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::DegradationDirection::Id: { + using TypeInfo = Attributes::DegradationDirection::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::ChangeIndication::Id: { + using TypeInfo = Attributes::ChangeIndication::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::InPlaceIndicator::Id: { + using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::LastChangedTime::Id: { + using TypeInfo = Attributes::LastChangedTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::ReplacementProductList::Id: { + using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + return nullptr; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { + using namespace app::Clusters::ActivatedCarbonFilterMonitoring; + switch (aPath.mAttributeId) + { + case Attributes::Condition::Id: { + using TypeInfo = Attributes::Condition::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::DegradationDirection::Id: { + using TypeInfo = Attributes::DegradationDirection::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::ChangeIndication::Id: { + using TypeInfo = Attributes::ChangeIndication::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::InPlaceIndicator::Id: { + using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::LastChangedTime::Id: { + using TypeInfo = Attributes::LastChangedTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::ReplacementProductList::Id: { + using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return nullptr; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::BooleanStateConfiguration::Id: { + using namespace app::Clusters::BooleanStateConfiguration; + switch (aPath.mAttributeId) + { + case Attributes::CurrentSensitivityLevel::Id: { + using TypeInfo = Attributes::CurrentSensitivityLevel::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::SupportedSensitivityLevels::Id: { + using TypeInfo = Attributes::SupportedSensitivityLevels::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::DefaultSensitivityLevel::Id: { + using TypeInfo = Attributes::DefaultSensitivityLevel::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::AlarmsActive::Id: { + using TypeInfo = Attributes::AlarmsActive::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.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AlarmsSuppressed::Id: { + using TypeInfo = Attributes::AlarmsSuppressed::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.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AlarmsEnabled::Id: { + using TypeInfo = Attributes::AlarmsEnabled::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.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AlarmsSupported::Id: { + using TypeInfo = Attributes::AlarmsSupported::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.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SensorFault::Id: { + using TypeInfo = Attributes::SensorFault::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.Raw()); + 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; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::ValveConfigurationAndControl::Id: { + using namespace app::Clusters::ValveConfigurationAndControl; + switch (aPath.mAttributeId) + { + case Attributes::OpenDuration::Id: { + using TypeInfo = Attributes::OpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::DefaultOpenDuration::Id: { + using TypeInfo = Attributes::DefaultOpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::AutoCloseTime::Id: { + using TypeInfo = Attributes::AutoCloseTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::RemainingDuration::Id: { + using TypeInfo = Attributes::RemainingDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::TargetState::Id: { + using TypeInfo = Attributes::TargetState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::TargetLevel::Id: { + using TypeInfo = Attributes::TargetLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::DefaultOpenLevel::Id: { + using TypeInfo = Attributes::DefaultOpenLevel::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::ValveFault::Id: { + using TypeInfo = Attributes::ValveFault::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.Raw()); + 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; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::ElectricalEnergyMeasurement::Id: { + using namespace app::Clusters::ElectricalEnergyMeasurement; + switch (aPath.mAttributeId) + { + case Attributes::Accuracy::Id: { + using TypeInfo = Attributes::Accuracy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_measurementType; + std::string value_measurementTypeClassName = "java/lang/Integer"; + std::string value_measurementTypeCtorSignature = "(I)V"; + jint jnivalue_measurementType = static_cast(cppValue.measurementType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_measurementTypeClassName.c_str(), + value_measurementTypeCtorSignature.c_str(), + jnivalue_measurementType, value_measurementType); + jobject value_measured; + std::string value_measuredClassName = "java/lang/Boolean"; + std::string value_measuredCtorSignature = "(Z)V"; + jboolean jnivalue_measured = static_cast(cppValue.measured); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_measuredClassName.c_str(), value_measuredCtorSignature.c_str(), jnivalue_measured, value_measured); + jobject value_minMeasuredValue; + std::string value_minMeasuredValueClassName = "java/lang/Long"; + std::string value_minMeasuredValueCtorSignature = "(J)V"; + jlong jnivalue_minMeasuredValue = static_cast(cppValue.minMeasuredValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_minMeasuredValueClassName.c_str(), + value_minMeasuredValueCtorSignature.c_str(), + jnivalue_minMeasuredValue, value_minMeasuredValue); + jobject value_maxMeasuredValue; + std::string value_maxMeasuredValueClassName = "java/lang/Long"; + std::string value_maxMeasuredValueCtorSignature = "(J)V"; + jlong jnivalue_maxMeasuredValue = static_cast(cppValue.maxMeasuredValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maxMeasuredValueClassName.c_str(), + value_maxMeasuredValueCtorSignature.c_str(), + jnivalue_maxMeasuredValue, value_maxMeasuredValue); + jobject value_accuracyRanges; + chip::JniReferences::GetInstance().CreateArrayList(value_accuracyRanges); + + auto iter_value_accuracyRanges_1 = cppValue.accuracyRanges.begin(); + while (iter_value_accuracyRanges_1.Next()) + { + auto & entry_1 = iter_value_accuracyRanges_1.GetValue(); + jobject newElement_1; + jobject newElement_1_rangeMin; + std::string newElement_1_rangeMinClassName = "java/lang/Long"; + std::string newElement_1_rangeMinCtorSignature = "(J)V"; + jlong jninewElement_1_rangeMin = static_cast(entry_1.rangeMin); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMinClassName.c_str(), + newElement_1_rangeMinCtorSignature.c_str(), + jninewElement_1_rangeMin, newElement_1_rangeMin); + jobject newElement_1_rangeMax; + std::string newElement_1_rangeMaxClassName = "java/lang/Long"; + std::string newElement_1_rangeMaxCtorSignature = "(J)V"; + jlong jninewElement_1_rangeMax = static_cast(entry_1.rangeMax); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMaxClassName.c_str(), + newElement_1_rangeMaxCtorSignature.c_str(), + jninewElement_1_rangeMax, newElement_1_rangeMax); + jobject newElement_1_percentMax; + if (!entry_1.percentMax.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMax); + } + else + { + jobject newElement_1_percentMaxInsideOptional; + std::string newElement_1_percentMaxInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentMaxInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentMaxInsideOptional = static_cast(entry_1.percentMax.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentMaxInsideOptionalClassName.c_str(), + newElement_1_percentMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMaxInsideOptional, + newElement_1_percentMaxInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMaxInsideOptional, + newElement_1_percentMax); + } + jobject newElement_1_percentMin; + if (!entry_1.percentMin.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMin); + } + else + { + jobject newElement_1_percentMinInsideOptional; + std::string newElement_1_percentMinInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentMinInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentMinInsideOptional = static_cast(entry_1.percentMin.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentMinInsideOptionalClassName.c_str(), + newElement_1_percentMinInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMinInsideOptional, + newElement_1_percentMinInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMinInsideOptional, + newElement_1_percentMin); + } + jobject newElement_1_percentTypical; + if (!entry_1.percentTypical.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentTypical); + } + else + { + jobject newElement_1_percentTypicalInsideOptional; + std::string newElement_1_percentTypicalInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentTypicalInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentTypicalInsideOptional = static_cast(entry_1.percentTypical.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentTypicalInsideOptionalClassName.c_str(), + newElement_1_percentTypicalInsideOptionalCtorSignature.c_str(), + jninewElement_1_percentTypicalInsideOptional, newElement_1_percentTypicalInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentTypicalInsideOptional, + newElement_1_percentTypical); + } + jobject newElement_1_fixedMax; + if (!entry_1.fixedMax.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMax); + } + else + { + jobject newElement_1_fixedMaxInsideOptional; + std::string newElement_1_fixedMaxInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedMaxInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedMaxInsideOptional = static_cast(entry_1.fixedMax.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedMaxInsideOptionalClassName.c_str(), + newElement_1_fixedMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMaxInsideOptional, + newElement_1_fixedMaxInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMaxInsideOptional, newElement_1_fixedMax); + } + jobject newElement_1_fixedMin; + if (!entry_1.fixedMin.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMin); + } + else + { + jobject newElement_1_fixedMinInsideOptional; + std::string newElement_1_fixedMinInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedMinInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedMinInsideOptional = static_cast(entry_1.fixedMin.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedMinInsideOptionalClassName.c_str(), + newElement_1_fixedMinInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMinInsideOptional, + newElement_1_fixedMinInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMinInsideOptional, newElement_1_fixedMin); + } + jobject newElement_1_fixedTypical; + if (!entry_1.fixedTypical.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedTypical); + } + else + { + jobject newElement_1_fixedTypicalInsideOptional; + std::string newElement_1_fixedTypicalInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedTypicalInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedTypicalInsideOptional = static_cast(entry_1.fixedTypical.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedTypicalInsideOptionalClassName.c_str(), + newElement_1_fixedTypicalInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedTypicalInsideOptional, + newElement_1_fixedTypicalInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedTypicalInsideOptional, + newElement_1_fixedTypical); + } + + jclass measurementAccuracyRangeStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", + measurementAccuracyRangeStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); + return nullptr; + } + jmethodID measurementAccuracyRangeStructStructCtor_2 = + env->GetMethodID(measurementAccuracyRangeStructStructClass_2, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (measurementAccuracyRangeStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct constructor"); + return nullptr; + } + + newElement_1 = env->NewObject( + measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, newElement_1_rangeMin, + newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, newElement_1_percentTypical, + newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); + chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); + } + + jclass measurementAccuracyStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", + measurementAccuracyStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); + return nullptr; + } + jmethodID measurementAccuracyStructStructCtor_0 = + env->GetMethodID(measurementAccuracyStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V"); + if (measurementAccuracyStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); + return nullptr; + } + + value = + env->NewObject(measurementAccuracyStructStructClass_0, measurementAccuracyStructStructCtor_0, value_measurementType, + value_measured, value_minMeasuredValue, value_maxMeasuredValue, value_accuracyRanges); + return value; + } + case Attributes::CumulativeEnergyImported::Id: { + using TypeInfo = Attributes::CumulativeEnergyImported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_energy; + std::string value_energyClassName = "java/lang/Long"; + std::string value_energyCtorSignature = "(J)V"; + jlong jnivalue_energy = static_cast(cppValue.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); + jobject value_startTimestamp; + if (!cppValue.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); + } + else + { + jobject value_startTimestampInsideOptional; + std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimestampInsideOptionalClassName.c_str(), + value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, + value_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); + } + jobject value_endTimestamp; + if (!cppValue.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); + } + else + { + jobject value_endTimestampInsideOptional; + std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); + } + jobject value_startSystime; + if (!cppValue.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); + } + else + { + jobject value_startSystimeInsideOptional; + std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); + } + jobject value_endSystime; + if (!cppValue.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); + } + else + { + jobject value_endSystimeInsideOptional; + std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } + return value; + } + case Attributes::CumulativeEnergyExported::Id: { + using TypeInfo = Attributes::CumulativeEnergyExported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_energy; + std::string value_energyClassName = "java/lang/Long"; + std::string value_energyCtorSignature = "(J)V"; + jlong jnivalue_energy = static_cast(cppValue.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); + jobject value_startTimestamp; + if (!cppValue.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); + } + else + { + jobject value_startTimestampInsideOptional; + std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimestampInsideOptionalClassName.c_str(), + value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, + value_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); + } + jobject value_endTimestamp; + if (!cppValue.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); + } + else + { + jobject value_endTimestampInsideOptional; + std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); + } + jobject value_startSystime; + if (!cppValue.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); + } + else + { + jobject value_startSystimeInsideOptional; + std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); + } + jobject value_endSystime; + if (!cppValue.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); + } + else + { + jobject value_endSystimeInsideOptional; + std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } + return value; + } + case Attributes::PeriodicEnergyImported::Id: { + using TypeInfo = Attributes::PeriodicEnergyImported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_energy; + std::string value_energyClassName = "java/lang/Long"; + std::string value_energyCtorSignature = "(J)V"; + jlong jnivalue_energy = static_cast(cppValue.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); + jobject value_startTimestamp; + if (!cppValue.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); + } + else + { + jobject value_startTimestampInsideOptional; + std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimestampInsideOptionalClassName.c_str(), + value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, + value_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); + } + jobject value_endTimestamp; + if (!cppValue.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); + } + else + { + jobject value_endTimestampInsideOptional; + std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); + } + jobject value_startSystime; + if (!cppValue.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); + } + else + { + jobject value_startSystimeInsideOptional; + std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); + } + jobject value_endSystime; + if (!cppValue.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); + } + else + { + jobject value_endSystimeInsideOptional; + std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } + return value; + } + case Attributes::PeriodicEnergyExported::Id: { + using TypeInfo = Attributes::PeriodicEnergyExported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_energy; + std::string value_energyClassName = "java/lang/Long"; + std::string value_energyCtorSignature = "(J)V"; + jlong jnivalue_energy = static_cast(cppValue.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); + jobject value_startTimestamp; + if (!cppValue.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); + } + else + { + jobject value_startTimestampInsideOptional; + std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimestampInsideOptionalClassName.c_str(), + value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, + value_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); + } + jobject value_endTimestamp; + if (!cppValue.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); + } + else + { + jobject value_endTimestampInsideOptional; + std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); + } + jobject value_startSystime; + if (!cppValue.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); + } + else + { + jobject value_startSystimeInsideOptional; + std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); + } + jobject value_endSystime; + if (!cppValue.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); + } + else + { + jobject value_endSystimeInsideOptional; + std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::DemandResponseLoadControl::Id: { + using namespace app::Clusters::DemandResponseLoadControl; + switch (aPath.mAttributeId) + { + case Attributes::LoadControlPrograms::Id: { + using TypeInfo = Attributes::LoadControlPrograms::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_programID; + jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.size()), + reinterpret_cast(entry_0.programID.data())); + newElement_0_programID = newElement_0_programIDByteArray; + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_enrollmentGroup; + if (entry_0.enrollmentGroup.IsNull()) + { + newElement_0_enrollmentGroup = nullptr; + } + else + { + std::string newElement_0_enrollmentGroupClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroup = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupClassName.c_str(), newElement_0_enrollmentGroupCtorSignature.c_str(), + jninewElement_0_enrollmentGroup, newElement_0_enrollmentGroup); + } + jobject newElement_0_randomStartMinutes; + if (entry_0.randomStartMinutes.IsNull()) + { + newElement_0_randomStartMinutes = nullptr; + } + else + { + std::string newElement_0_randomStartMinutesClassName = "java/lang/Integer"; + std::string newElement_0_randomStartMinutesCtorSignature = "(I)V"; + jint jninewElement_0_randomStartMinutes = static_cast(entry_0.randomStartMinutes.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_randomStartMinutesClassName.c_str(), newElement_0_randomStartMinutesCtorSignature.c_str(), + jninewElement_0_randomStartMinutes, newElement_0_randomStartMinutes); + } + jobject newElement_0_randomDurationMinutes; + if (entry_0.randomDurationMinutes.IsNull()) + { + newElement_0_randomDurationMinutes = nullptr; + } + else + { + std::string newElement_0_randomDurationMinutesClassName = "java/lang/Integer"; + std::string newElement_0_randomDurationMinutesCtorSignature = "(I)V"; + jint jninewElement_0_randomDurationMinutes = static_cast(entry_0.randomDurationMinutes.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_randomDurationMinutesClassName.c_str(), + newElement_0_randomDurationMinutesCtorSignature.c_str(), jninewElement_0_randomDurationMinutes, + newElement_0_randomDurationMinutes); + } + + jclass loadControlProgramStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", + loadControlProgramStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); + return nullptr; + } + jmethodID loadControlProgramStructStructCtor_1 = + env->GetMethodID(loadControlProgramStructStructClass_1, "", + "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (loadControlProgramStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, + newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, + newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::NumberOfLoadControlPrograms::Id: { + using TypeInfo = Attributes::NumberOfLoadControlPrograms::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::Events::Id: { + using TypeInfo = Attributes::Events::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_eventID; + jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); + env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), + reinterpret_cast(entry_0.eventID.data())); + newElement_0_eventID = newElement_0_eventIDByteArray; + jobject newElement_0_programID; + if (entry_0.programID.IsNull()) + { + newElement_0_programID = nullptr; + } + else + { + jbyteArray newElement_0_programIDByteArray = + env->NewByteArray(static_cast(entry_0.programID.Value().size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, + static_cast(entry_0.programID.Value().size()), + reinterpret_cast(entry_0.programID.Value().data())); + newElement_0_programID = newElement_0_programIDByteArray; + } + jobject newElement_0_control; + std::string newElement_0_controlClassName = "java/lang/Integer"; + std::string newElement_0_controlCtorSignature = "(I)V"; + jint jninewElement_0_control = static_cast(entry_0.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), + newElement_0_controlCtorSignature.c_str(), + jninewElement_0_control, newElement_0_control); + jobject newElement_0_deviceClass; + std::string newElement_0_deviceClassClassName = "java/lang/Long"; + std::string newElement_0_deviceClassCtorSignature = "(J)V"; + jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), + newElement_0_deviceClassCtorSignature.c_str(), + jninewElement_0_deviceClass, newElement_0_deviceClass); + jobject newElement_0_enrollmentGroup; + if (!entry_0.enrollmentGroup.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); + } + else + { + jobject newElement_0_enrollmentGroupInsideOptional; + std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), + newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), + jninewElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroupInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroup); + } + jobject newElement_0_criticality; + std::string newElement_0_criticalityClassName = "java/lang/Integer"; + std::string newElement_0_criticalityCtorSignature = "(I)V"; + jint jninewElement_0_criticality = static_cast(entry_0.criticality); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), + newElement_0_criticalityCtorSignature.c_str(), + jninewElement_0_criticality, newElement_0_criticality); + jobject newElement_0_startTime; + if (entry_0.startTime.IsNull()) + { + newElement_0_startTime = nullptr; + } + else + { + std::string newElement_0_startTimeClassName = "java/lang/Long"; + std::string newElement_0_startTimeCtorSignature = "(J)V"; + jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), + newElement_0_startTimeCtorSignature.c_str(), + jninewElement_0_startTime, newElement_0_startTime); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_duration; + std::string newElement_2_durationClassName = "java/lang/Integer"; + std::string newElement_2_durationCtorSignature = "(I)V"; + jint jninewElement_2_duration = static_cast(entry_2.duration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), + newElement_2_durationCtorSignature.c_str(), + jninewElement_2_duration, newElement_2_duration); + jobject newElement_2_control; + std::string newElement_2_controlClassName = "java/lang/Integer"; + std::string newElement_2_controlCtorSignature = "(I)V"; + jint jninewElement_2_control = static_cast(entry_2.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), + newElement_2_controlCtorSignature.c_str(), + jninewElement_2_control, newElement_2_control); + jobject newElement_2_temperatureControl; + if (!entry_2.temperatureControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); + } + else + { + jobject newElement_2_temperatureControlInsideOptional; + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; + if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; + if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; + if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName + .c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; + if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName + .c_str(), + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } + jmethodID temperatureControlStructStructCtor_5 = + env->GetMethodID(temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return nullptr; + } + + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, + newElement_2_temperatureControl); + } + jobject newElement_2_averageLoadControl; + if (!entry_2.averageLoadControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); + } + else + { + jobject newElement_2_averageLoadControlInsideOptional; + jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; + jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = + static_cast(entry_2.averageLoadControl.Value().loadAdjustment); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), + newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), + jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } + jmethodID averageLoadControlStructStructCtor_5 = + env->GetMethodID(averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return nullptr; + } + + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, + newElement_2_averageLoadControl); + } + jobject newElement_2_dutyCycleControl; + if (!entry_2.dutyCycleControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); + } + else + { + jobject newElement_2_dutyCycleControlInsideOptional; + jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; + jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = + static_cast(entry_2.dutyCycleControl.Value().dutyCycle); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), + newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), + jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } + jmethodID dutyCycleControlStructStructCtor_5 = + env->GetMethodID(dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return nullptr; + } + + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, + newElement_2_dutyCycleControl); + } + jobject newElement_2_powerSavingsControl; + if (!entry_2.powerSavingsControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); + } + else + { + jobject newElement_2_powerSavingsControlInsideOptional; + jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; + jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = + static_cast(entry_2.powerSavingsControl.Value().powerSavings); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), + newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), + jninewElement_2_powerSavingsControlInsideOptional_powerSavings, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } + jmethodID powerSavingsControlStructStructCtor_5 = + env->GetMethodID(powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return nullptr; + } + + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, + newElement_2_powerSavingsControl); + } + jobject newElement_2_heatingSourceControl; + if (!entry_2.heatingSourceControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); + } + else + { + jobject newElement_2_heatingSourceControlInsideOptional; + jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; + jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = + static_cast(entry_2.heatingSourceControl.Value().heatingSource); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), + newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), + jninewElement_2_heatingSourceControlInsideOptional_heatingSource, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } + jmethodID heatingSourceControlStructStructCtor_5 = + env->GetMethodID(heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct " + "constructor"); + return nullptr; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + jclass loadControlEventTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + return nullptr; + } + jmethodID loadControlEventTransitionStructStructCtor_3 = + env->GetMethodID(loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (loadControlEventTransitionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " + "constructor"); + return nullptr; + } + + newElement_2 = + env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, + newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, + newElement_2_averageLoadControl, newElement_2_dutyCycleControl, + newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + + jclass loadControlEventStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); + return nullptr; + } + jmethodID loadControlEventStructStructCtor_1 = + env->GetMethodID(loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/" + "Long;Ljava/util/ArrayList;)V"); + if (loadControlEventStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, + newElement_0_eventID, newElement_0_programID, newElement_0_control, + newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, + newElement_0_startTime, newElement_0_transitions); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::ActiveEvents::Id: { + using TypeInfo = Attributes::ActiveEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_eventID; + jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); + env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), + reinterpret_cast(entry_0.eventID.data())); + newElement_0_eventID = newElement_0_eventIDByteArray; + jobject newElement_0_programID; + if (entry_0.programID.IsNull()) + { + newElement_0_programID = nullptr; + } + else + { + jbyteArray newElement_0_programIDByteArray = + env->NewByteArray(static_cast(entry_0.programID.Value().size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, + static_cast(entry_0.programID.Value().size()), + reinterpret_cast(entry_0.programID.Value().data())); + newElement_0_programID = newElement_0_programIDByteArray; + } + jobject newElement_0_control; + std::string newElement_0_controlClassName = "java/lang/Integer"; + std::string newElement_0_controlCtorSignature = "(I)V"; + jint jninewElement_0_control = static_cast(entry_0.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), + newElement_0_controlCtorSignature.c_str(), + jninewElement_0_control, newElement_0_control); + jobject newElement_0_deviceClass; + std::string newElement_0_deviceClassClassName = "java/lang/Long"; + std::string newElement_0_deviceClassCtorSignature = "(J)V"; + jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), + newElement_0_deviceClassCtorSignature.c_str(), + jninewElement_0_deviceClass, newElement_0_deviceClass); + jobject newElement_0_enrollmentGroup; + if (!entry_0.enrollmentGroup.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); + } + else + { + jobject newElement_0_enrollmentGroupInsideOptional; + std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), + newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), + jninewElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroupInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroup); + } + jobject newElement_0_criticality; + std::string newElement_0_criticalityClassName = "java/lang/Integer"; + std::string newElement_0_criticalityCtorSignature = "(I)V"; + jint jninewElement_0_criticality = static_cast(entry_0.criticality); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), + newElement_0_criticalityCtorSignature.c_str(), + jninewElement_0_criticality, newElement_0_criticality); + jobject newElement_0_startTime; + if (entry_0.startTime.IsNull()) + { + newElement_0_startTime = nullptr; + } + else + { + std::string newElement_0_startTimeClassName = "java/lang/Long"; + std::string newElement_0_startTimeCtorSignature = "(J)V"; + jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), + newElement_0_startTimeCtorSignature.c_str(), + jninewElement_0_startTime, newElement_0_startTime); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_duration; + std::string newElement_2_durationClassName = "java/lang/Integer"; + std::string newElement_2_durationCtorSignature = "(I)V"; + jint jninewElement_2_duration = static_cast(entry_2.duration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), + newElement_2_durationCtorSignature.c_str(), + jninewElement_2_duration, newElement_2_duration); + jobject newElement_2_control; + std::string newElement_2_controlClassName = "java/lang/Integer"; + std::string newElement_2_controlCtorSignature = "(I)V"; + jint jninewElement_2_control = static_cast(entry_2.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), + newElement_2_controlCtorSignature.c_str(), + jninewElement_2_control, newElement_2_control); + jobject newElement_2_temperatureControl; + if (!entry_2.temperatureControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); + } + else + { + jobject newElement_2_temperatureControlInsideOptional; + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; + if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; + if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; + if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName + .c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; + if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; + } + else + { + std::string + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName + .c_str(), + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature + .c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } + jmethodID temperatureControlStructStructCtor_5 = + env->GetMethodID(temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return nullptr; + } + + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, + newElement_2_temperatureControl); + } + jobject newElement_2_averageLoadControl; + if (!entry_2.averageLoadControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); + } + else + { + jobject newElement_2_averageLoadControlInsideOptional; + jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; + jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = + static_cast(entry_2.averageLoadControl.Value().loadAdjustment); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), + newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), + jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } + jmethodID averageLoadControlStructStructCtor_5 = + env->GetMethodID(averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return nullptr; + } + + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, + newElement_2_averageLoadControl); + } + jobject newElement_2_dutyCycleControl; + if (!entry_2.dutyCycleControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); + } + else + { + jobject newElement_2_dutyCycleControlInsideOptional; + jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; + jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = + static_cast(entry_2.dutyCycleControl.Value().dutyCycle); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), + newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), + jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } + jmethodID dutyCycleControlStructStructCtor_5 = + env->GetMethodID(dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return nullptr; + } + + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, + newElement_2_dutyCycleControl); + } + jobject newElement_2_powerSavingsControl; + if (!entry_2.powerSavingsControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); + } + else + { + jobject newElement_2_powerSavingsControlInsideOptional; + jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; + jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = + static_cast(entry_2.powerSavingsControl.Value().powerSavings); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), + newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), + jninewElement_2_powerSavingsControlInsideOptional_powerSavings, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } + jmethodID powerSavingsControlStructStructCtor_5 = + env->GetMethodID(powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return nullptr; + } + + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, + newElement_2_powerSavingsControl); + } + jobject newElement_2_heatingSourceControl; + if (!entry_2.heatingSourceControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); + } + else + { + jobject newElement_2_heatingSourceControlInsideOptional; + jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; + jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = + static_cast(entry_2.heatingSourceControl.Value().heatingSource); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), + newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), + jninewElement_2_heatingSourceControlInsideOptional_heatingSource, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } + jmethodID heatingSourceControlStructStructCtor_5 = + env->GetMethodID(heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct " + "constructor"); + return nullptr; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + jclass loadControlEventTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + return nullptr; + } + jmethodID loadControlEventTransitionStructStructCtor_3 = + env->GetMethodID(loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (loadControlEventTransitionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " + "constructor"); + return nullptr; + } + + newElement_2 = + env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, + newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, + newElement_2_averageLoadControl, newElement_2_dutyCycleControl, + newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + + jclass loadControlEventStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); + return nullptr; + } + jmethodID loadControlEventStructStructCtor_1 = + env->GetMethodID(loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/" + "Long;Ljava/util/ArrayList;)V"); + if (loadControlEventStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, + newElement_0_eventID, newElement_0_programID, newElement_0_control, + newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, + newElement_0_startTime, newElement_0_transitions); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::NumberOfEventsPerProgram::Id: { + using TypeInfo = Attributes::NumberOfEventsPerProgram::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::NumberOfTransitions::Id: { + using TypeInfo = Attributes::NumberOfTransitions::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::DefaultRandomStart::Id: { + using TypeInfo = Attributes::DefaultRandomStart::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::DefaultRandomDuration::Id: { + using TypeInfo = Attributes::DefaultRandomDuration::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::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::DeviceEnergyManagement::Id: { + using namespace app::Clusters::DeviceEnergyManagement; + switch (aPath.mAttributeId) + { + case Attributes::ESAType::Id: { + using TypeInfo = Attributes::ESAType::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::ESACanGenerate::Id: { + using TypeInfo = Attributes::ESACanGenerate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ESAState::Id: { + using TypeInfo = Attributes::ESAState::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::AbsMinPower::Id: { + using TypeInfo = Attributes::AbsMinPower::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::AbsMaxPower::Id: { + using TypeInfo = Attributes::AbsMaxPower::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::PowerAdjustmentCapability::Id: { + using TypeInfo = Attributes::PowerAdjustmentCapability::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_1 = cppValue.Value().begin(); + while (iter_value_1.Next()) + { + auto & entry_1 = iter_value_1.GetValue(); + jobject newElement_1; + jobject newElement_1_minPower; + std::string newElement_1_minPowerClassName = "java/lang/Long"; + std::string newElement_1_minPowerCtorSignature = "(J)V"; + jlong jninewElement_1_minPower = static_cast(entry_1.minPower); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_minPowerClassName.c_str(), + newElement_1_minPowerCtorSignature.c_str(), + jninewElement_1_minPower, newElement_1_minPower); + jobject newElement_1_maxPower; + std::string newElement_1_maxPowerClassName = "java/lang/Long"; + std::string newElement_1_maxPowerCtorSignature = "(J)V"; + jlong jninewElement_1_maxPower = static_cast(entry_1.maxPower); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_maxPowerClassName.c_str(), + newElement_1_maxPowerCtorSignature.c_str(), + jninewElement_1_maxPower, newElement_1_maxPower); + jobject newElement_1_minDuration; + std::string newElement_1_minDurationClassName = "java/lang/Long"; + std::string newElement_1_minDurationCtorSignature = "(J)V"; + jlong jninewElement_1_minDuration = static_cast(entry_1.minDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_minDurationClassName.c_str(), newElement_1_minDurationCtorSignature.c_str(), + jninewElement_1_minDuration, newElement_1_minDuration); + jobject newElement_1_maxDuration; + std::string newElement_1_maxDurationClassName = "java/lang/Long"; + std::string newElement_1_maxDurationCtorSignature = "(J)V"; + jlong jninewElement_1_maxDuration = static_cast(entry_1.maxDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_maxDurationClassName.c_str(), newElement_1_maxDurationCtorSignature.c_str(), + jninewElement_1_maxDuration, newElement_1_maxDuration); + + jclass powerAdjustStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", + powerAdjustStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); + return nullptr; + } + jmethodID powerAdjustStructStructCtor_2 = + env->GetMethodID(powerAdjustStructStructClass_2, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (powerAdjustStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); + return nullptr; + } + + newElement_1 = + env->NewObject(powerAdjustStructStructClass_2, powerAdjustStructStructCtor_2, newElement_1_minPower, + newElement_1_maxPower, newElement_1_minDuration, newElement_1_maxDuration); + chip::JniReferences::GetInstance().AddToList(value, newElement_1); + } + } + return value; + } + case Attributes::Forecast::Id: { + using TypeInfo = Attributes::Forecast::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_forecastId; + std::string value_forecastIdClassName = "java/lang/Integer"; + std::string value_forecastIdCtorSignature = "(I)V"; + jint jnivalue_forecastId = static_cast(cppValue.Value().forecastId); + chip::JniReferences::GetInstance().CreateBoxedObject(value_forecastIdClassName.c_str(), + value_forecastIdCtorSignature.c_str(), + jnivalue_forecastId, value_forecastId); + jobject value_activeSlotNumber; + if (cppValue.Value().activeSlotNumber.IsNull()) + { + value_activeSlotNumber = nullptr; + } + else + { + std::string value_activeSlotNumberClassName = "java/lang/Integer"; + std::string value_activeSlotNumberCtorSignature = "(I)V"; + jint jnivalue_activeSlotNumber = static_cast(cppValue.Value().activeSlotNumber.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_activeSlotNumberClassName.c_str(), + value_activeSlotNumberCtorSignature.c_str(), + jnivalue_activeSlotNumber, value_activeSlotNumber); + } + jobject value_startTime; + std::string value_startTimeClassName = "java/lang/Long"; + std::string value_startTimeCtorSignature = "(J)V"; + jlong jnivalue_startTime = static_cast(cppValue.Value().startTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime); + jobject value_endTime; + std::string value_endTimeClassName = "java/lang/Long"; + std::string value_endTimeCtorSignature = "(J)V"; + jlong jnivalue_endTime = static_cast(cppValue.Value().endTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endTimeClassName.c_str(), value_endTimeCtorSignature.c_str(), jnivalue_endTime, value_endTime); + jobject value_earliestStartTime; + if (!cppValue.Value().earliestStartTime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_earliestStartTime); + } + else + { + jobject value_earliestStartTimeInsideOptional; + if (cppValue.Value().earliestStartTime.Value().IsNull()) + { + value_earliestStartTimeInsideOptional = nullptr; + } + else + { + std::string value_earliestStartTimeInsideOptionalClassName = "java/lang/Long"; + std::string value_earliestStartTimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_earliestStartTimeInsideOptional = + static_cast(cppValue.Value().earliestStartTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_earliestStartTimeInsideOptionalClassName.c_str(), + value_earliestStartTimeInsideOptionalCtorSignature.c_str(), jnivalue_earliestStartTimeInsideOptional, + value_earliestStartTimeInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional(value_earliestStartTimeInsideOptional, + value_earliestStartTime); + } + jobject value_latestEndTime; + if (!cppValue.Value().latestEndTime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_latestEndTime); + } + else + { + jobject value_latestEndTimeInsideOptional; + std::string value_latestEndTimeInsideOptionalClassName = "java/lang/Long"; + std::string value_latestEndTimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_latestEndTimeInsideOptional = static_cast(cppValue.Value().latestEndTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_latestEndTimeInsideOptionalClassName.c_str(), value_latestEndTimeInsideOptionalCtorSignature.c_str(), + jnivalue_latestEndTimeInsideOptional, value_latestEndTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_latestEndTimeInsideOptional, value_latestEndTime); + } + jobject value_isPauseable; + std::string value_isPauseableClassName = "java/lang/Boolean"; + std::string value_isPauseableCtorSignature = "(Z)V"; + jboolean jnivalue_isPauseable = static_cast(cppValue.Value().isPauseable); + chip::JniReferences::GetInstance().CreateBoxedObject(value_isPauseableClassName.c_str(), + value_isPauseableCtorSignature.c_str(), + jnivalue_isPauseable, value_isPauseable); + jobject value_slots; + chip::JniReferences::GetInstance().CreateArrayList(value_slots); + + auto iter_value_slots_2 = cppValue.Value().slots.begin(); + while (iter_value_slots_2.Next()) + { + auto & entry_2 = iter_value_slots_2.GetValue(); + jobject newElement_2; + jobject newElement_2_minDuration; + std::string newElement_2_minDurationClassName = "java/lang/Long"; + std::string newElement_2_minDurationCtorSignature = "(J)V"; + jlong jninewElement_2_minDuration = static_cast(entry_2.minDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minDurationClassName.c_str(), newElement_2_minDurationCtorSignature.c_str(), + jninewElement_2_minDuration, newElement_2_minDuration); + jobject newElement_2_maxDuration; + std::string newElement_2_maxDurationClassName = "java/lang/Long"; + std::string newElement_2_maxDurationCtorSignature = "(J)V"; + jlong jninewElement_2_maxDuration = static_cast(entry_2.maxDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxDurationClassName.c_str(), newElement_2_maxDurationCtorSignature.c_str(), + jninewElement_2_maxDuration, newElement_2_maxDuration); + jobject newElement_2_defaultDuration; + std::string newElement_2_defaultDurationClassName = "java/lang/Long"; + std::string newElement_2_defaultDurationCtorSignature = "(J)V"; + jlong jninewElement_2_defaultDuration = static_cast(entry_2.defaultDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_defaultDurationClassName.c_str(), newElement_2_defaultDurationCtorSignature.c_str(), + jninewElement_2_defaultDuration, newElement_2_defaultDuration); + jobject newElement_2_elapsedSlotTime; + std::string newElement_2_elapsedSlotTimeClassName = "java/lang/Long"; + std::string newElement_2_elapsedSlotTimeCtorSignature = "(J)V"; + jlong jninewElement_2_elapsedSlotTime = static_cast(entry_2.elapsedSlotTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_elapsedSlotTimeClassName.c_str(), newElement_2_elapsedSlotTimeCtorSignature.c_str(), + jninewElement_2_elapsedSlotTime, newElement_2_elapsedSlotTime); + jobject newElement_2_remainingSlotTime; + std::string newElement_2_remainingSlotTimeClassName = "java/lang/Long"; + std::string newElement_2_remainingSlotTimeCtorSignature = "(J)V"; + jlong jninewElement_2_remainingSlotTime = static_cast(entry_2.remainingSlotTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_remainingSlotTimeClassName.c_str(), newElement_2_remainingSlotTimeCtorSignature.c_str(), + jninewElement_2_remainingSlotTime, newElement_2_remainingSlotTime); + jobject newElement_2_slotIsPauseable; + std::string newElement_2_slotIsPauseableClassName = "java/lang/Boolean"; + std::string newElement_2_slotIsPauseableCtorSignature = "(Z)V"; + jboolean jninewElement_2_slotIsPauseable = static_cast(entry_2.slotIsPauseable); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_slotIsPauseableClassName.c_str(), newElement_2_slotIsPauseableCtorSignature.c_str(), + jninewElement_2_slotIsPauseable, newElement_2_slotIsPauseable); + jobject newElement_2_minPauseDuration; + std::string newElement_2_minPauseDurationClassName = "java/lang/Long"; + std::string newElement_2_minPauseDurationCtorSignature = "(J)V"; + jlong jninewElement_2_minPauseDuration = static_cast(entry_2.minPauseDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minPauseDurationClassName.c_str(), newElement_2_minPauseDurationCtorSignature.c_str(), + jninewElement_2_minPauseDuration, newElement_2_minPauseDuration); + jobject newElement_2_maxPauseDuration; + std::string newElement_2_maxPauseDurationClassName = "java/lang/Long"; + std::string newElement_2_maxPauseDurationCtorSignature = "(J)V"; + jlong jninewElement_2_maxPauseDuration = static_cast(entry_2.maxPauseDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxPauseDurationClassName.c_str(), newElement_2_maxPauseDurationCtorSignature.c_str(), + jninewElement_2_maxPauseDuration, newElement_2_maxPauseDuration); + jobject newElement_2_manufacturerESAState; + if (!entry_2.manufacturerESAState.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_manufacturerESAState); + } + else + { + jobject newElement_2_manufacturerESAStateInsideOptional; + std::string newElement_2_manufacturerESAStateInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_manufacturerESAStateInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_manufacturerESAStateInsideOptional = + static_cast(entry_2.manufacturerESAState.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_manufacturerESAStateInsideOptionalClassName.c_str(), + newElement_2_manufacturerESAStateInsideOptionalCtorSignature.c_str(), + jninewElement_2_manufacturerESAStateInsideOptional, newElement_2_manufacturerESAStateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_manufacturerESAStateInsideOptional, + newElement_2_manufacturerESAState); + } + jobject newElement_2_nominalPower; + if (!entry_2.nominalPower.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_nominalPower); + } + else + { + jobject newElement_2_nominalPowerInsideOptional; + std::string newElement_2_nominalPowerInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_nominalPowerInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_nominalPowerInsideOptional = static_cast(entry_2.nominalPower.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_nominalPowerInsideOptionalClassName.c_str(), + newElement_2_nominalPowerInsideOptionalCtorSignature.c_str(), + jninewElement_2_nominalPowerInsideOptional, newElement_2_nominalPowerInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_nominalPowerInsideOptional, + newElement_2_nominalPower); + } + jobject newElement_2_minPower; + if (!entry_2.minPower.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPower); + } + else + { + jobject newElement_2_minPowerInsideOptional; + std::string newElement_2_minPowerInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_minPowerInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_minPowerInsideOptional = static_cast(entry_2.minPower.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minPowerInsideOptionalClassName.c_str(), + newElement_2_minPowerInsideOptionalCtorSignature.c_str(), jninewElement_2_minPowerInsideOptional, + newElement_2_minPowerInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPowerInsideOptional, + newElement_2_minPower); + } + jobject newElement_2_maxPower; + if (!entry_2.maxPower.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPower); + } + else + { + jobject newElement_2_maxPowerInsideOptional; + std::string newElement_2_maxPowerInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_maxPowerInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_maxPowerInsideOptional = static_cast(entry_2.maxPower.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxPowerInsideOptionalClassName.c_str(), + newElement_2_maxPowerInsideOptionalCtorSignature.c_str(), jninewElement_2_maxPowerInsideOptional, + newElement_2_maxPowerInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPowerInsideOptional, + newElement_2_maxPower); + } + jobject newElement_2_nominalEnergy; + if (!entry_2.nominalEnergy.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_nominalEnergy); + } + else + { + jobject newElement_2_nominalEnergyInsideOptional; + std::string newElement_2_nominalEnergyInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_nominalEnergyInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_nominalEnergyInsideOptional = static_cast(entry_2.nominalEnergy.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_nominalEnergyInsideOptionalClassName.c_str(), + newElement_2_nominalEnergyInsideOptionalCtorSignature.c_str(), + jninewElement_2_nominalEnergyInsideOptional, newElement_2_nominalEnergyInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_nominalEnergyInsideOptional, + newElement_2_nominalEnergy); + } + jobject newElement_2_costs; + if (!entry_2.costs.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_costs); + } + else + { + jobject newElement_2_costsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_2_costsInsideOptional); + + auto iter_newElement_2_costsInsideOptional_5 = entry_2.costs.Value().begin(); + while (iter_newElement_2_costsInsideOptional_5.Next()) + { + auto & entry_5 = iter_newElement_2_costsInsideOptional_5.GetValue(); + jobject newElement_5; + jobject newElement_5_costType; + std::string newElement_5_costTypeClassName = "java/lang/Integer"; + std::string newElement_5_costTypeCtorSignature = "(I)V"; + jint jninewElement_5_costType = static_cast(entry_5.costType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5_costTypeClassName.c_str(), newElement_5_costTypeCtorSignature.c_str(), + jninewElement_5_costType, newElement_5_costType); + jobject newElement_5_value; + std::string newElement_5_valueClassName = "java/lang/Long"; + std::string newElement_5_valueCtorSignature = "(J)V"; + jlong jninewElement_5_value = static_cast(entry_5.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_5_valueClassName.c_str(), + newElement_5_valueCtorSignature.c_str(), + jninewElement_5_value, newElement_5_value); + jobject newElement_5_decimalPoints; + std::string newElement_5_decimalPointsClassName = "java/lang/Integer"; + std::string newElement_5_decimalPointsCtorSignature = "(I)V"; + jint jninewElement_5_decimalPoints = static_cast(entry_5.decimalPoints); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5_decimalPointsClassName.c_str(), newElement_5_decimalPointsCtorSignature.c_str(), + jninewElement_5_decimalPoints, newElement_5_decimalPoints); + jobject newElement_5_currency; + if (!entry_5.currency.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_5_currency); + } + else + { + jobject newElement_5_currencyInsideOptional; + std::string newElement_5_currencyInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_5_currencyInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_5_currencyInsideOptional = static_cast(entry_5.currency.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5_currencyInsideOptionalClassName.c_str(), + newElement_5_currencyInsideOptionalCtorSignature.c_str(), + jninewElement_5_currencyInsideOptional, newElement_5_currencyInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_5_currencyInsideOptional, + newElement_5_currency); + } + + jclass costStructStructClass_6; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterCostStruct", + costStructStructClass_6); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterCostStruct"); + return nullptr; + } + jmethodID costStructStructCtor_6 = + env->GetMethodID(costStructStructClass_6, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (costStructStructCtor_6 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterCostStruct constructor"); + return nullptr; + } + + newElement_5 = env->NewObject(costStructStructClass_6, costStructStructCtor_6, newElement_5_costType, + newElement_5_value, newElement_5_decimalPoints, newElement_5_currency); + chip::JniReferences::GetInstance().AddToList(newElement_2_costsInsideOptional, newElement_5); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_2_costsInsideOptional, newElement_2_costs); + } + jobject newElement_2_minPowerAdjustment; + if (!entry_2.minPowerAdjustment.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPowerAdjustment); + } + else + { + jobject newElement_2_minPowerAdjustmentInsideOptional; + std::string newElement_2_minPowerAdjustmentInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_minPowerAdjustmentInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_minPowerAdjustmentInsideOptional = + static_cast(entry_2.minPowerAdjustment.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minPowerAdjustmentInsideOptionalClassName.c_str(), + newElement_2_minPowerAdjustmentInsideOptionalCtorSignature.c_str(), + jninewElement_2_minPowerAdjustmentInsideOptional, newElement_2_minPowerAdjustmentInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPowerAdjustmentInsideOptional, + newElement_2_minPowerAdjustment); + } + jobject newElement_2_maxPowerAdjustment; + if (!entry_2.maxPowerAdjustment.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPowerAdjustment); + } + else + { + jobject newElement_2_maxPowerAdjustmentInsideOptional; + std::string newElement_2_maxPowerAdjustmentInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_maxPowerAdjustmentInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_maxPowerAdjustmentInsideOptional = + static_cast(entry_2.maxPowerAdjustment.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxPowerAdjustmentInsideOptionalClassName.c_str(), + newElement_2_maxPowerAdjustmentInsideOptionalCtorSignature.c_str(), + jninewElement_2_maxPowerAdjustmentInsideOptional, newElement_2_maxPowerAdjustmentInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPowerAdjustmentInsideOptional, + newElement_2_maxPowerAdjustment); + } + jobject newElement_2_minDurationAdjustment; + if (!entry_2.minDurationAdjustment.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minDurationAdjustment); + } + else + { + jobject newElement_2_minDurationAdjustmentInsideOptional; + std::string newElement_2_minDurationAdjustmentInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_minDurationAdjustmentInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_minDurationAdjustmentInsideOptional = + static_cast(entry_2.minDurationAdjustment.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_minDurationAdjustmentInsideOptionalClassName.c_str(), + newElement_2_minDurationAdjustmentInsideOptionalCtorSignature.c_str(), + jninewElement_2_minDurationAdjustmentInsideOptional, newElement_2_minDurationAdjustmentInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_minDurationAdjustmentInsideOptional, + newElement_2_minDurationAdjustment); + } + jobject newElement_2_maxDurationAdjustment; + if (!entry_2.maxDurationAdjustment.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxDurationAdjustment); + } + else + { + jobject newElement_2_maxDurationAdjustmentInsideOptional; + std::string newElement_2_maxDurationAdjustmentInsideOptionalClassName = "java/lang/Long"; + std::string newElement_2_maxDurationAdjustmentInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_2_maxDurationAdjustmentInsideOptional = + static_cast(entry_2.maxDurationAdjustment.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_maxDurationAdjustmentInsideOptionalClassName.c_str(), + newElement_2_maxDurationAdjustmentInsideOptionalCtorSignature.c_str(), + jninewElement_2_maxDurationAdjustmentInsideOptional, newElement_2_maxDurationAdjustmentInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxDurationAdjustmentInsideOptional, + newElement_2_maxDurationAdjustment); + } + + jclass slotStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterSlotStruct", slotStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterSlotStruct"); + return nullptr; + } + jmethodID slotStructStructCtor_3 = env->GetMethodID( + slotStructStructClass_3, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/" + "lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;)V"); + if (slotStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterSlotStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject( + slotStructStructClass_3, slotStructStructCtor_3, newElement_2_minDuration, newElement_2_maxDuration, + newElement_2_defaultDuration, newElement_2_elapsedSlotTime, newElement_2_remainingSlotTime, + newElement_2_slotIsPauseable, newElement_2_minPauseDuration, newElement_2_maxPauseDuration, + newElement_2_manufacturerESAState, newElement_2_nominalPower, newElement_2_minPower, newElement_2_maxPower, + newElement_2_nominalEnergy, newElement_2_costs, newElement_2_minPowerAdjustment, + newElement_2_maxPowerAdjustment, newElement_2_minDurationAdjustment, newElement_2_maxDurationAdjustment); + chip::JniReferences::GetInstance().AddToList(value_slots, newElement_2); + } + + jclass forecastStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterForecastStruct", + forecastStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterForecastStruct"); + return nullptr; + } + jmethodID forecastStructStructCtor_1 = + env->GetMethodID(forecastStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;)V"); + if (forecastStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterForecastStruct constructor"); + return nullptr; + } + + value = env->NewObject(forecastStructStructClass_1, forecastStructStructCtor_1, value_forecastId, + value_activeSlotNumber, value_startTime, value_endTime, value_earliestStartTime, + value_latestEndTime, value_isPauseable, value_slots); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::EnergyEvse::Id: { + using namespace app::Clusters::EnergyEvse; + switch (aPath.mAttributeId) + { + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::SupplyState::Id: { + using TypeInfo = Attributes::SupplyState::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::FaultState::Id: { + using TypeInfo = Attributes::FaultState::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::ChargingEnabledUntil::Id: { + using TypeInfo = Attributes::ChargingEnabledUntil::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::DischargingEnabledUntil::Id: { + using TypeInfo = Attributes::DischargingEnabledUntil::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::CircuitCapacity::Id: { + using TypeInfo = Attributes::CircuitCapacity::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::MinimumChargeCurrent::Id: { + using TypeInfo = Attributes::MinimumChargeCurrent::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::MaximumChargeCurrent::Id: { + using TypeInfo = Attributes::MaximumChargeCurrent::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::MaximumDischargeCurrent::Id: { + using TypeInfo = Attributes::MaximumDischargeCurrent::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::UserMaximumChargeCurrent::Id: { + using TypeInfo = Attributes::UserMaximumChargeCurrent::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::RandomizationDelayWindow::Id: { + using TypeInfo = Attributes::RandomizationDelayWindow::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::NumberOfWeeklyTargets::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTargets::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::NumberOfDailyTargets::Id: { + using TypeInfo = Attributes::NumberOfDailyTargets::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::NextChargeStartTime::Id: { + using TypeInfo = Attributes::NextChargeStartTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::NextChargeTargetTime::Id: { + using TypeInfo = Attributes::NextChargeTargetTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::NextChargeRequiredEnergy::Id: { + using TypeInfo = Attributes::NextChargeRequiredEnergy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::NextChargeTargetSoC::Id: { + using TypeInfo = Attributes::NextChargeTargetSoC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::ApproximateEVEfficiency::Id: { + using TypeInfo = Attributes::ApproximateEVEfficiency::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::StateOfCharge::Id: { + using TypeInfo = Attributes::StateOfCharge::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::BatteryCapacity::Id: { + using TypeInfo = Attributes::BatteryCapacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::VehicleID::Id: { + using TypeInfo = Attributes::VehicleID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); + } + return value; + } + case Attributes::SessionID::Id: { + using TypeInfo = Attributes::SessionID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::SessionDuration::Id: { + using TypeInfo = Attributes::SessionDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::SessionEnergyCharged::Id: { + using TypeInfo = Attributes::SessionEnergyCharged::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::SessionEnergyDischarged::Id: { + using TypeInfo = Attributes::SessionEnergyDischarged::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + 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; @@ -20560,7 +25550,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -20711,7 +25701,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -20727,7 +25717,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -21016,7 +26006,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); + jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -28555,6 +33545,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, newElement_0_affiliateCallSign); } + jobject newElement_0_identifier; + if (!entry_0.identifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_identifier); + } + else + { + jobject newElement_0_identifierInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier.Value(), + newElement_0_identifierInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_identifierInsideOptional, + newElement_0_identifier); + } + jobject newElement_0_type; + if (!entry_0.type.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_type); + } + else + { + jobject newElement_0_typeInsideOptional; + std::string newElement_0_typeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_typeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_typeInsideOptional = static_cast(entry_0.type.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeInsideOptionalClassName.c_str(), newElement_0_typeInsideOptionalCtorSignature.c_str(), + jninewElement_0_typeInsideOptional, newElement_0_typeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_typeInsideOptional, newElement_0_type); + } jclass channelInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -28564,18 +33583,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); return nullptr; } - jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( - channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + jmethodID channelInfoStructStructCtor_1 = + env->GetMethodID(channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); if (channelInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, - newElement_0_majorNumber, newElement_0_minorNumber, newElement_0_name, - newElement_0_callSign, newElement_0_affiliateCallSign); + newElement_0 = + env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, + newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, + newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28718,6 +33739,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_affiliateCallSignInsideOptional, value_affiliateCallSign); } + jobject value_identifier; + if (!cppValue.Value().identifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_identifier); + } + else + { + jobject value_identifierInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().identifier.Value(), + value_identifierInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_identifierInsideOptional, value_identifier); + } + jobject value_type; + if (!cppValue.Value().type.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_type); + } + else + { + jobject value_typeInsideOptional; + std::string value_typeInsideOptionalClassName = "java/lang/Integer"; + std::string value_typeInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_typeInsideOptional = static_cast(cppValue.Value().type.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_typeInsideOptionalClassName.c_str(), value_typeInsideOptionalCtorSignature.c_str(), + jnivalue_typeInsideOptional, value_typeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_typeInsideOptional, value_type); + } jclass channelInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -28727,9 +33776,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); return nullptr; } - jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( - channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + jmethodID channelInfoStructStructCtor_1 = + env->GetMethodID(channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); if (channelInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); @@ -28737,7 +33787,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } value = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, value_majorNumber, - value_minorNumber, value_name, value_callSign, value_affiliateCallSign); + value_minorNumber, value_name, value_callSign, value_affiliateCallSign, value_identifier, + value_type); } return value; } @@ -29270,6 +34321,392 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::ActiveAudioTrack::Id: { + using TypeInfo = Attributes::ActiveAudioTrack::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); + jobject value_trackAttributes; + if (cppValue.Value().trackAttributes.IsNull()) + { + value_trackAttributes = nullptr; + } + else + { + jobject value_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); + jobject value_trackAttributes_displayName; + if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + } + else + { + jobject value_trackAttributes_displayNameInsideOptional; + if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) + { + value_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.Value().displayName.Value().Value(), + value_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, + value_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + jmethodID trackAttributesStructStructCtor_3 = + env->GetMethodID(trackAttributesStructStructClass_3, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + value_trackAttributes_languageCode, value_trackAttributes_displayName); + } + + jclass trackStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return nullptr; + } + jmethodID trackStructStructCtor_1 = env->GetMethodID( + trackStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return nullptr; + } + + value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); + } + return value; + } + case Attributes::AvailableAudioTracks::Id: { + using TypeInfo = Attributes::AvailableAudioTracks::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_1 = cppValue.Value().begin(); + while (iter_value_1.Next()) + { + auto & entry_1 = iter_value_1.GetValue(); + jobject newElement_1; + jobject newElement_1_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); + jobject newElement_1_trackAttributes; + if (entry_1.trackAttributes.IsNull()) + { + newElement_1_trackAttributes = nullptr; + } + else + { + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) + { + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + jmethodID trackAttributesStructStructCtor_4 = env->GetMethodID(trackAttributesStructStructClass_4, "", + "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + + jclass trackStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return nullptr; + } + jmethodID trackStructStructCtor_2 = env->GetMethodID( + trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return nullptr; + } + + newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, + newElement_1_trackAttributes); + chip::JniReferences::GetInstance().AddToList(value, newElement_1); + } + } + return value; + } + case Attributes::ActiveTextTrack::Id: { + using TypeInfo = Attributes::ActiveTextTrack::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); + jobject value_trackAttributes; + if (cppValue.Value().trackAttributes.IsNull()) + { + value_trackAttributes = nullptr; + } + else + { + jobject value_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); + jobject value_trackAttributes_displayName; + if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + } + else + { + jobject value_trackAttributes_displayNameInsideOptional; + if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) + { + value_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.Value().displayName.Value().Value(), + value_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, + value_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + jmethodID trackAttributesStructStructCtor_3 = + env->GetMethodID(trackAttributesStructStructClass_3, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + value_trackAttributes_languageCode, value_trackAttributes_displayName); + } + + jclass trackStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return nullptr; + } + jmethodID trackStructStructCtor_1 = env->GetMethodID( + trackStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return nullptr; + } + + value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); + } + return value; + } + case Attributes::AvailableTextTracks::Id: { + using TypeInfo = Attributes::AvailableTextTracks::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_1 = cppValue.Value().begin(); + while (iter_value_1.Next()) + { + auto & entry_1 = iter_value_1.GetValue(); + jobject newElement_1; + jobject newElement_1_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); + jobject newElement_1_trackAttributes; + if (entry_1.trackAttributes.IsNull()) + { + newElement_1_trackAttributes = nullptr; + } + else + { + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) + { + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + jmethodID trackAttributesStructStructCtor_4 = env->GetMethodID(trackAttributesStructStructClass_4, "", + "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + + jclass trackStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return nullptr; + } + jmethodID trackStructStructCtor_2 = env->GetMethodID( + trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return nullptr; + } + + newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, + newElement_1_trackAttributes); + chip::JniReferences::GetInstance().AddToList(value, newElement_1); + } + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -29465,14 +34902,288 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, - newElement_0_inputType, newElement_0_name, newElement_0_description); + newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, + newElement_0_inputType, newElement_0_name, newElement_0_description); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentInput::Id: { + using TypeInfo = Attributes::CurrentInput::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::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::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; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::LowPower::Id: { + using namespace app::Clusters::LowPower; + switch (aPath.mAttributeId) + { + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::CurrentInput::Id: { - using TypeInfo = Attributes::CurrentInput::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -29487,6 +35198,16 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::KeypadInput::Id: { + using namespace app::Clusters::KeypadInput; + switch (aPath.mAttributeId) + { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -29625,10 +35346,47 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::LowPower::Id: { - using namespace app::Clusters::LowPower; + case app::Clusters::ContentLauncher::Id: { + using namespace app::Clusters::ContentLauncher; switch (aPath.mAttributeId) { + case Attributes::AcceptHeader::Id: { + using TypeInfo = Attributes::AcceptHeader::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::SupportedStreamingProtocols::Id: { + using TypeInfo = Attributes::SupportedStreamingProtocols::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.Raw()); + 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; @@ -29767,10 +35525,81 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::KeypadInput::Id: { - using namespace app::Clusters::KeypadInput; + case app::Clusters::AudioOutput::Id: { + using namespace app::Clusters::AudioOutput; switch (aPath.mAttributeId) { + case Attributes::OutputList::Id: { + using TypeInfo = Attributes::OutputList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), + jninewElement_0_index, newElement_0_index); + jobject newElement_0_outputType; + std::string newElement_0_outputTypeClassName = "java/lang/Integer"; + std::string newElement_0_outputTypeCtorSignature = "(I)V"; + jint jninewElement_0_outputType = static_cast(entry_0.outputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), + newElement_0_outputTypeCtorSignature.c_str(), + jninewElement_0_outputType, newElement_0_outputType); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + + jclass outputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); + return nullptr; + } + jmethodID outputInfoStructStructCtor_1 = env->GetMethodID( + outputInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); + if (outputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, + newElement_0_outputType, newElement_0_name); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentOutput::Id: { + using TypeInfo = Attributes::CurrentOutput::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::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -29909,12 +35738,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ContentLauncher::Id: { - using namespace app::Clusters::ContentLauncher; + case app::Clusters::ApplicationLauncher::Id: { + using namespace app::Clusters::ApplicationLauncher; switch (aPath.mAttributeId) { - case Attributes::AcceptHeader::Id: { - using TypeInfo = Attributes::AcceptHeader::TypeInfo; + case Attributes::CatalogList::Id: { + using TypeInfo = Attributes::CatalogList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -29924,30 +35753,104 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::SupportedStreamingProtocols::Id: { - using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentApp::Id: { + using TypeInfo = Attributes::CurrentApp::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_application; + jobject value_application_catalogVendorID; + std::string value_application_catalogVendorIDClassName = "java/lang/Integer"; + std::string value_application_catalogVendorIDCtorSignature = "(I)V"; + jint jnivalue_application_catalogVendorID = static_cast(cppValue.Value().application.catalogVendorID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_application_catalogVendorIDClassName.c_str(), value_application_catalogVendorIDCtorSignature.c_str(), + jnivalue_application_catalogVendorID, value_application_catalogVendorID); + jobject value_application_applicationID; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, + value_application_applicationID)); + + jclass applicationStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", + applicationStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); + return nullptr; + } + jmethodID applicationStructStructCtor_2 = + env->GetMethodID(applicationStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (applicationStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); + return nullptr; + } + + value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, + value_application_catalogVendorID, value_application_applicationID); + jobject value_endpoint; + if (!cppValue.Value().endpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endpoint); + } + else + { + jobject value_endpointInsideOptional; + std::string value_endpointInsideOptionalClassName = "java/lang/Integer"; + std::string value_endpointInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_endpointInsideOptional = static_cast(cppValue.Value().endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endpointInsideOptionalClassName.c_str(), value_endpointInsideOptionalCtorSignature.c_str(), + jnivalue_endpointInsideOptional, value_endpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); + } + + jclass applicationEPStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", + applicationEPStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); + return nullptr; + } + jmethodID applicationEPStructStructCtor_1 = env->GetMethodID( + applicationEPStructStructClass_1, "", + "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V"); + if (applicationEPStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); + return nullptr; + } + + value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, + value_endpoint); } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -30088,12 +35991,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::AudioOutput::Id: { - using namespace app::Clusters::AudioOutput; + case app::Clusters::ApplicationBasic::Id: { + using namespace app::Clusters::ApplicationBasic; switch (aPath.mAttributeId) { - case Attributes::OutputList::Id: { - using TypeInfo = Attributes::OutputList::TypeInfo; + case Attributes::VendorName::Id: { + using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30101,54 +36004,94 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::VendorID::Id: { + using TypeInfo = Attributes::VendorID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - jint jninewElement_0_index = static_cast(entry_0.index); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), - jninewElement_0_index, newElement_0_index); - jobject newElement_0_outputType; - std::string newElement_0_outputTypeClassName = "java/lang/Integer"; - std::string newElement_0_outputTypeCtorSignature = "(I)V"; - jint jninewElement_0_outputType = static_cast(entry_0.outputType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), - newElement_0_outputTypeCtorSignature.c_str(), - jninewElement_0_outputType, newElement_0_outputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass outputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); - return nullptr; - } - jmethodID outputInfoStructStructCtor_1 = env->GetMethodID( - outputInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - if (outputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); - return nullptr; - } + 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::ApplicationName::Id: { + using TypeInfo = Attributes::ApplicationName::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::ProductID::Id: { + using TypeInfo = Attributes::ProductID::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::Application::Id: { + using TypeInfo = Attributes::Application::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_catalogVendorID; + std::string value_catalogVendorIDClassName = "java/lang/Integer"; + std::string value_catalogVendorIDCtorSignature = "(I)V"; + jint jnivalue_catalogVendorID = static_cast(cppValue.catalogVendorID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), + value_catalogVendorIDCtorSignature.c_str(), + jnivalue_catalogVendorID, value_catalogVendorID); + jobject value_applicationID; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); - newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, - newElement_0_outputType, newElement_0_name); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); + jclass applicationStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); + return nullptr; } + jmethodID applicationStructStructCtor_0 = + env->GetMethodID(applicationStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (applicationStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); + return nullptr; + } + + value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, + value_applicationID); return value; } - case Attributes::CurrentOutput::Id: { - using TypeInfo = Attributes::CurrentOutput::TypeInfo; + case Attributes::Status::Id: { + using TypeInfo = Attributes::Status::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30163,8 +36106,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ApplicationVersion::Id: { + using TypeInfo = Attributes::ApplicationVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::AllowedVendorList::Id: { + using TypeInfo = Attributes::AllowedVendorList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30179,17 +36134,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30213,8 +36168,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30238,8 +36193,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30263,50 +36218,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::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; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case app::Clusters::ApplicationLauncher::Id: { - using namespace app::Clusters::ApplicationLauncher; - switch (aPath.mAttributeId) - { - case Attributes::CatalogList::Id: { - using TypeInfo = Attributes::CatalogList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30321,17 +36234,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::CurrentApp::Id: { - using TypeInfo = Attributes::CurrentApp::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30339,83 +36252,39 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else + 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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { - jobject value_application; - jobject value_application_catalogVendorID; - std::string value_application_catalogVendorIDClassName = "java/lang/Integer"; - std::string value_application_catalogVendorIDCtorSignature = "(I)V"; - jint jnivalue_application_catalogVendorID = static_cast(cppValue.Value().application.catalogVendorID); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_application_catalogVendorIDClassName.c_str(), value_application_catalogVendorIDCtorSignature.c_str(), - jnivalue_application_catalogVendorID, value_application_catalogVendorID); - jobject value_application_applicationID; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, - value_application_applicationID)); - - jclass applicationStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", - applicationStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); - return nullptr; - } - jmethodID applicationStructStructCtor_2 = - env->GetMethodID(applicationStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (applicationStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); - return nullptr; - } - - value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, - value_application_catalogVendorID, value_application_applicationID); - jobject value_endpoint; - if (!cppValue.Value().endpoint.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endpoint); - } - else - { - jobject value_endpointInsideOptional; - std::string value_endpointInsideOptionalClassName = "java/lang/Integer"; - std::string value_endpointInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_endpointInsideOptional = static_cast(cppValue.Value().endpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_endpointInsideOptionalClassName.c_str(), value_endpointInsideOptionalCtorSignature.c_str(), - jnivalue_endpointInsideOptional, value_endpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); - } - - jclass applicationEPStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", - applicationEPStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); - return nullptr; - } - jmethodID applicationEPStructStructCtor_1 = env->GetMethodID( - applicationEPStructStructClass_1, "", - "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V"); - if (applicationEPStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); - return nullptr; - } - - value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, - value_endpoint); + 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; } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::AccountLogin::Id: { + using namespace app::Clusters::AccountLogin; + switch (aPath.mAttributeId) + { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -30554,12 +36423,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ApplicationBasic::Id: { - using namespace app::Clusters::ApplicationBasic; + case app::Clusters::ContentControl::Id: { + using namespace app::Clusters::ContentControl; switch (aPath.mAttributeId) { - case Attributes::VendorName::Id: { - using TypeInfo = Attributes::VendorName::TypeInfo; + case Attributes::Enabled::Id: { + using TypeInfo = Attributes::Enabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30567,11 +36436,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::VendorID::Id: { - using TypeInfo = Attributes::VendorID::TypeInfo; + case Attributes::OnDemandRatings::Id: { + using TypeInfo = Attributes::OnDemandRatings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30579,15 +36452,53 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_ratingName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); + jobject newElement_0_ratingNameDesc; + if (!entry_0.ratingNameDesc.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); + } + else + { + jobject newElement_0_ratingNameDescInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.ratingNameDesc.Value(), newElement_0_ratingNameDescInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, + newElement_0_ratingNameDesc); + } + + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return nullptr; + } + jmethodID ratingNameStructStructCtor_1 = + env->GetMethodID(ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, + newElement_0_ratingNameDesc); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::ApplicationName::Id: { - using TypeInfo = Attributes::ApplicationName::TypeInfo; + case Attributes::OnDemandRatingThreshold::Id: { + using TypeInfo = Attributes::OnDemandRatingThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30598,8 +36509,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } - case Attributes::ProductID::Id: { - using TypeInfo = Attributes::ProductID::TypeInfo; + case Attributes::ScheduledContentRatings::Id: { + using TypeInfo = Attributes::ScheduledContentRatings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30607,15 +36518,53 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_ratingName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); + jobject newElement_0_ratingNameDesc; + if (!entry_0.ratingNameDesc.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); + } + else + { + jobject newElement_0_ratingNameDescInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.ratingNameDesc.Value(), newElement_0_ratingNameDescInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, + newElement_0_ratingNameDesc); + } + + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return nullptr; + } + jmethodID ratingNameStructStructCtor_1 = + env->GetMethodID(ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, + newElement_0_ratingNameDesc); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::Application::Id: { - using TypeInfo = Attributes::Application::TypeInfo; + case Attributes::ScheduledContentRatingThreshold::Id: { + using TypeInfo = Attributes::ScheduledContentRatingThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30623,38 +36572,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_catalogVendorID; - std::string value_catalogVendorIDClassName = "java/lang/Integer"; - std::string value_catalogVendorIDCtorSignature = "(I)V"; - jint jnivalue_catalogVendorID = static_cast(cppValue.catalogVendorID); - chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), - value_catalogVendorIDCtorSignature.c_str(), - jnivalue_catalogVendorID, value_catalogVendorID); - jobject value_applicationID; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); - - jclass applicationStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); - return nullptr; - } - jmethodID applicationStructStructCtor_0 = - env->GetMethodID(applicationStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (applicationStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); - return nullptr; - } - - value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, - value_applicationID); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } - case Attributes::Status::Id: { - using TypeInfo = Attributes::Status::TypeInfo; + case Attributes::ScreenDailyTime::Id: { + using TypeInfo = Attributes::ScreenDailyTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30662,15 +36584,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::ApplicationVersion::Id: { - using TypeInfo = Attributes::ApplicationVersion::TypeInfo; + case Attributes::RemainingScreenTime::Id: { + using TypeInfo = Attributes::RemainingScreenTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30678,11 +36600,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, 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::AllowedVendorList::Id: { - using TypeInfo = Attributes::AllowedVendorList::TypeInfo; + case Attributes::BlockUnrated::Id: { + using TypeInfo = Attributes::BlockUnrated::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -30690,20 +36616,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -30844,8 +36761,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::AccountLogin::Id: { - using namespace app::Clusters::AccountLogin; + case app::Clusters::ContentAppObserver::Id: { + using namespace app::Clusters::ContentAppObserver; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 4d184fde752dc6..4ba2a2d93b7451 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -44,6 +44,9 @@ typedef void (*GroupsEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesFabricSceneInfoListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, @@ -471,19 +474,48 @@ typedef void (*IcdManagementEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IcdManagementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenOperationalStatePhaseListListAttributeCallback)( +typedef void (*TimerGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TimerAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TimerEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TimerAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenCavityOperationalStatePhaseListListAttributeCallback)( void * context, const chip::app::DataModel::Nullable> & data); -typedef void (*OvenOperationalStateOperationalStateListListAttributeCallback)( +typedef void (*OvenCavityOperationalStateOperationalStateListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenOperationalState::Structs::OperationalStateStruct::DecodableType> & data); -typedef void (*OvenOperationalStateGeneratedCommandListListAttributeCallback)( + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & data); +typedef void (*OvenCavityOperationalStateGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenOperationalStateAcceptedCommandListListAttributeCallback)( +typedef void (*OvenCavityOperationalStateAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenOperationalStateEventListListAttributeCallback)(void * context, +typedef void (*OvenCavityOperationalStateEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OvenCavityOperationalStateAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryDryerControlsSupportedDrynessLevelsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryDryerControlsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryDryerControlsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryDryerControlsEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*OvenOperationalStateAttributeListListAttributeCallback)( +typedef void (*LaundryDryerControlsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, @@ -681,6 +713,70 @@ typedef void (*ActivatedCarbonFilterMonitoringEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalEnergyMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalEnergyMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalEnergyMeasurementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalEnergyMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DemandResponseLoadControlLoadControlProgramsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> & data); +typedef void (*DemandResponseLoadControlEventsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & data); +typedef void (*DemandResponseLoadControlActiveEventsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & data); +typedef void (*DemandResponseLoadControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DemandResponseLoadControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DemandResponseLoadControlEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DemandResponseLoadControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DeviceEnergyManagementPowerAdjustmentCapabilityListAttributeCallback)( + void * context, + const chip::app::DataModel::Nullable> & data); +typedef void (*DeviceEnergyManagementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DeviceEnergyManagementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DeviceEnergyManagementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DeviceEnergyManagementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EnergyEvseGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EnergyEvseAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EnergyEvseEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*EnergyEvseAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, @@ -912,6 +1008,14 @@ typedef void (*TargetNavigatorEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaPlaybackAvailableAudioTracksListAttributeCallback)( + void * context, + const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> & data); +typedef void (*MediaPlaybackAvailableTextTracksListAttributeCallback)( + void * context, + const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> & data); typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( @@ -996,6 +1100,30 @@ typedef void (*AccountLoginEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentControlOnDemandRatingsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*ContentControlScheduledContentRatingsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*ContentControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ContentControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentAppObserverGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentAppObserverAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentAppObserverEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ContentAppObserverAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 815a0f67f35432..ed6b539e8539f3 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2479,8 +2479,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::OvenOperationalState::Id: { - using namespace app::Clusters::OvenOperationalState; + case app::Clusters::Timer::Id: { + using namespace app::Clusters::Timer; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::OvenCavityOperationalState::Id: { + using namespace app::Clusters::OvenCavityOperationalState; switch (aPath.mEventId) { case Events::OperationalError::Id: { @@ -2527,18 +2537,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenOperationalStateClusterErrorStateStruct", + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenOperationalStateClusterErrorStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); return nullptr; } jmethodID errorStateStructStructCtor_0 = env->GetMethodID( errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); if (errorStateStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenOperationalStateClusterErrorStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); return nullptr; } @@ -2548,19 +2558,20 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jclass operationalErrorStructClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipEventStructs$OvenOperationalStateClusterOperationalErrorEvent", + env, "chip/devicecontroller/ChipEventStructs$OvenCavityOperationalStateClusterOperationalErrorEvent", operationalErrorStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipEventStructs$OvenOperationalStateClusterOperationalErrorEvent"); + ChipLogError(Zcl, "Could not find class ChipEventStructs$OvenCavityOperationalStateClusterOperationalErrorEvent"); return nullptr; } jmethodID operationalErrorStructCtor = env->GetMethodID(operationalErrorStructClass, "", - "(Lchip/devicecontroller/ChipStructs$OvenOperationalStateClusterErrorStateStruct;)V"); + "(Lchip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct;)V"); if (operationalErrorStructCtor == nullptr) { - ChipLogError(Zcl, "Could not find ChipEventStructs$OvenOperationalStateClusterOperationalErrorEvent constructor"); + ChipLogError(Zcl, + "Could not find ChipEventStructs$OvenCavityOperationalStateClusterOperationalErrorEvent constructor"); return nullptr; } @@ -2636,19 +2647,20 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jclass operationCompletionStructClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipEventStructs$OvenOperationalStateClusterOperationCompletionEvent", + env, "chip/devicecontroller/ChipEventStructs$OvenCavityOperationalStateClusterOperationCompletionEvent", operationCompletionStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipEventStructs$OvenOperationalStateClusterOperationCompletionEvent"); + ChipLogError(Zcl, + "Could not find class ChipEventStructs$OvenCavityOperationalStateClusterOperationCompletionEvent"); return nullptr; } jmethodID operationCompletionStructCtor = env->GetMethodID( operationCompletionStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); if (operationCompletionStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipEventStructs$OvenOperationalStateClusterOperationCompletionEvent constructor"); + ChipLogError( + Zcl, "Could not find ChipEventStructs$OvenCavityOperationalStateClusterOperationCompletionEvent constructor"); return nullptr; } @@ -2663,6 +2675,26 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::OvenMode::Id: { + using namespace app::Clusters::OvenMode; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::LaundryDryerControls::Id: { + using namespace app::Clusters::LaundryDryerControls; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::ModeSelect::Id: { using namespace app::Clusters::ModeSelect; switch (aPath.mEventId) @@ -3559,72 +3591,1778 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_totalOperationalTime); } - jobject value_pausedTime; - if (!cppValue.pausedTime.HasValue()) + jobject value_pausedTime; + if (!cppValue.pausedTime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_pausedTime); + } + else + { + jobject value_pausedTimeInsideOptional; + if (cppValue.pausedTime.Value().IsNull()) + { + value_pausedTimeInsideOptional = nullptr; + } + else + { + std::string value_pausedTimeInsideOptionalClassName = "java/lang/Long"; + std::string value_pausedTimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_pausedTimeInsideOptional = static_cast(cppValue.pausedTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_pausedTimeInsideOptionalClassName.c_str(), value_pausedTimeInsideOptionalCtorSignature.c_str(), + jnivalue_pausedTimeInsideOptional, value_pausedTimeInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional(value_pausedTimeInsideOptional, value_pausedTime); + } + + jclass operationCompletionStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent", + operationCompletionStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent"); + return nullptr; + } + jmethodID operationCompletionStructCtor = env->GetMethodID( + operationCompletionStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (operationCompletionStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(operationCompletionStructClass, operationCompletionStructCtor, value_completionErrorCode, + value_totalOperationalTime, value_pausedTime); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::HepaFilterMonitoring::Id: { + using namespace app::Clusters::HepaFilterMonitoring; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { + using namespace app::Clusters::ActivatedCarbonFilterMonitoring; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::BooleanStateConfiguration::Id: { + using namespace app::Clusters::BooleanStateConfiguration; + switch (aPath.mEventId) + { + case Events::AlarmsStateChanged::Id: { + Events::AlarmsStateChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_alarmsActive; + std::string value_alarmsActiveClassName = "java/lang/Integer"; + std::string value_alarmsActiveCtorSignature = "(I)V"; + jint jnivalue_alarmsActive = static_cast(cppValue.alarmsActive.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmsActiveClassName.c_str(), + value_alarmsActiveCtorSignature.c_str(), + jnivalue_alarmsActive, value_alarmsActive); + + jobject value_alarmsSuppressed; + if (!cppValue.alarmsSuppressed.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_alarmsSuppressed); + } + else + { + jobject value_alarmsSuppressedInsideOptional; + std::string value_alarmsSuppressedInsideOptionalClassName = "java/lang/Integer"; + std::string value_alarmsSuppressedInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_alarmsSuppressedInsideOptional = static_cast(cppValue.alarmsSuppressed.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmsSuppressedInsideOptionalClassName.c_str(), + value_alarmsSuppressedInsideOptionalCtorSignature.c_str(), jnivalue_alarmsSuppressedInsideOptional, + value_alarmsSuppressedInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_alarmsSuppressedInsideOptional, value_alarmsSuppressed); + } + + jclass alarmsStateChangedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent", + alarmsStateChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent"); + return nullptr; + } + jmethodID alarmsStateChangedStructCtor = + env->GetMethodID(alarmsStateChangedStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (alarmsStateChangedStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(alarmsStateChangedStructClass, alarmsStateChangedStructCtor, value_alarmsActive, + value_alarmsSuppressed); + + return value; + } + case Events::SensorFault::Id: { + Events::SensorFault::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_sensorFault; + std::string value_sensorFaultClassName = "java/lang/Integer"; + std::string value_sensorFaultCtorSignature = "(I)V"; + jint jnivalue_sensorFault = static_cast(cppValue.sensorFault.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorFaultClassName.c_str(), + value_sensorFaultCtorSignature.c_str(), jnivalue_sensorFault, + value_sensorFault); + + jclass sensorFaultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent", + sensorFaultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent"); + return nullptr; + } + jmethodID sensorFaultStructCtor = env->GetMethodID(sensorFaultStructClass, "", "(Ljava/lang/Integer;)V"); + if (sensorFaultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor, value_sensorFault); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ValveConfigurationAndControl::Id: { + using namespace app::Clusters::ValveConfigurationAndControl; + switch (aPath.mEventId) + { + case Events::ValveStateChanged::Id: { + Events::ValveStateChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_valveState; + std::string value_valveStateClassName = "java/lang/Integer"; + std::string value_valveStateCtorSignature = "(I)V"; + jint jnivalue_valveState = static_cast(cppValue.valveState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_valveStateClassName.c_str(), value_valveStateCtorSignature.c_str(), jnivalue_valveState, value_valveState); + + jobject value_valveLevel; + if (!cppValue.valveLevel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_valveLevel); + } + else + { + jobject value_valveLevelInsideOptional; + std::string value_valveLevelInsideOptionalClassName = "java/lang/Integer"; + std::string value_valveLevelInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_valveLevelInsideOptional = static_cast(cppValue.valveLevel.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_valveLevelInsideOptionalClassName.c_str(), value_valveLevelInsideOptionalCtorSignature.c_str(), + jnivalue_valveLevelInsideOptional, value_valveLevelInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_valveLevelInsideOptional, value_valveLevel); + } + + jclass valveStateChangedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent", + valveStateChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent"); + return nullptr; + } + jmethodID valveStateChangedStructCtor = + env->GetMethodID(valveStateChangedStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (valveStateChangedStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(valveStateChangedStructClass, valveStateChangedStructCtor, value_valveState, value_valveLevel); + + return value; + } + case Events::ValveFault::Id: { + Events::ValveFault::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_valveFault; + std::string value_valveFaultClassName = "java/lang/Integer"; + std::string value_valveFaultCtorSignature = "(I)V"; + jint jnivalue_valveFault = static_cast(cppValue.valveFault.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_valveFaultClassName.c_str(), value_valveFaultCtorSignature.c_str(), jnivalue_valveFault, value_valveFault); + + jclass valveFaultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent", + valveFaultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent"); + return nullptr; + } + jmethodID valveFaultStructCtor = env->GetMethodID(valveFaultStructClass, "", "(Ljava/lang/Integer;)V"); + if (valveFaultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(valveFaultStructClass, valveFaultStructCtor, value_valveFault); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ElectricalEnergyMeasurement::Id: { + using namespace app::Clusters::ElectricalEnergyMeasurement; + switch (aPath.mEventId) + { + case Events::CumulativeEnergyMeasured::Id: { + Events::CumulativeEnergyMeasured::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_energyImported; + if (!cppValue.energyImported.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImported); + } + else + { + jobject value_energyImportedInsideOptional; + jobject value_energyImportedInsideOptional_energy; + std::string value_energyImportedInsideOptional_energyClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_energyCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_energy = static_cast(cppValue.energyImported.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_energyClassName.c_str(), + value_energyImportedInsideOptional_energyCtorSignature.c_str(), jnivalue_energyImportedInsideOptional_energy, + value_energyImportedInsideOptional_energy); + jobject value_energyImportedInsideOptional_startTimestamp; + if (!cppValue.energyImported.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_startTimestamp); + } + else + { + jobject value_energyImportedInsideOptional_startTimestampInsideOptional; + std::string value_energyImportedInsideOptional_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_startTimestampInsideOptional = + static_cast(cppValue.energyImported.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_startTimestampInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_startTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_startTimestampInsideOptional, + value_energyImportedInsideOptional_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional( + value_energyImportedInsideOptional_startTimestampInsideOptional, + value_energyImportedInsideOptional_startTimestamp); + } + jobject value_energyImportedInsideOptional_endTimestamp; + if (!cppValue.energyImported.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_endTimestamp); + } + else + { + jobject value_energyImportedInsideOptional_endTimestampInsideOptional; + std::string value_energyImportedInsideOptional_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_endTimestampInsideOptional = + static_cast(cppValue.energyImported.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_endTimestampInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_endTimestampInsideOptional, + value_energyImportedInsideOptional_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_endTimestampInsideOptional, + value_energyImportedInsideOptional_endTimestamp); + } + jobject value_energyImportedInsideOptional_startSystime; + if (!cppValue.energyImported.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_startSystime); + } + else + { + jobject value_energyImportedInsideOptional_startSystimeInsideOptional; + std::string value_energyImportedInsideOptional_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_startSystimeInsideOptional = + static_cast(cppValue.energyImported.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_startSystimeInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_startSystimeInsideOptional, + value_energyImportedInsideOptional_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_startSystimeInsideOptional, + value_energyImportedInsideOptional_startSystime); + } + jobject value_energyImportedInsideOptional_endSystime; + if (!cppValue.energyImported.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_endSystime); + } + else + { + jobject value_energyImportedInsideOptional_endSystimeInsideOptional; + std::string value_energyImportedInsideOptional_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_endSystimeInsideOptional = + static_cast(cppValue.energyImported.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_endSystimeInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_endSystimeInsideOptional, + value_energyImportedInsideOptional_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_endSystimeInsideOptional, + value_energyImportedInsideOptional_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value_energyImportedInsideOptional = + env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, + value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, + value_energyImportedInsideOptional_endSystime); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional, value_energyImported); + } + + jobject value_energyExported; + if (!cppValue.energyExported.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExported); + } + else + { + jobject value_energyExportedInsideOptional; + jobject value_energyExportedInsideOptional_energy; + std::string value_energyExportedInsideOptional_energyClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_energyCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_energy = static_cast(cppValue.energyExported.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_energyClassName.c_str(), + value_energyExportedInsideOptional_energyCtorSignature.c_str(), jnivalue_energyExportedInsideOptional_energy, + value_energyExportedInsideOptional_energy); + jobject value_energyExportedInsideOptional_startTimestamp; + if (!cppValue.energyExported.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_startTimestamp); + } + else + { + jobject value_energyExportedInsideOptional_startTimestampInsideOptional; + std::string value_energyExportedInsideOptional_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_startTimestampInsideOptional = + static_cast(cppValue.energyExported.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_startTimestampInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_startTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_startTimestampInsideOptional, + value_energyExportedInsideOptional_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional( + value_energyExportedInsideOptional_startTimestampInsideOptional, + value_energyExportedInsideOptional_startTimestamp); + } + jobject value_energyExportedInsideOptional_endTimestamp; + if (!cppValue.energyExported.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_endTimestamp); + } + else + { + jobject value_energyExportedInsideOptional_endTimestampInsideOptional; + std::string value_energyExportedInsideOptional_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_endTimestampInsideOptional = + static_cast(cppValue.energyExported.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_endTimestampInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_endTimestampInsideOptional, + value_energyExportedInsideOptional_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_endTimestampInsideOptional, + value_energyExportedInsideOptional_endTimestamp); + } + jobject value_energyExportedInsideOptional_startSystime; + if (!cppValue.energyExported.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_startSystime); + } + else + { + jobject value_energyExportedInsideOptional_startSystimeInsideOptional; + std::string value_energyExportedInsideOptional_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_startSystimeInsideOptional = + static_cast(cppValue.energyExported.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_startSystimeInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_startSystimeInsideOptional, + value_energyExportedInsideOptional_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_startSystimeInsideOptional, + value_energyExportedInsideOptional_startSystime); + } + jobject value_energyExportedInsideOptional_endSystime; + if (!cppValue.energyExported.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_endSystime); + } + else + { + jobject value_energyExportedInsideOptional_endSystimeInsideOptional; + std::string value_energyExportedInsideOptional_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_endSystimeInsideOptional = + static_cast(cppValue.energyExported.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_endSystimeInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_endSystimeInsideOptional, + value_energyExportedInsideOptional_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_endSystimeInsideOptional, + value_energyExportedInsideOptional_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value_energyExportedInsideOptional = + env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, + value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, + value_energyExportedInsideOptional_endSystime); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional, value_energyExported); + } + + jclass cumulativeEnergyMeasuredStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent", + cumulativeEnergyMeasuredStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipEventStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent"); + return nullptr; + } + jmethodID cumulativeEnergyMeasuredStructCtor = + env->GetMethodID(cumulativeEnergyMeasuredStructClass, "", "(Ljava/util/Optional;Ljava/util/Optional;)V"); + if (cumulativeEnergyMeasuredStructCtor == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipEventStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(cumulativeEnergyMeasuredStructClass, cumulativeEnergyMeasuredStructCtor, + value_energyImported, value_energyExported); + + return value; + } + case Events::PeriodicEnergyMeasured::Id: { + Events::PeriodicEnergyMeasured::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_energyImported; + if (!cppValue.energyImported.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImported); + } + else + { + jobject value_energyImportedInsideOptional; + jobject value_energyImportedInsideOptional_energy; + std::string value_energyImportedInsideOptional_energyClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_energyCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_energy = static_cast(cppValue.energyImported.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_energyClassName.c_str(), + value_energyImportedInsideOptional_energyCtorSignature.c_str(), jnivalue_energyImportedInsideOptional_energy, + value_energyImportedInsideOptional_energy); + jobject value_energyImportedInsideOptional_startTimestamp; + if (!cppValue.energyImported.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_startTimestamp); + } + else + { + jobject value_energyImportedInsideOptional_startTimestampInsideOptional; + std::string value_energyImportedInsideOptional_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_startTimestampInsideOptional = + static_cast(cppValue.energyImported.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_startTimestampInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_startTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_startTimestampInsideOptional, + value_energyImportedInsideOptional_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional( + value_energyImportedInsideOptional_startTimestampInsideOptional, + value_energyImportedInsideOptional_startTimestamp); + } + jobject value_energyImportedInsideOptional_endTimestamp; + if (!cppValue.energyImported.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_endTimestamp); + } + else + { + jobject value_energyImportedInsideOptional_endTimestampInsideOptional; + std::string value_energyImportedInsideOptional_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_endTimestampInsideOptional = + static_cast(cppValue.energyImported.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_endTimestampInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_endTimestampInsideOptional, + value_energyImportedInsideOptional_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_endTimestampInsideOptional, + value_energyImportedInsideOptional_endTimestamp); + } + jobject value_energyImportedInsideOptional_startSystime; + if (!cppValue.energyImported.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_startSystime); + } + else + { + jobject value_energyImportedInsideOptional_startSystimeInsideOptional; + std::string value_energyImportedInsideOptional_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_startSystimeInsideOptional = + static_cast(cppValue.energyImported.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_startSystimeInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_startSystimeInsideOptional, + value_energyImportedInsideOptional_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_startSystimeInsideOptional, + value_energyImportedInsideOptional_startSystime); + } + jobject value_energyImportedInsideOptional_endSystime; + if (!cppValue.energyImported.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyImportedInsideOptional_endSystime); + } + else + { + jobject value_energyImportedInsideOptional_endSystimeInsideOptional; + std::string value_energyImportedInsideOptional_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyImportedInsideOptional_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyImportedInsideOptional_endSystimeInsideOptional = + static_cast(cppValue.energyImported.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyImportedInsideOptional_endSystimeInsideOptionalClassName.c_str(), + value_energyImportedInsideOptional_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyImportedInsideOptional_endSystimeInsideOptional, + value_energyImportedInsideOptional_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional_endSystimeInsideOptional, + value_energyImportedInsideOptional_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value_energyImportedInsideOptional = + env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, + value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, + value_energyImportedInsideOptional_endSystime); + chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional, value_energyImported); + } + + jobject value_energyExported; + if (!cppValue.energyExported.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExported); + } + else + { + jobject value_energyExportedInsideOptional; + jobject value_energyExportedInsideOptional_energy; + std::string value_energyExportedInsideOptional_energyClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_energyCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_energy = static_cast(cppValue.energyExported.Value().energy); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_energyClassName.c_str(), + value_energyExportedInsideOptional_energyCtorSignature.c_str(), jnivalue_energyExportedInsideOptional_energy, + value_energyExportedInsideOptional_energy); + jobject value_energyExportedInsideOptional_startTimestamp; + if (!cppValue.energyExported.Value().startTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_startTimestamp); + } + else + { + jobject value_energyExportedInsideOptional_startTimestampInsideOptional; + std::string value_energyExportedInsideOptional_startTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_startTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_startTimestampInsideOptional = + static_cast(cppValue.energyExported.Value().startTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_startTimestampInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_startTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_startTimestampInsideOptional, + value_energyExportedInsideOptional_startTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional( + value_energyExportedInsideOptional_startTimestampInsideOptional, + value_energyExportedInsideOptional_startTimestamp); + } + jobject value_energyExportedInsideOptional_endTimestamp; + if (!cppValue.energyExported.Value().endTimestamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_endTimestamp); + } + else + { + jobject value_energyExportedInsideOptional_endTimestampInsideOptional; + std::string value_energyExportedInsideOptional_endTimestampInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_endTimestampInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_endTimestampInsideOptional = + static_cast(cppValue.energyExported.Value().endTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_endTimestampInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_endTimestampInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_endTimestampInsideOptional, + value_energyExportedInsideOptional_endTimestampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_endTimestampInsideOptional, + value_energyExportedInsideOptional_endTimestamp); + } + jobject value_energyExportedInsideOptional_startSystime; + if (!cppValue.energyExported.Value().startSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_startSystime); + } + else + { + jobject value_energyExportedInsideOptional_startSystimeInsideOptional; + std::string value_energyExportedInsideOptional_startSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_startSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_startSystimeInsideOptional = + static_cast(cppValue.energyExported.Value().startSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_startSystimeInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_startSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_startSystimeInsideOptional, + value_energyExportedInsideOptional_startSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_startSystimeInsideOptional, + value_energyExportedInsideOptional_startSystime); + } + jobject value_energyExportedInsideOptional_endSystime; + if (!cppValue.energyExported.Value().endSystime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_energyExportedInsideOptional_endSystime); + } + else + { + jobject value_energyExportedInsideOptional_endSystimeInsideOptional; + std::string value_energyExportedInsideOptional_endSystimeInsideOptionalClassName = "java/lang/Long"; + std::string value_energyExportedInsideOptional_endSystimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_energyExportedInsideOptional_endSystimeInsideOptional = + static_cast(cppValue.energyExported.Value().endSystime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyExportedInsideOptional_endSystimeInsideOptionalClassName.c_str(), + value_energyExportedInsideOptional_endSystimeInsideOptionalCtorSignature.c_str(), + jnivalue_energyExportedInsideOptional_endSystimeInsideOptional, + value_energyExportedInsideOptional_endSystimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional_endSystimeInsideOptional, + value_energyExportedInsideOptional_endSystime); + } + + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } + jmethodID energyMeasurementStructStructCtor_1 = env->GetMethodID( + energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } + + value_energyExportedInsideOptional = + env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, + value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, + value_energyExportedInsideOptional_endSystime); + chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional, value_energyExported); + } + + jclass periodicEnergyMeasuredStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent", + periodicEnergyMeasuredStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipEventStructs$ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent"); + return nullptr; + } + jmethodID periodicEnergyMeasuredStructCtor = + env->GetMethodID(periodicEnergyMeasuredStructClass, "", "(Ljava/util/Optional;Ljava/util/Optional;)V"); + if (periodicEnergyMeasuredStructCtor == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipEventStructs$ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(periodicEnergyMeasuredStructClass, periodicEnergyMeasuredStructCtor, + value_energyImported, value_energyExported); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::DemandResponseLoadControl::Id: { + using namespace app::Clusters::DemandResponseLoadControl; + switch (aPath.mEventId) + { + case Events::LoadControlEventStatusChange::Id: { + Events::LoadControlEventStatusChange::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_eventID; + jbyteArray value_eventIDByteArray = env->NewByteArray(static_cast(cppValue.eventID.size())); + env->SetByteArrayRegion(value_eventIDByteArray, 0, static_cast(cppValue.eventID.size()), + reinterpret_cast(cppValue.eventID.data())); + value_eventID = value_eventIDByteArray; + + jobject value_transitionIndex; + if (cppValue.transitionIndex.IsNull()) + { + value_transitionIndex = nullptr; + } + else + { + std::string value_transitionIndexClassName = "java/lang/Integer"; + std::string value_transitionIndexCtorSignature = "(I)V"; + jint jnivalue_transitionIndex = static_cast(cppValue.transitionIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_transitionIndexClassName.c_str(), + value_transitionIndexCtorSignature.c_str(), + jnivalue_transitionIndex, value_transitionIndex); + } + + jobject value_status; + std::string value_statusClassName = "java/lang/Integer"; + std::string value_statusCtorSignature = "(I)V"; + jint jnivalue_status = static_cast(cppValue.status); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_statusClassName.c_str(), value_statusCtorSignature.c_str(), jnivalue_status, value_status); + + jobject value_criticality; + std::string value_criticalityClassName = "java/lang/Integer"; + std::string value_criticalityCtorSignature = "(I)V"; + jint jnivalue_criticality = static_cast(cppValue.criticality); + chip::JniReferences::GetInstance().CreateBoxedObject(value_criticalityClassName.c_str(), + value_criticalityCtorSignature.c_str(), jnivalue_criticality, + value_criticality); + + jobject value_control; + std::string value_controlClassName = "java/lang/Integer"; + std::string value_controlCtorSignature = "(I)V"; + jint jnivalue_control = static_cast(cppValue.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_controlClassName.c_str(), value_controlCtorSignature.c_str(), jnivalue_control, value_control); + + jobject value_temperatureControl; + if (!cppValue.temperatureControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_temperatureControl); + } + else + { + jobject value_temperatureControlInsideOptional; + if (cppValue.temperatureControl.Value().IsNull()) + { + value_temperatureControlInsideOptional = nullptr; + } + else + { + jobject value_temperatureControlInsideOptional_coolingTempOffset; + if (!cppValue.temperatureControl.Value().Value().coolingTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, + value_temperatureControlInsideOptional_coolingTempOffset); + } + else + { + jobject value_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; + if (cppValue.temperatureControl.Value().Value().coolingTempOffset.Value().IsNull()) + { + value_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; + } + else + { + std::string value_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string value_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jnivalue_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = + static_cast(cppValue.temperatureControl.Value().Value().coolingTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), + value_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature.c_str(), + jnivalue_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + value_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + value_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + value_temperatureControlInsideOptional_coolingTempOffset); + } + jobject value_temperatureControlInsideOptional_heatingtTempOffset; + if (!cppValue.temperatureControl.Value().Value().heatingtTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, value_temperatureControlInsideOptional_heatingtTempOffset); + } + else + { + jobject value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; + if (cppValue.temperatureControl.Value().Value().heatingtTempOffset.Value().IsNull()) + { + value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; + } + else + { + std::string value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jnivalue_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = + static_cast(cppValue.temperatureControl.Value().Value().heatingtTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), + value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature.c_str(), + jnivalue_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + value_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + value_temperatureControlInsideOptional_heatingtTempOffset); + } + jobject value_temperatureControlInsideOptional_coolingTempSetpoint; + if (!cppValue.temperatureControl.Value().Value().coolingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, value_temperatureControlInsideOptional_coolingTempSetpoint); + } + else + { + jobject value_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; + if (cppValue.temperatureControl.Value().Value().coolingTempSetpoint.Value().IsNull()) + { + value_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; + } + else + { + std::string value_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string value_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jnivalue_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = + static_cast(cppValue.temperatureControl.Value().Value().coolingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName.c_str(), + value_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature.c_str(), + jnivalue_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + value_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + value_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + value_temperatureControlInsideOptional_coolingTempSetpoint); + } + jobject value_temperatureControlInsideOptional_heatingTempSetpoint; + if (!cppValue.temperatureControl.Value().Value().heatingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, value_temperatureControlInsideOptional_heatingTempSetpoint); + } + else + { + jobject value_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; + if (cppValue.temperatureControl.Value().Value().heatingTempSetpoint.Value().IsNull()) + { + value_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; + } + else + { + std::string value_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string value_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jnivalue_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = + static_cast(cppValue.temperatureControl.Value().Value().heatingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName.c_str(), + value_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature.c_str(), + jnivalue_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + value_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + value_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + value_temperatureControlInsideOptional_heatingTempSetpoint); + } + + jclass temperatureControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } + jmethodID temperatureControlStructStructCtor_2 = + env->GetMethodID(temperatureControlStructStructClass_2, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (temperatureControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return nullptr; + } + + value_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_2, temperatureControlStructStructCtor_2, + value_temperatureControlInsideOptional_coolingTempOffset, + value_temperatureControlInsideOptional_heatingtTempOffset, + value_temperatureControlInsideOptional_coolingTempSetpoint, + value_temperatureControlInsideOptional_heatingTempSetpoint); + } + chip::JniReferences::GetInstance().CreateOptional(value_temperatureControlInsideOptional, value_temperatureControl); + } + + jobject value_averageLoadControl; + if (!cppValue.averageLoadControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_averageLoadControl); + } + else + { + jobject value_averageLoadControlInsideOptional; + if (cppValue.averageLoadControl.Value().IsNull()) + { + value_averageLoadControlInsideOptional = nullptr; + } + else + { + jobject value_averageLoadControlInsideOptional_loadAdjustment; + std::string value_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; + std::string value_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; + jint jnivalue_averageLoadControlInsideOptional_loadAdjustment = + static_cast(cppValue.averageLoadControl.Value().Value().loadAdjustment); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), + value_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), + jnivalue_averageLoadControlInsideOptional_loadAdjustment, + value_averageLoadControlInsideOptional_loadAdjustment); + + jclass averageLoadControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } + jmethodID averageLoadControlStructStructCtor_2 = + env->GetMethodID(averageLoadControlStructStructClass_2, "", "(Ljava/lang/Integer;)V"); + if (averageLoadControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return nullptr; + } + + value_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_2, averageLoadControlStructStructCtor_2, + value_averageLoadControlInsideOptional_loadAdjustment); + } + chip::JniReferences::GetInstance().CreateOptional(value_averageLoadControlInsideOptional, value_averageLoadControl); + } + + jobject value_dutyCycleControl; + if (!cppValue.dutyCycleControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_dutyCycleControl); + } + else + { + jobject value_dutyCycleControlInsideOptional; + if (cppValue.dutyCycleControl.Value().IsNull()) + { + value_dutyCycleControlInsideOptional = nullptr; + } + else + { + jobject value_dutyCycleControlInsideOptional_dutyCycle; + std::string value_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; + std::string value_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; + jint jnivalue_dutyCycleControlInsideOptional_dutyCycle = + static_cast(cppValue.dutyCycleControl.Value().Value().dutyCycle); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), + value_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), + jnivalue_dutyCycleControlInsideOptional_dutyCycle, value_dutyCycleControlInsideOptional_dutyCycle); + + jclass dutyCycleControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } + jmethodID dutyCycleControlStructStructCtor_2 = + env->GetMethodID(dutyCycleControlStructStructClass_2, "", "(Ljava/lang/Integer;)V"); + if (dutyCycleControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return nullptr; + } + + value_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_2, dutyCycleControlStructStructCtor_2, + value_dutyCycleControlInsideOptional_dutyCycle); + } + chip::JniReferences::GetInstance().CreateOptional(value_dutyCycleControlInsideOptional, value_dutyCycleControl); + } + + jobject value_powerSavingsControl; + if (!cppValue.powerSavingsControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_powerSavingsControl); + } + else + { + jobject value_powerSavingsControlInsideOptional; + if (cppValue.powerSavingsControl.Value().IsNull()) + { + value_powerSavingsControlInsideOptional = nullptr; + } + else + { + jobject value_powerSavingsControlInsideOptional_powerSavings; + std::string value_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; + std::string value_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; + jint jnivalue_powerSavingsControlInsideOptional_powerSavings = + static_cast(cppValue.powerSavingsControl.Value().Value().powerSavings); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), + value_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), + jnivalue_powerSavingsControlInsideOptional_powerSavings, + value_powerSavingsControlInsideOptional_powerSavings); + + jclass powerSavingsControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } + jmethodID powerSavingsControlStructStructCtor_2 = + env->GetMethodID(powerSavingsControlStructStructClass_2, "", "(Ljava/lang/Integer;)V"); + if (powerSavingsControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return nullptr; + } + + value_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_2, powerSavingsControlStructStructCtor_2, + value_powerSavingsControlInsideOptional_powerSavings); + } + chip::JniReferences::GetInstance().CreateOptional(value_powerSavingsControlInsideOptional, + value_powerSavingsControl); + } + + jobject value_heatingSourceControl; + if (!cppValue.heatingSourceControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_heatingSourceControl); + } + else + { + jobject value_heatingSourceControlInsideOptional; + if (cppValue.heatingSourceControl.Value().IsNull()) + { + value_heatingSourceControlInsideOptional = nullptr; + } + else + { + jobject value_heatingSourceControlInsideOptional_heatingSource; + std::string value_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; + std::string value_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; + jint jnivalue_heatingSourceControlInsideOptional_heatingSource = + static_cast(cppValue.heatingSourceControl.Value().Value().heatingSource); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), + value_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), + jnivalue_heatingSourceControlInsideOptional_heatingSource, + value_heatingSourceControlInsideOptional_heatingSource); + + jclass heatingSourceControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } + jmethodID heatingSourceControlStructStructCtor_2 = + env->GetMethodID(heatingSourceControlStructStructClass_2, "", "(Ljava/lang/Integer;)V"); + if (heatingSourceControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); + return nullptr; + } + + value_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_2, heatingSourceControlStructStructCtor_2, + value_heatingSourceControlInsideOptional_heatingSource); + } + chip::JniReferences::GetInstance().CreateOptional(value_heatingSourceControlInsideOptional, + value_heatingSourceControl); + } + + jclass loadControlEventStatusChangeStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent", + loadControlEventStatusChangeStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipEventStructs$DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent"); + return nullptr; + } + jmethodID loadControlEventStatusChangeStructCtor = + env->GetMethodID(loadControlEventStatusChangeStructClass, "", + "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (loadControlEventStatusChangeStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent " + "constructor"); + return nullptr; + } + + jobject value = env->NewObject(loadControlEventStatusChangeStructClass, loadControlEventStatusChangeStructCtor, + value_eventID, value_transitionIndex, value_status, value_criticality, value_control, + value_temperatureControl, value_averageLoadControl, value_dutyCycleControl, + value_powerSavingsControl, value_heatingSourceControl); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::DeviceEnergyManagement::Id: { + using namespace app::Clusters::DeviceEnergyManagement; + switch (aPath.mEventId) + { + case Events::PowerAdjustStart::Id: { + Events::PowerAdjustStart::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass powerAdjustStartStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustStartEvent", + powerAdjustStartStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustStartEvent"); + return nullptr; + } + jmethodID powerAdjustStartStructCtor = env->GetMethodID(powerAdjustStartStructClass, "", "()V"); + if (powerAdjustStartStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustStartEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(powerAdjustStartStructClass, powerAdjustStartStructCtor); + + return value; + } + case Events::PowerAdjustEnd::Id: { + Events::PowerAdjustEnd::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_cause; + std::string value_causeClassName = "java/lang/Integer"; + std::string value_causeCtorSignature = "(I)V"; + jint jnivalue_cause = static_cast(cppValue.cause); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_causeClassName.c_str(), value_causeCtorSignature.c_str(), jnivalue_cause, value_cause); + + jobject value_duration; + std::string value_durationClassName = "java/lang/Long"; + std::string value_durationCtorSignature = "(J)V"; + jlong jnivalue_duration = static_cast(cppValue.duration); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_durationClassName.c_str(), value_durationCtorSignature.c_str(), jnivalue_duration, value_duration); + + jobject value_energyUse; + std::string value_energyUseClassName = "java/lang/Long"; + std::string value_energyUseCtorSignature = "(J)V"; + jlong jnivalue_energyUse = static_cast(cppValue.energyUse); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_energyUseClassName.c_str(), value_energyUseCtorSignature.c_str(), jnivalue_energyUse, value_energyUse); + + jclass powerAdjustEndStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustEndEvent", + powerAdjustEndStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustEndEvent"); + return nullptr; + } + jmethodID powerAdjustEndStructCtor = + env->GetMethodID(powerAdjustEndStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (powerAdjustEndStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$DeviceEnergyManagementClusterPowerAdjustEndEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(powerAdjustEndStructClass, powerAdjustEndStructCtor, value_cause, value_duration, value_energyUse); + + return value; + } + case Events::Paused::Id: { + Events::Paused::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass pausedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DeviceEnergyManagementClusterPausedEvent", pausedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$DeviceEnergyManagementClusterPausedEvent"); + return nullptr; + } + jmethodID pausedStructCtor = env->GetMethodID(pausedStructClass, "", "()V"); + if (pausedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$DeviceEnergyManagementClusterPausedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(pausedStructClass, pausedStructCtor); + + return value; + } + case Events::Resumed::Id: { + Events::Resumed::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass resumedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DeviceEnergyManagementClusterResumedEvent", resumedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$DeviceEnergyManagementClusterResumedEvent"); + return nullptr; + } + jmethodID resumedStructCtor = env->GetMethodID(resumedStructClass, "", "()V"); + if (resumedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$DeviceEnergyManagementClusterResumedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(resumedStructClass, resumedStructCtor); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::EnergyEvse::Id: { + using namespace app::Clusters::EnergyEvse; + switch (aPath.mEventId) + { + case Events::EVConnected::Id: { + Events::EVConnected::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_sessionID; + std::string value_sessionIDClassName = "java/lang/Long"; + std::string value_sessionIDCtorSignature = "(J)V"; + jlong jnivalue_sessionID = static_cast(cppValue.sessionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionIDClassName.c_str(), value_sessionIDCtorSignature.c_str(), jnivalue_sessionID, value_sessionID); + + jclass EVConnectedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterEVConnectedEvent", EVConnectedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterEVConnectedEvent"); + return nullptr; + } + jmethodID EVConnectedStructCtor = env->GetMethodID(EVConnectedStructClass, "", "(Ljava/lang/Long;)V"); + if (EVConnectedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterEVConnectedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(EVConnectedStructClass, EVConnectedStructCtor, value_sessionID); + + return value; + } + case Events::EVNotDetected::Id: { + Events::EVNotDetected::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_sessionID; + std::string value_sessionIDClassName = "java/lang/Long"; + std::string value_sessionIDCtorSignature = "(J)V"; + jlong jnivalue_sessionID = static_cast(cppValue.sessionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionIDClassName.c_str(), value_sessionIDCtorSignature.c_str(), jnivalue_sessionID, value_sessionID); + + jobject value_state; + std::string value_stateClassName = "java/lang/Integer"; + std::string value_stateCtorSignature = "(I)V"; + jint jnivalue_state = static_cast(cppValue.state); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); + + jobject value_sessionDuration; + std::string value_sessionDurationClassName = "java/lang/Long"; + std::string value_sessionDurationCtorSignature = "(J)V"; + jlong jnivalue_sessionDuration = static_cast(cppValue.sessionDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sessionDurationClassName.c_str(), + value_sessionDurationCtorSignature.c_str(), + jnivalue_sessionDuration, value_sessionDuration); + + jobject value_sessionEnergyCharged; + std::string value_sessionEnergyChargedClassName = "java/lang/Long"; + std::string value_sessionEnergyChargedCtorSignature = "(J)V"; + jlong jnivalue_sessionEnergyCharged = static_cast(cppValue.sessionEnergyCharged); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sessionEnergyChargedClassName.c_str(), + value_sessionEnergyChargedCtorSignature.c_str(), + jnivalue_sessionEnergyCharged, value_sessionEnergyCharged); + + jobject value_sessionEnergyDischarged; + if (!cppValue.sessionEnergyDischarged.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_sessionEnergyDischarged); + } + else + { + jobject value_sessionEnergyDischargedInsideOptional; + std::string value_sessionEnergyDischargedInsideOptionalClassName = "java/lang/Long"; + std::string value_sessionEnergyDischargedInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_sessionEnergyDischargedInsideOptional = static_cast(cppValue.sessionEnergyDischarged.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionEnergyDischargedInsideOptionalClassName.c_str(), + value_sessionEnergyDischargedInsideOptionalCtorSignature.c_str(), + jnivalue_sessionEnergyDischargedInsideOptional, value_sessionEnergyDischargedInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_sessionEnergyDischargedInsideOptional, + value_sessionEnergyDischarged); + } + + jclass EVNotDetectedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterEVNotDetectedEvent", EVNotDetectedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterEVNotDetectedEvent"); + return nullptr; + } + jmethodID EVNotDetectedStructCtor = + env->GetMethodID(EVNotDetectedStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V"); + if (EVNotDetectedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterEVNotDetectedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(EVNotDetectedStructClass, EVNotDetectedStructCtor, value_sessionID, value_state, + value_sessionDuration, value_sessionEnergyCharged, value_sessionEnergyDischarged); + + return value; + } + case Events::EnergyTransferStarted::Id: { + Events::EnergyTransferStarted::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_sessionID; + std::string value_sessionIDClassName = "java/lang/Long"; + std::string value_sessionIDCtorSignature = "(J)V"; + jlong jnivalue_sessionID = static_cast(cppValue.sessionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionIDClassName.c_str(), value_sessionIDCtorSignature.c_str(), jnivalue_sessionID, value_sessionID); + + jobject value_state; + std::string value_stateClassName = "java/lang/Integer"; + std::string value_stateCtorSignature = "(I)V"; + jint jnivalue_state = static_cast(cppValue.state); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); + + jobject value_maximumCurrent; + std::string value_maximumCurrentClassName = "java/lang/Long"; + std::string value_maximumCurrentCtorSignature = "(J)V"; + jlong jnivalue_maximumCurrent = static_cast(cppValue.maximumCurrent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maximumCurrentClassName.c_str(), + value_maximumCurrentCtorSignature.c_str(), + jnivalue_maximumCurrent, value_maximumCurrent); + + jclass energyTransferStartedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterEnergyTransferStartedEvent", + energyTransferStartedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterEnergyTransferStartedEvent"); + return nullptr; + } + jmethodID energyTransferStartedStructCtor = env->GetMethodID(energyTransferStartedStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V"); + if (energyTransferStartedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterEnergyTransferStartedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(energyTransferStartedStructClass, energyTransferStartedStructCtor, value_sessionID, + value_state, value_maximumCurrent); + + return value; + } + case Events::EnergyTransferStopped::Id: { + Events::EnergyTransferStopped::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_sessionID; + std::string value_sessionIDClassName = "java/lang/Long"; + std::string value_sessionIDCtorSignature = "(J)V"; + jlong jnivalue_sessionID = static_cast(cppValue.sessionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionIDClassName.c_str(), value_sessionIDCtorSignature.c_str(), jnivalue_sessionID, value_sessionID); + + jobject value_state; + std::string value_stateClassName = "java/lang/Integer"; + std::string value_stateCtorSignature = "(I)V"; + jint jnivalue_state = static_cast(cppValue.state); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); + + jobject value_reason; + std::string value_reasonClassName = "java/lang/Integer"; + std::string value_reasonCtorSignature = "(I)V"; + jint jnivalue_reason = static_cast(cppValue.reason); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_reasonClassName.c_str(), value_reasonCtorSignature.c_str(), jnivalue_reason, value_reason); + + jobject value_energyTransferred; + std::string value_energyTransferredClassName = "java/lang/Long"; + std::string value_energyTransferredCtorSignature = "(J)V"; + jlong jnivalue_energyTransferred = static_cast(cppValue.energyTransferred); + chip::JniReferences::GetInstance().CreateBoxedObject(value_energyTransferredClassName.c_str(), + value_energyTransferredCtorSignature.c_str(), + jnivalue_energyTransferred, value_energyTransferred); + + jclass energyTransferStoppedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterEnergyTransferStoppedEvent", + energyTransferStoppedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterEnergyTransferStoppedEvent"); + return nullptr; + } + jmethodID energyTransferStoppedStructCtor = + env->GetMethodID(energyTransferStoppedStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V"); + if (energyTransferStoppedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterEnergyTransferStoppedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(energyTransferStoppedStructClass, energyTransferStoppedStructCtor, value_sessionID, + value_state, value_reason, value_energyTransferred); + + return value; + } + case Events::Fault::Id: { + Events::Fault::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_pausedTime); + return nullptr; + } + jobject value_sessionID; + if (cppValue.sessionID.IsNull()) + { + value_sessionID = nullptr; } else { - jobject value_pausedTimeInsideOptional; - if (cppValue.pausedTime.Value().IsNull()) - { - value_pausedTimeInsideOptional = nullptr; - } - else - { - std::string value_pausedTimeInsideOptionalClassName = "java/lang/Long"; - std::string value_pausedTimeInsideOptionalCtorSignature = "(J)V"; - jlong jnivalue_pausedTimeInsideOptional = static_cast(cppValue.pausedTime.Value().Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_pausedTimeInsideOptionalClassName.c_str(), value_pausedTimeInsideOptionalCtorSignature.c_str(), - jnivalue_pausedTimeInsideOptional, value_pausedTimeInsideOptional); - } - chip::JniReferences::GetInstance().CreateOptional(value_pausedTimeInsideOptional, value_pausedTime); + std::string value_sessionIDClassName = "java/lang/Long"; + std::string value_sessionIDCtorSignature = "(J)V"; + jlong jnivalue_sessionID = static_cast(cppValue.sessionID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sessionIDClassName.c_str(), value_sessionIDCtorSignature.c_str(), jnivalue_sessionID, value_sessionID); } - jclass operationCompletionStructClass; + jobject value_state; + std::string value_stateClassName = "java/lang/Integer"; + std::string value_stateCtorSignature = "(I)V"; + jint jnivalue_state = static_cast(cppValue.state); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); + + jobject value_faultStatePreviousState; + std::string value_faultStatePreviousStateClassName = "java/lang/Integer"; + std::string value_faultStatePreviousStateCtorSignature = "(I)V"; + jint jnivalue_faultStatePreviousState = static_cast(cppValue.faultStatePreviousState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_faultStatePreviousStateClassName.c_str(), value_faultStatePreviousStateCtorSignature.c_str(), + jnivalue_faultStatePreviousState, value_faultStatePreviousState); + + jobject value_faultStateCurrentState; + std::string value_faultStateCurrentStateClassName = "java/lang/Integer"; + std::string value_faultStateCurrentStateCtorSignature = "(I)V"; + jint jnivalue_faultStateCurrentState = static_cast(cppValue.faultStateCurrentState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_faultStateCurrentStateClassName.c_str(), value_faultStateCurrentStateCtorSignature.c_str(), + jnivalue_faultStateCurrentState, value_faultStateCurrentState); + + jclass faultStructClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent", - operationCompletionStructClass); + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterFaultEvent", faultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent"); + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterFaultEvent"); return nullptr; } - jmethodID operationCompletionStructCtor = env->GetMethodID( - operationCompletionStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); - if (operationCompletionStructCtor == nullptr) + jmethodID faultStructCtor = env->GetMethodID( + faultStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (faultStructCtor == nullptr) { - ChipLogError(Zcl, "Could not find ChipEventStructs$RvcOperationalStateClusterOperationCompletionEvent constructor"); + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterFaultEvent constructor"); return nullptr; } - jobject value = env->NewObject(operationCompletionStructClass, operationCompletionStructCtor, value_completionErrorCode, - value_totalOperationalTime, value_pausedTime); + jobject value = env->NewObject(faultStructClass, faultStructCtor, value_sessionID, value_state, + value_faultStatePreviousState, value_faultStateCurrentState); return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } - case app::Clusters::HepaFilterMonitoring::Id: { - using namespace app::Clusters::HepaFilterMonitoring; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; + case Events::Rfid::Id: { + Events::Rfid::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_uid; + jbyteArray value_uidByteArray = env->NewByteArray(static_cast(cppValue.uid.size())); + env->SetByteArrayRegion(value_uidByteArray, 0, static_cast(cppValue.uid.size()), + reinterpret_cast(cppValue.uid.data())); + value_uid = value_uidByteArray; + + jclass rfidStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$EnergyEvseClusterRfidEvent", rfidStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$EnergyEvseClusterRfidEvent"); + return nullptr; + } + jmethodID rfidStructCtor = env->GetMethodID(rfidStructClass, "", "([B)V"); + if (rfidStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$EnergyEvseClusterRfidEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(rfidStructClass, rfidStructCtor, value_uid); + + return value; } - break; - } - case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { - using namespace app::Clusters::ActivatedCarbonFilterMonitoring; - switch (aPath.mEventId) - { default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; @@ -4878,6 +6616,87 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::TargetNavigator; switch (aPath.mEventId) { + case Events::TargetUpdated::Id: { + Events::TargetUpdated::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_targetList; + chip::JniReferences::GetInstance().CreateArrayList(value_targetList); + + auto iter_value_targetList_0 = cppValue.targetList.begin(); + while (iter_value_targetList_0.Next()) + { + auto & entry_0 = iter_value_targetList_0.GetValue(); + jobject newElement_0; + jobject newElement_0_identifier; + std::string newElement_0_identifierClassName = "java/lang/Integer"; + std::string newElement_0_identifierCtorSignature = "(I)V"; + jint jninewElement_0_identifier = static_cast(entry_0.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + jninewElement_0_identifier, newElement_0_identifier); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + + jclass targetInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); + return nullptr; + } + jmethodID targetInfoStructStructCtor_1 = + env->GetMethodID(targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (targetInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, + newElement_0_name); + chip::JniReferences::GetInstance().AddToList(value_targetList, newElement_0); + } + + jobject value_currentTarget; + std::string value_currentTargetClassName = "java/lang/Integer"; + std::string value_currentTargetCtorSignature = "(I)V"; + jint jnivalue_currentTarget = static_cast(cppValue.currentTarget); + chip::JniReferences::GetInstance().CreateBoxedObject(value_currentTargetClassName.c_str(), + value_currentTargetCtorSignature.c_str(), + jnivalue_currentTarget, value_currentTarget); + + jobject value_data; + jbyteArray value_dataByteArray = env->NewByteArray(static_cast(cppValue.data.size())); + env->SetByteArrayRegion(value_dataByteArray, 0, static_cast(cppValue.data.size()), + reinterpret_cast(cppValue.data.data())); + value_data = value_dataByteArray; + + jclass targetUpdatedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TargetNavigatorClusterTargetUpdatedEvent", targetUpdatedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TargetNavigatorClusterTargetUpdatedEvent"); + return nullptr; + } + jmethodID targetUpdatedStructCtor = + env->GetMethodID(targetUpdatedStructClass, "", "(Ljava/util/ArrayList;Ljava/lang/Integer;[B)V"); + if (targetUpdatedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$TargetNavigatorClusterTargetUpdatedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(targetUpdatedStructClass, targetUpdatedStructCtor, value_targetList, value_currentTarget, + value_data); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; @@ -4888,6 +6707,150 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::MediaPlayback; switch (aPath.mEventId) { + case Events::StateChanged::Id: { + Events::StateChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_currentState; + std::string value_currentStateClassName = "java/lang/Integer"; + std::string value_currentStateCtorSignature = "(I)V"; + jint jnivalue_currentState = static_cast(cppValue.currentState); + chip::JniReferences::GetInstance().CreateBoxedObject(value_currentStateClassName.c_str(), + value_currentStateCtorSignature.c_str(), + jnivalue_currentState, value_currentState); + + jobject value_startTime; + std::string value_startTimeClassName = "java/lang/Long"; + std::string value_startTimeCtorSignature = "(J)V"; + jlong jnivalue_startTime = static_cast(cppValue.startTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime); + + jobject value_duration; + std::string value_durationClassName = "java/lang/Long"; + std::string value_durationCtorSignature = "(J)V"; + jlong jnivalue_duration = static_cast(cppValue.duration); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_durationClassName.c_str(), value_durationCtorSignature.c_str(), jnivalue_duration, value_duration); + + jobject value_sampledPosition; + jobject value_sampledPosition_updatedAt; + std::string value_sampledPosition_updatedAtClassName = "java/lang/Long"; + std::string value_sampledPosition_updatedAtCtorSignature = "(J)V"; + jlong jnivalue_sampledPosition_updatedAt = static_cast(cppValue.sampledPosition.updatedAt); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sampledPosition_updatedAtClassName.c_str(), value_sampledPosition_updatedAtCtorSignature.c_str(), + jnivalue_sampledPosition_updatedAt, value_sampledPosition_updatedAt); + jobject value_sampledPosition_position; + if (cppValue.sampledPosition.position.IsNull()) + { + value_sampledPosition_position = nullptr; + } + else + { + std::string value_sampledPosition_positionClassName = "java/lang/Long"; + std::string value_sampledPosition_positionCtorSignature = "(J)V"; + jlong jnivalue_sampledPosition_position = static_cast(cppValue.sampledPosition.position.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sampledPosition_positionClassName.c_str(), value_sampledPosition_positionCtorSignature.c_str(), + jnivalue_sampledPosition_position, value_sampledPosition_position); + } + + jclass playbackPositionStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", + playbackPositionStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); + return nullptr; + } + jmethodID playbackPositionStructStructCtor_0 = + env->GetMethodID(playbackPositionStructStructClass_0, "", "(Ljava/lang/Long;Ljava/lang/Long;)V"); + if (playbackPositionStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); + return nullptr; + } + + value_sampledPosition = env->NewObject(playbackPositionStructStructClass_0, playbackPositionStructStructCtor_0, + value_sampledPosition_updatedAt, value_sampledPosition_position); + + jobject value_playbackSpeed; + std::string value_playbackSpeedClassName = "java/lang/Float"; + std::string value_playbackSpeedCtorSignature = "(F)V"; + jfloat jnivalue_playbackSpeed = static_cast(cppValue.playbackSpeed); + chip::JniReferences::GetInstance().CreateBoxedObject(value_playbackSpeedClassName.c_str(), + value_playbackSpeedCtorSignature.c_str(), + jnivalue_playbackSpeed, value_playbackSpeed); + + jobject value_seekRangeEnd; + std::string value_seekRangeEndClassName = "java/lang/Long"; + std::string value_seekRangeEndCtorSignature = "(J)V"; + jlong jnivalue_seekRangeEnd = static_cast(cppValue.seekRangeEnd); + chip::JniReferences::GetInstance().CreateBoxedObject(value_seekRangeEndClassName.c_str(), + value_seekRangeEndCtorSignature.c_str(), + jnivalue_seekRangeEnd, value_seekRangeEnd); + + jobject value_seekRangeStart; + std::string value_seekRangeStartClassName = "java/lang/Long"; + std::string value_seekRangeStartCtorSignature = "(J)V"; + jlong jnivalue_seekRangeStart = static_cast(cppValue.seekRangeStart); + chip::JniReferences::GetInstance().CreateBoxedObject(value_seekRangeStartClassName.c_str(), + value_seekRangeStartCtorSignature.c_str(), + jnivalue_seekRangeStart, value_seekRangeStart); + + jobject value_data; + if (!cppValue.data.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_data); + } + else + { + jobject value_dataInsideOptional; + jbyteArray value_dataInsideOptionalByteArray = env->NewByteArray(static_cast(cppValue.data.Value().size())); + env->SetByteArrayRegion(value_dataInsideOptionalByteArray, 0, static_cast(cppValue.data.Value().size()), + reinterpret_cast(cppValue.data.Value().data())); + value_dataInsideOptional = value_dataInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(value_dataInsideOptional, value_data); + } + + jobject value_audioAdvanceUnmuted; + std::string value_audioAdvanceUnmutedClassName = "java/lang/Boolean"; + std::string value_audioAdvanceUnmutedCtorSignature = "(Z)V"; + jboolean jnivalue_audioAdvanceUnmuted = static_cast(cppValue.audioAdvanceUnmuted); + chip::JniReferences::GetInstance().CreateBoxedObject(value_audioAdvanceUnmutedClassName.c_str(), + value_audioAdvanceUnmutedCtorSignature.c_str(), + jnivalue_audioAdvanceUnmuted, value_audioAdvanceUnmuted); + + jclass stateChangedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$MediaPlaybackClusterStateChangedEvent", stateChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$MediaPlaybackClusterStateChangedEvent"); + return nullptr; + } + jmethodID stateChangedStructCtor = + env->GetMethodID(stateChangedStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/" + "ChipStructs$MediaPlaybackClusterPlaybackPositionStruct;Ljava/lang/Float;Ljava/lang/Long;Ljava/" + "lang/Long;Ljava/util/Optional;Ljava/lang/Boolean;)V"); + if (stateChangedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$MediaPlaybackClusterStateChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(stateChangedStructClass, stateChangedStructCtor, value_currentState, value_startTime, + value_duration, value_sampledPosition, value_playbackSpeed, value_seekRangeEnd, + value_seekRangeStart, value_data, value_audioAdvanceUnmuted); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; @@ -4968,6 +6931,98 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::AccountLogin; switch (aPath.mEventId) { + case Events::LoggedOut::Id: { + Events::LoggedOut::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_node; + if (!cppValue.node.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_node); + } + else + { + jobject value_nodeInsideOptional; + std::string value_nodeInsideOptionalClassName = "java/lang/Long"; + std::string value_nodeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_nodeInsideOptional = static_cast(cppValue.node.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_nodeInsideOptionalClassName.c_str(), + value_nodeInsideOptionalCtorSignature.c_str(), + jnivalue_nodeInsideOptional, value_nodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_nodeInsideOptional, value_node); + } + + jclass loggedOutStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$AccountLoginClusterLoggedOutEvent", loggedOutStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$AccountLoginClusterLoggedOutEvent"); + return nullptr; + } + jmethodID loggedOutStructCtor = env->GetMethodID(loggedOutStructClass, "", "(Ljava/util/Optional;)V"); + if (loggedOutStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$AccountLoginClusterLoggedOutEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(loggedOutStructClass, loggedOutStructCtor, value_node); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ContentControl::Id: { + using namespace app::Clusters::ContentControl; + switch (aPath.mEventId) + { + case Events::RemainingScreenTimeExpired::Id: { + Events::RemainingScreenTimeExpired::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass remainingScreenTimeExpiredStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ContentControlClusterRemainingScreenTimeExpiredEvent", + remainingScreenTimeExpiredStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$ContentControlClusterRemainingScreenTimeExpiredEvent"); + return nullptr; + } + jmethodID remainingScreenTimeExpiredStructCtor = + env->GetMethodID(remainingScreenTimeExpiredStructClass, "", "()V"); + if (remainingScreenTimeExpiredStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$ContentControlClusterRemainingScreenTimeExpiredEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(remainingScreenTimeExpiredStructClass, remainingScreenTimeExpiredStructCtor); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ContentAppObserver::Id: { + using namespace app::Clusters::ContentAppObserver; + switch (aPath.mEventId) + { default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; @@ -5253,6 +7308,48 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::SampleMei; switch (aPath.mEventId) { + case Events::PingCountEvent::Id: { + Events::PingCountEvent::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_count; + std::string value_countClassName = "java/lang/Long"; + std::string value_countCtorSignature = "(J)V"; + jlong jnivalue_count = static_cast(cppValue.count); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_countClassName.c_str(), value_countCtorSignature.c_str(), jnivalue_count, value_count); + + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); + + jclass pingCountEventStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$SampleMeiClusterPingCountEventEvent", pingCountEventStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$SampleMeiClusterPingCountEventEvent"); + return nullptr; + } + jmethodID pingCountEventStructCtor = + env->GetMethodID(pingCountEventStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); + if (pingCountEventStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$SampleMeiClusterPingCountEventEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(pingCountEventStructClass, pingCountEventStructCtor, value_count, value_fabricIndex); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index b94b2f56c69f7c..2b5fa3ff8429ea 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -2365,27 +2365,27 @@ void CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CallbackFn( &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject SystemTimeUs; - std::string SystemTimeUsClassName = "java/lang/Long"; - std::string SystemTimeUsCtorSignature = "(J)V"; - jlong jniSystemTimeUs = static_cast(dataResponse.systemTimeUs); - chip::JniReferences::GetInstance().CreateBoxedObject(SystemTimeUsClassName.c_str(), SystemTimeUsCtorSignature.c_str(), - jniSystemTimeUs, SystemTimeUs); - jobject UTCTimeUs; - if (dataResponse.UTCTimeUs.IsNull()) + jobject SystemTimeMs; + std::string SystemTimeMsClassName = "java/lang/Long"; + std::string SystemTimeMsCtorSignature = "(J)V"; + jlong jniSystemTimeMs = static_cast(dataResponse.systemTimeMs); + chip::JniReferences::GetInstance().CreateBoxedObject(SystemTimeMsClassName.c_str(), SystemTimeMsCtorSignature.c_str(), + jniSystemTimeMs, SystemTimeMs); + jobject PosixTimeMs; + if (dataResponse.posixTimeMs.IsNull()) { - UTCTimeUs = nullptr; + PosixTimeMs = nullptr; } else { - std::string UTCTimeUsClassName = "java/lang/Long"; - std::string UTCTimeUsCtorSignature = "(J)V"; - jlong jniUTCTimeUs = static_cast(dataResponse.UTCTimeUs.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UTCTimeUsClassName.c_str(), UTCTimeUsCtorSignature.c_str(), - jniUTCTimeUs, UTCTimeUs); + std::string PosixTimeMsClassName = "java/lang/Long"; + std::string PosixTimeMsCtorSignature = "(J)V"; + jlong jniPosixTimeMs = static_cast(dataResponse.posixTimeMs.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(PosixTimeMsClassName.c_str(), PosixTimeMsCtorSignature.c_str(), + jniPosixTimeMs, PosixTimeMs); } - env->CallVoidMethod(javaCallbackRef, javaMethod, SystemTimeUs, UTCTimeUs); + env->CallVoidMethod(javaCallbackRef, javaMethod, SystemTimeMs, PosixTimeMs); } CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -3043,9 +3043,8 @@ void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); } -CHIPOvenOperationalStateClusterOperationalCommandResponseCallback:: -CHIPOvenOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3061,8 +3060,7 @@ CHIPOvenOperationalStateClusterOperationalCommandResponseCallback(jobject javaCa } } -CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::~ -CHIPOvenOperationalStateClusterOperationalCommandResponseCallback() +CHIPIcdManagementClusterStayActiveResponseCallback::~CHIPIcdManagementClusterStayActiveResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3073,9 +3071,73 @@ CHIPOvenOperationalStateClusterOperationalCommandResponseCallback() env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( +void CHIPIcdManagementClusterStayActiveResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject PromisedActiveDuration; + std::string PromisedActiveDurationClassName = "java/lang/Long"; + std::string PromisedActiveDurationCtorSignature = "(J)V"; + jlong jniPromisedActiveDuration = static_cast(dataResponse.promisedActiveDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(PromisedActiveDurationClassName.c_str(), + PromisedActiveDurationCtorSignature.c_str(), + jniPromisedActiveDuration, PromisedActiveDuration); + + env->CallVoidMethod(javaCallbackRef, javaMethod, PromisedActiveDuration); +} +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::~ +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( void * context, - const chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) + const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3085,10 +3147,10 @@ void CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3096,8 +3158,8 @@ void CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::Callback VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$OvenOperationalStateClusterErrorStateStruct;)V", - &javaMethod); + env, javaCallbackRef, "onSuccess", + "(Lchip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject CommandResponseState; @@ -3137,17 +3199,17 @@ void CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::Callback jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenOperationalStateClusterErrorStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); return; } jmethodID errorStateStructStructCtor_0 = env->GetMethodID(errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); if (errorStateStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenOperationalStateClusterErrorStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); return; } @@ -3157,6 +3219,79 @@ void CHIPOvenOperationalStateClusterOperationalCommandResponseCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); } +CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeClusterChangeToModeResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) { @@ -3757,6 +3892,138 @@ void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); } +CHIPEnergyEvseClusterGetTargetsResponseCallback::CHIPEnergyEvseClusterGetTargetsResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseClusterGetTargetsResponseCallback::~CHIPEnergyEvseClusterGetTargetsResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPEnergyEvseClusterGetTargetsResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject DayOfWeekforSequence; + std::string DayOfWeekforSequenceClassName = "java/lang/Integer"; + std::string DayOfWeekforSequenceCtorSignature = "(I)V"; + jint jniDayOfWeekforSequence = static_cast(dataResponse.dayOfWeekforSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekforSequenceClassName.c_str(), + DayOfWeekforSequenceCtorSignature.c_str(), jniDayOfWeekforSequence, + DayOfWeekforSequence); + jobject ChargingTargets; + chip::JniReferences::GetInstance().CreateArrayList(ChargingTargets); + + auto iter_ChargingTargets_0 = dataResponse.chargingTargets.begin(); + while (iter_ChargingTargets_0.Next()) + { + auto & entry_0 = iter_ChargingTargets_0.GetValue(); + jobject newElement_0; + jobject newElement_0_targetTimeMinutesPastMidnight; + std::string newElement_0_targetTimeMinutesPastMidnightClassName = "java/lang/Integer"; + std::string newElement_0_targetTimeMinutesPastMidnightCtorSignature = "(I)V"; + jint jninewElement_0_targetTimeMinutesPastMidnight = static_cast(entry_0.targetTimeMinutesPastMidnight); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_targetTimeMinutesPastMidnightClassName.c_str(), + newElement_0_targetTimeMinutesPastMidnightCtorSignature.c_str(), + jninewElement_0_targetTimeMinutesPastMidnight, + newElement_0_targetTimeMinutesPastMidnight); + jobject newElement_0_targetSoC; + if (!entry_0.targetSoC.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_targetSoC); + } + else + { + jobject newElement_0_targetSoCInsideOptional; + std::string newElement_0_targetSoCInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_targetSoCInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_targetSoCInsideOptional = static_cast(entry_0.targetSoC.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_targetSoCInsideOptionalClassName.c_str(), newElement_0_targetSoCInsideOptionalCtorSignature.c_str(), + jninewElement_0_targetSoCInsideOptional, newElement_0_targetSoCInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_targetSoCInsideOptional, newElement_0_targetSoC); + } + jobject newElement_0_addedEnergy; + if (!entry_0.addedEnergy.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_addedEnergy); + } + else + { + jobject newElement_0_addedEnergyInsideOptional; + std::string newElement_0_addedEnergyInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_addedEnergyInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_addedEnergyInsideOptional = static_cast(entry_0.addedEnergy.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_addedEnergyInsideOptionalClassName.c_str(), + newElement_0_addedEnergyInsideOptionalCtorSignature.c_str(), + jninewElement_0_addedEnergyInsideOptional, + newElement_0_addedEnergyInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_addedEnergyInsideOptional, newElement_0_addedEnergy); + } + + jclass chargingTargetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct"); + return; + } + jmethodID chargingTargetStructStructCtor_1 = env->GetMethodID( + chargingTargetStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (chargingTargetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor"); + return; + } + + newElement_0 = env->NewObject(chargingTargetStructStructClass_1, chargingTargetStructStructCtor_1, + newElement_0_targetTimeMinutesPastMidnight, newElement_0_targetSoC, newElement_0_addedEnergy); + chip::JniReferences::GetInstance().AddToList(ChargingTargets, newElement_0); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, DayOfWeekforSequence, ChargingTargets); +} CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { @@ -4681,24 +4948,24 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); } - jclass thermostatScheduleTransitionStructClass_1; + jclass weeklyScheduleTransitionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterThermostatScheduleTransition", - thermostatScheduleTransitionStructClass_1); + env, "chip/devicecontroller/ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct", + weeklyScheduleTransitionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterThermostatScheduleTransition"); + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct"); return; } - jmethodID thermostatScheduleTransitionStructCtor_1 = env->GetMethodID( - thermostatScheduleTransitionStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (thermostatScheduleTransitionStructCtor_1 == nullptr) + jmethodID weeklyScheduleTransitionStructStructCtor_1 = env->GetMethodID( + weeklyScheduleTransitionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (weeklyScheduleTransitionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterThermostatScheduleTransition constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct constructor"); return; } - newElement_0 = env->NewObject(thermostatScheduleTransitionStructClass_1, thermostatScheduleTransitionStructCtor_1, + newElement_0 = env->NewObject(weeklyScheduleTransitionStructStructClass_1, weeklyScheduleTransitionStructStructCtor_1, newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); } @@ -4778,8 +5045,8 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPChannelClusterProgramGuideResponseCallback::CHIPChannelClusterProgramGuideResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4795,7 +5062,7 @@ CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClu } } -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorClusterNavigateTargetResponseCallback() +CHIPChannelClusterProgramGuideResponseCallback::~CHIPChannelClusterProgramGuideResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4806,8 +5073,8 @@ CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorCl env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & dataResponse) +void CHIPChannelClusterProgramGuideResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4817,56 +5084,604 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); -} -CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } + jobject ChannelPagingStruct; + std::string ChannelPagingStructClassName = "java/lang/Integer"; + std::string ChannelPagingStructCtorSignature = "(I)V"; + jint jniChannelPagingStruct = static_cast(dataResponse.channelPagingStruct); + chip::JniReferences::GetInstance().CreateBoxedObject(ChannelPagingStructClassName.c_str(), + ChannelPagingStructCtorSignature.c_str(), jniChannelPagingStruct, + ChannelPagingStruct); + jobject ProgramList; + chip::JniReferences::GetInstance().CreateArrayList(ProgramList); - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) + auto iter_ProgramList_0 = dataResponse.programList.begin(); + while (iter_ProgramList_0.Next()) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} + auto & entry_0 = iter_ProgramList_0.GetValue(); + jobject newElement_0; + jobject newElement_0_identifier; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier, newElement_0_identifier)); + jobject newElement_0_channel; + jobject newElement_0_channel_majorNumber; + std::string newElement_0_channel_majorNumberClassName = "java/lang/Integer"; + std::string newElement_0_channel_majorNumberCtorSignature = "(I)V"; + jint jninewElement_0_channel_majorNumber = static_cast(entry_0.channel.majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_channel_majorNumberClassName.c_str(), newElement_0_channel_majorNumberCtorSignature.c_str(), + jninewElement_0_channel_majorNumber, newElement_0_channel_majorNumber); + jobject newElement_0_channel_minorNumber; + std::string newElement_0_channel_minorNumberClassName = "java/lang/Integer"; + std::string newElement_0_channel_minorNumberCtorSignature = "(I)V"; + jint jninewElement_0_channel_minorNumber = static_cast(entry_0.channel.minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_channel_minorNumberClassName.c_str(), newElement_0_channel_minorNumberCtorSignature.c_str(), + jninewElement_0_channel_minorNumber, newElement_0_channel_minorNumber); + jobject newElement_0_channel_name; + if (!entry_0.channel.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_name); + } + else + { + jobject newElement_0_channel_nameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.name.Value(), + newElement_0_channel_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_nameInsideOptional, newElement_0_channel_name); + } + jobject newElement_0_channel_callSign; + if (!entry_0.channel.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_callSign); + } + else + { + jobject newElement_0_channel_callSignInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.callSign.Value(), + newElement_0_channel_callSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_callSignInsideOptional, + newElement_0_channel_callSign); + } + jobject newElement_0_channel_affiliateCallSign; + if (!entry_0.channel.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_affiliateCallSign); + } + else + { + jobject newElement_0_channel_affiliateCallSignInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.channel.affiliateCallSign.Value(), newElement_0_channel_affiliateCallSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_affiliateCallSignInsideOptional, + newElement_0_channel_affiliateCallSign); + } + jobject newElement_0_channel_identifier; + if (!entry_0.channel.identifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_identifier); + } + else + { + jobject newElement_0_channel_identifierInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.channel.identifier.Value(), + newElement_0_channel_identifierInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_identifierInsideOptional, + newElement_0_channel_identifier); + } + jobject newElement_0_channel_type; + if (!entry_0.channel.type.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_channel_type); + } + else + { + jobject newElement_0_channel_typeInsideOptional; + std::string newElement_0_channel_typeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_channel_typeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_channel_typeInsideOptional = static_cast(entry_0.channel.type.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channel_typeInsideOptionalClassName.c_str(), + newElement_0_channel_typeInsideOptionalCtorSignature.c_str(), + jninewElement_0_channel_typeInsideOptional, + newElement_0_channel_typeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_channel_typeInsideOptional, newElement_0_channel_type); + } + + jclass channelInfoStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + return; + } + jmethodID channelInfoStructStructCtor_2 = + env->GetMethodID(channelInfoStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (channelInfoStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + return; + } + + newElement_0_channel = + env->NewObject(channelInfoStructStructClass_2, channelInfoStructStructCtor_2, newElement_0_channel_majorNumber, + newElement_0_channel_minorNumber, newElement_0_channel_name, newElement_0_channel_callSign, + newElement_0_channel_affiliateCallSign, newElement_0_channel_identifier, newElement_0_channel_type); + jobject newElement_0_startTime; + std::string newElement_0_startTimeClassName = "java/lang/Long"; + std::string newElement_0_startTimeCtorSignature = "(J)V"; + jlong jninewElement_0_startTime = static_cast(entry_0.startTime); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), + newElement_0_startTimeCtorSignature.c_str(), + jninewElement_0_startTime, newElement_0_startTime); + jobject newElement_0_endTime; + std::string newElement_0_endTimeClassName = "java/lang/Long"; + std::string newElement_0_endTimeCtorSignature = "(J)V"; + jlong jninewElement_0_endTime = static_cast(entry_0.endTime); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endTimeClassName.c_str(), + newElement_0_endTimeCtorSignature.c_str(), + jninewElement_0_endTime, newElement_0_endTime); + jobject newElement_0_title; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.title, newElement_0_title)); + jobject newElement_0_subtitle; + if (!entry_0.subtitle.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_subtitle); + } + else + { + jobject newElement_0_subtitleInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.subtitle.Value(), newElement_0_subtitleInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_subtitleInsideOptional, newElement_0_subtitle); + } + jobject newElement_0_description; + if (!entry_0.description.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_description); + } + else + { + jobject newElement_0_descriptionInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description.Value(), + newElement_0_descriptionInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_descriptionInsideOptional, newElement_0_description); + } + jobject newElement_0_audioLanguages; + if (!entry_0.audioLanguages.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_audioLanguages); + } + else + { + jobject newElement_0_audioLanguagesInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_audioLanguagesInsideOptional); + + auto iter_newElement_0_audioLanguagesInsideOptional_3 = entry_0.audioLanguages.Value().begin(); + while (iter_newElement_0_audioLanguagesInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_audioLanguagesInsideOptional_3.GetValue(); + jobject newElement_3; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3, newElement_3)); + chip::JniReferences::GetInstance().AddToList(newElement_0_audioLanguagesInsideOptional, newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_audioLanguagesInsideOptional, + newElement_0_audioLanguages); + } + jobject newElement_0_ratings; + if (!entry_0.ratings.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratings); + } + else + { + jobject newElement_0_ratingsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_ratingsInsideOptional); + + auto iter_newElement_0_ratingsInsideOptional_3 = entry_0.ratings.Value().begin(); + while (iter_newElement_0_ratingsInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_ratingsInsideOptional_3.GetValue(); + jobject newElement_3; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3, newElement_3)); + chip::JniReferences::GetInstance().AddToList(newElement_0_ratingsInsideOptional, newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingsInsideOptional, newElement_0_ratings); + } + jobject newElement_0_thumbnailUrl; + if (!entry_0.thumbnailUrl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_thumbnailUrl); + } + else + { + jobject newElement_0_thumbnailUrlInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.thumbnailUrl.Value(), + newElement_0_thumbnailUrlInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_thumbnailUrlInsideOptional, newElement_0_thumbnailUrl); + } + jobject newElement_0_posterArtUrl; + if (!entry_0.posterArtUrl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_posterArtUrl); + } + else + { + jobject newElement_0_posterArtUrlInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.posterArtUrl.Value(), + newElement_0_posterArtUrlInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_posterArtUrlInsideOptional, newElement_0_posterArtUrl); + } + jobject newElement_0_dvbiUrl; + if (!entry_0.dvbiUrl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_dvbiUrl); + } + else + { + jobject newElement_0_dvbiUrlInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.dvbiUrl.Value(), newElement_0_dvbiUrlInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_dvbiUrlInsideOptional, newElement_0_dvbiUrl); + } + jobject newElement_0_releaseDate; + if (!entry_0.releaseDate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_releaseDate); + } + else + { + jobject newElement_0_releaseDateInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.releaseDate.Value(), + newElement_0_releaseDateInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_releaseDateInsideOptional, newElement_0_releaseDate); + } + jobject newElement_0_parentalGuidanceText; + if (!entry_0.parentalGuidanceText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_parentalGuidanceText); + } + else + { + jobject newElement_0_parentalGuidanceTextInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.parentalGuidanceText.Value(), + newElement_0_parentalGuidanceTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_parentalGuidanceTextInsideOptional, + newElement_0_parentalGuidanceText); + } + jobject newElement_0_recordingFlag; + if (!entry_0.recordingFlag.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_recordingFlag); + } + else + { + jobject newElement_0_recordingFlagInsideOptional; + std::string newElement_0_recordingFlagInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_recordingFlagInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_recordingFlagInsideOptional = static_cast(entry_0.recordingFlag.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_recordingFlagInsideOptionalClassName.c_str(), + newElement_0_recordingFlagInsideOptionalCtorSignature.c_str(), jninewElement_0_recordingFlagInsideOptional, + newElement_0_recordingFlagInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_recordingFlagInsideOptional, newElement_0_recordingFlag); + } + jobject newElement_0_seriesInfo; + if (!entry_0.seriesInfo.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_seriesInfo); + } + else + { + jobject newElement_0_seriesInfoInsideOptional; + if (entry_0.seriesInfo.Value().IsNull()) + { + newElement_0_seriesInfoInsideOptional = nullptr; + } + else + { + jobject newElement_0_seriesInfoInsideOptional_season; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.seriesInfo.Value().Value().season, + newElement_0_seriesInfoInsideOptional_season)); + jobject newElement_0_seriesInfoInsideOptional_episode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.seriesInfo.Value().Value().episode, newElement_0_seriesInfoInsideOptional_episode)); + + jclass seriesInfoStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterSeriesInfoStruct", seriesInfoStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterSeriesInfoStruct"); + return; + } + jmethodID seriesInfoStructStructCtor_4 = + env->GetMethodID(seriesInfoStructStructClass_4, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + if (seriesInfoStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterSeriesInfoStruct constructor"); + return; + } + + newElement_0_seriesInfoInsideOptional = + env->NewObject(seriesInfoStructStructClass_4, seriesInfoStructStructCtor_4, + newElement_0_seriesInfoInsideOptional_season, newElement_0_seriesInfoInsideOptional_episode); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_seriesInfoInsideOptional, newElement_0_seriesInfo); + } + jobject newElement_0_categoryList; + if (!entry_0.categoryList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_categoryList); + } + else + { + jobject newElement_0_categoryListInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_categoryListInsideOptional); + + auto iter_newElement_0_categoryListInsideOptional_3 = entry_0.categoryList.Value().begin(); + while (iter_newElement_0_categoryListInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_categoryListInsideOptional_3.GetValue(); + jobject newElement_3; + jobject newElement_3_category; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.category, newElement_3_category)); + jobject newElement_3_subCategory; + if (!entry_3.subCategory.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_subCategory); + } + else + { + jobject newElement_3_subCategoryInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.subCategory.Value(), + newElement_3_subCategoryInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_3_subCategoryInsideOptional, + newElement_3_subCategory); + } + + jclass programCategoryStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCategoryStruct", + programCategoryStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCategoryStruct"); + return; + } + jmethodID programCategoryStructStructCtor_4 = + env->GetMethodID(programCategoryStructStructClass_4, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (programCategoryStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCategoryStruct constructor"); + return; + } + + newElement_3 = env->NewObject(programCategoryStructStructClass_4, programCategoryStructStructCtor_4, + newElement_3_category, newElement_3_subCategory); + chip::JniReferences::GetInstance().AddToList(newElement_0_categoryListInsideOptional, newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_categoryListInsideOptional, newElement_0_categoryList); + } + jobject newElement_0_castList; + if (!entry_0.castList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_castList); + } + else + { + jobject newElement_0_castListInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_castListInsideOptional); + + auto iter_newElement_0_castListInsideOptional_3 = entry_0.castList.Value().begin(); + while (iter_newElement_0_castListInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_castListInsideOptional_3.GetValue(); + jobject newElement_3; + jobject newElement_3_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.name, newElement_3_name)); + jobject newElement_3_role; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.role, newElement_3_role)); + + jclass programCastStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCastStruct", programCastStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCastStruct"); + return; + } + jmethodID programCastStructStructCtor_4 = + env->GetMethodID(programCastStructStructClass_4, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + if (programCastStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCastStruct constructor"); + return; + } + + newElement_3 = env->NewObject(programCastStructStructClass_4, programCastStructStructCtor_4, newElement_3_name, + newElement_3_role); + chip::JniReferences::GetInstance().AddToList(newElement_0_castListInsideOptional, newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_castListInsideOptional, newElement_0_castList); + } + jobject newElement_0_externalIDList; + if (!entry_0.externalIDList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_externalIDList); + } + else + { + jobject newElement_0_externalIDListInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_externalIDListInsideOptional); + + auto iter_newElement_0_externalIDListInsideOptional_3 = entry_0.externalIDList.Value().begin(); + while (iter_newElement_0_externalIDListInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_externalIDListInsideOptional_3.GetValue(); + jobject newElement_3; + jobject newElement_3_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.name, newElement_3_name)); + jobject newElement_3_role; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.role, newElement_3_role)); + + jclass programCastStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramCastStruct", programCastStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramCastStruct"); + return; + } + jmethodID programCastStructStructCtor_4 = + env->GetMethodID(programCastStructStructClass_4, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + if (programCastStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramCastStruct constructor"); + return; + } + + newElement_3 = env->NewObject(programCastStructStructClass_4, programCastStructStructCtor_4, newElement_3_name, + newElement_3_role); + chip::JniReferences::GetInstance().AddToList(newElement_0_externalIDListInsideOptional, newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_externalIDListInsideOptional, + newElement_0_externalIDList); + } + + jclass programStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterProgramStruct", + programStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterProgramStruct"); + return; + } + jmethodID programStructStructCtor_1 = env->GetMethodID( + programStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct;Ljava/lang/Long;Ljava/lang/" + "Long;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (programStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterProgramStruct constructor"); + return; + } + + newElement_0 = env->NewObject( + programStructStructClass_1, programStructStructCtor_1, newElement_0_identifier, newElement_0_channel, + newElement_0_startTime, newElement_0_endTime, newElement_0_title, newElement_0_subtitle, newElement_0_description, + newElement_0_audioLanguages, newElement_0_ratings, newElement_0_thumbnailUrl, newElement_0_posterArtUrl, + newElement_0_dvbiUrl, newElement_0_releaseDate, newElement_0_parentalGuidanceText, newElement_0_recordingFlag, + newElement_0_seriesInfo, newElement_0_categoryList, newElement_0_castList, newElement_0_externalIDList); + chip::JniReferences::GetInstance().AddToList(ProgramList, newElement_0); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, ChannelPagingStruct, ProgramList); +} +CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorClusterNavigateTargetResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject Data; + if (!dataResponse.data.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); + } + else + { + jobject DataInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data.Value(), DataInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); +} +CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} CHIPMediaPlaybackClusterPlaybackResponseCallback::~CHIPMediaPlaybackClusterPlaybackResponseCallback() { @@ -5189,6 +6004,140 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, SetupPIN); } +CHIPContentControlClusterResetPINResponseCallback::CHIPContentControlClusterResetPINResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPContentControlClusterResetPINResponseCallback::~CHIPContentControlClusterResetPINResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPContentControlClusterResetPINResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject PINCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.PINCode, PINCode)); + + env->CallVoidMethod(javaCallbackRef, javaMethod, PINCode); +} +CHIPContentAppObserverClusterContentAppMessageResponseCallback::CHIPContentAppObserverClusterContentAppMessageResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPContentAppObserverClusterContentAppMessageResponseCallback::~CHIPContentAppObserverClusterContentAppMessageResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPContentAppObserverClusterContentAppMessageResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/util/Optional;Ljava/lang/String;Ljava/lang/String;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + if (!dataResponse.status.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, Status); + } + else + { + jobject StatusInsideOptional; + std::string StatusInsideOptionalClassName = "java/lang/Integer"; + std::string StatusInsideOptionalCtorSignature = "(I)V"; + jint jniStatusInsideOptional = static_cast(dataResponse.status.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusInsideOptionalClassName.c_str(), + StatusInsideOptionalCtorSignature.c_str(), + jniStatusInsideOptional, StatusInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(StatusInsideOptional, Status); + } + jobject Data; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.data, Data)); + jobject EncodingHint; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.encodingHint, EncodingHint)); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data, EncodingHint); +} CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback:: CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 11f3dacc7856d5..23b691e07a332b 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -494,17 +494,47 @@ class CHIPIcdManagementClusterRegisterClientResponseCallback jobject javaCallbackRef; }; -class CHIPOvenOperationalStateClusterOperationalCommandResponseCallback - : public Callback::Callback +class CHIPIcdManagementClusterStayActiveResponseCallback + : public Callback::Callback { public: - CHIPOvenOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback); + CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback); - ~CHIPOvenOperationalStateClusterOperationalCommandResponseCallback(); + ~CHIPIcdManagementClusterStayActiveResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback + : public Callback::Callback +{ +public: + CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback); + + ~CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(); static void CallbackFn(void * context, - const chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType & data); + const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPOvenModeClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPOvenModeClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & data); private: jobject javaCallbackRef; @@ -618,6 +648,21 @@ class CHIPRvcOperationalStateClusterOperationalCommandResponseCallback jobject javaCallbackRef; }; +class CHIPEnergyEvseClusterGetTargetsResponseCallback + : public Callback::Callback +{ +public: + CHIPEnergyEvseClusterGetTargetsResponseCallback(jobject javaCallback); + + ~CHIPEnergyEvseClusterGetTargetsResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPDoorLockClusterGetWeekDayScheduleResponseCallback : public Callback::Callback { @@ -736,6 +781,20 @@ class CHIPChannelClusterChangeChannelResponseCallback jobject javaCallbackRef; }; +class CHIPChannelClusterProgramGuideResponseCallback : public Callback::Callback +{ +public: + CHIPChannelClusterProgramGuideResponseCallback(jobject javaCallback); + + ~CHIPChannelClusterProgramGuideResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPTargetNavigatorClusterNavigateTargetResponseCallback : public Callback::Callback { @@ -824,6 +883,37 @@ class CHIPAccountLoginClusterGetSetupPINResponseCallback jobject javaCallbackRef; }; +class CHIPContentControlClusterResetPINResponseCallback + : public Callback::Callback +{ +public: + CHIPContentControlClusterResetPINResponseCallback(jobject javaCallback); + + ~CHIPContentControlClusterResetPINResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPContentAppObserverClusterContentAppMessageResponseCallback + : public Callback::Callback +{ +public: + CHIPContentAppObserverClusterContentAppMessageResponseCallback(jobject javaCallback); + + ~CHIPContentAppObserverClusterContentAppMessageResponseCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index e33afbad12a3b6..430db0fb5988e7 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -657,6 +657,135 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPScenesFabricSceneInfoAttributeCallback::CHIPScenesFabricSceneInfoAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesFabricSceneInfoAttributeCallback::~CHIPScenesFabricSceneInfoAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", + sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); + return; + } + jmethodID sceneInfoStructStructCtor_1 = env->GetMethodID(sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) @@ -19544,9 +19673,9 @@ void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStatePhaseListAttributeCallback::CHIPOvenOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimerGeneratedCommandListAttributeCallback::CHIPTimerGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19562,7 +19691,7 @@ CHIPOvenOperationalStatePhaseListAttributeCallback::CHIPOvenOperationalStatePhas } } -CHIPOvenOperationalStatePhaseListAttributeCallback::~CHIPOvenOperationalStatePhaseListAttributeCallback() +CHIPTimerGeneratedCommandListAttributeCallback::~CHIPTimerGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19573,8 +19702,8 @@ CHIPOvenOperationalStatePhaseListAttributeCallback::~CHIPOvenOperationalStatePha env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19583,8 +19712,8 @@ void CHIPOvenOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19596,32 +19725,97 @@ void CHIPOvenOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - arrayListObj = nullptr; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - else + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTimerAcceptedCommandListAttributeCallback::CHIPTimerAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTimerAcceptedCommandListAttributeCallback::~CHIPTimerAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStateCurrentPhaseAttributeCallback::CHIPOvenOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimerEventListAttributeCallback::CHIPTimerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19637,7 +19831,7 @@ CHIPOvenOperationalStateCurrentPhaseAttributeCallback::CHIPOvenOperationalStateC } } -CHIPOvenOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenOperationalStateCurrentPhaseAttributeCallback() +CHIPTimerEventListAttributeCallback::~CHIPTimerEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19648,8 +19842,8 @@ CHIPOvenOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19657,8 +19851,9 @@ void CHIPOvenOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19666,29 +19861,102 @@ void CHIPOvenOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - javaValue = nullptr; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - else + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTimerAttributeListAttributeCallback::CHIPTimerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } } -CHIPOvenOperationalStateCountdownTimeAttributeCallback::CHIPOvenOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimerAttributeListAttributeCallback::~CHIPTimerAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CHIPOvenCavityOperationalStatePhaseListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19705,7 +19973,7 @@ CHIPOvenOperationalStateCountdownTimeAttributeCallback::CHIPOvenOperationalState } } -CHIPOvenOperationalStateCountdownTimeAttributeCallback::~CHIPOvenOperationalStateCountdownTimeAttributeCallback() +CHIPOvenCavityOperationalStatePhaseListAttributeCallback::~CHIPOvenCavityOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19716,8 +19984,83 @@ CHIPOvenOperationalStateCountdownTimeAttributeCallback::~CHIPOvenOperationalStat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + if (list.IsNull()) + { + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19725,8 +20068,76 @@ void CHIPOvenOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::~CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19754,9 +20165,9 @@ void CHIPOvenOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * c env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOvenOperationalStateOperationalStateListAttributeCallback::CHIPOvenOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19773,7 +20184,8 @@ CHIPOvenOperationalStateOperationalStateListAttributeCallback::CHIPOvenOperation } } -CHIPOvenOperationalStateOperationalStateListAttributeCallback::~CHIPOvenOperationalStateOperationalStateListAttributeCallback() +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::~ +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19784,10 +20196,10 @@ CHIPOvenOperationalStateOperationalStateListAttributeCallback::~CHIPOvenOperatio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateOperationalStateListAttributeCallback::CallbackFn( +void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenOperationalState::Structs::OperationalStateStruct::DecodableType> & list) + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19796,8 +20208,8 @@ void CHIPOvenOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19839,18 +20251,18 @@ void CHIPOvenOperationalStateOperationalStateListAttributeCallback::CallbackFn( jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenOperationalStateClusterOperationalStateStruct", + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenOperationalStateClusterOperationalStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); return; } jmethodID operationalStateStructStructCtor_1 = env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); if (operationalStateStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenOperationalStateClusterOperationalStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); return; } @@ -19863,9 +20275,9 @@ void CHIPOvenOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::CHIPOvenOperationalStateGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19882,7 +20294,8 @@ CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::CHIPOvenOperation } } -CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::~CHIPOvenOperationalStateGeneratedCommandListAttributeCallback() +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::~ +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19893,7 +20306,7 @@ CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::~CHIPOvenOperatio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -19903,8 +20316,8 @@ void CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19935,9 +20348,9 @@ void CHIPOvenOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::CHIPOvenOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19954,7 +20367,8 @@ CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::CHIPOvenOperationa } } -CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::~CHIPOvenOperationalStateAcceptedCommandListAttributeCallback() +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::~ +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19965,7 +20379,7 @@ CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::~CHIPOvenOperation env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -19975,8 +20389,8 @@ void CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20007,9 +20421,10 @@ void CHIPOvenOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStateEventListAttributeCallback::CHIPOvenOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateEventListAttributeCallback::CHIPOvenCavityOperationalStateEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20025,7 +20440,7 @@ CHIPOvenOperationalStateEventListAttributeCallback::CHIPOvenOperationalStateEven } } -CHIPOvenOperationalStateEventListAttributeCallback::~CHIPOvenOperationalStateEventListAttributeCallback() +CHIPOvenCavityOperationalStateEventListAttributeCallback::~CHIPOvenCavityOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20036,8 +20451,8 @@ CHIPOvenOperationalStateEventListAttributeCallback::~CHIPOvenOperationalStateEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20046,8 +20461,8 @@ void CHIPOvenOperationalStateEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20078,9 +20493,9 @@ void CHIPOvenOperationalStateEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenOperationalStateAttributeListAttributeCallback::CHIPOvenOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CHIPOvenCavityOperationalStateAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20097,7 +20512,7 @@ CHIPOvenOperationalStateAttributeListAttributeCallback::CHIPOvenOperationalState } } -CHIPOvenOperationalStateAttributeListAttributeCallback::~CHIPOvenOperationalStateAttributeListAttributeCallback() +CHIPOvenCavityOperationalStateAttributeListAttributeCallback::~CHIPOvenCavityOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20108,7 +20523,7 @@ CHIPOvenOperationalStateAttributeListAttributeCallback::~CHIPOvenOperationalStat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenOperationalStateAttributeListAttributeCallback::CallbackFn( +void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20118,8 +20533,8 @@ void CHIPOvenOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20150,75 +20565,8 @@ void CHIPOvenOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20234,7 +20582,7 @@ CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttri } } -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20245,9 +20593,9 @@ CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( +void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20256,8 +20604,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20284,21 +20632,30 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -20307,45 +20664,45 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); return; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); return; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20353,8 +20710,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20370,7 +20727,7 @@ CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCa } } -CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() +CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20381,7 +20738,7 @@ CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20389,8 +20746,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20418,8 +20775,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20435,7 +20792,7 @@ CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(job } } -CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() +CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20446,7 +20803,7 @@ CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20454,8 +20811,8 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20483,9 +20840,9 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20501,7 +20858,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedComm } } -CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() +CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20512,7 +20869,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20522,8 +20879,8 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20554,9 +20911,9 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20572,7 +20929,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedComman } } -CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() +CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20583,8 +20940,8 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20593,8 +20950,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20625,8 +20982,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20642,7 +20999,7 @@ CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallba } } -CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() +CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20653,8 +21010,8 @@ CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20663,8 +21020,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20695,8 +21052,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20712,7 +21069,7 @@ CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttribu } } -CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() +CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20723,8 +21080,8 @@ CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20733,8 +21090,8 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20765,9 +21122,9 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20784,7 +21141,7 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSuppo } } -CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() +CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::~CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20795,10 +21152,8 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20807,8 +21162,8 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20827,85 +21182,11 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20913,9 +21194,10 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20931,7 +21213,7 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpM } } -CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() +CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::~CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20942,8 +21224,8 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20951,8 +21233,8 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20980,8 +21262,10 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20997,7 +21281,7 @@ CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttribu } } -CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() +CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::~CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21008,7 +21292,8 @@ CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21016,8 +21301,9 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21025,29 +21311,32 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( +CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21064,7 +21353,7 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherMod } } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() +CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::~CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21075,7 +21364,7 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21085,8 +21374,8 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21117,9 +21406,80 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryDryerControlsEventListAttributeCallback::CHIPLaundryDryerControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLaundryDryerControlsEventListAttributeCallback::~CHIPLaundryDryerControlsEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPLaundryDryerControlsAttributeListAttributeCallback::CHIPLaundryDryerControlsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21136,7 +21496,7 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherMode } } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() +CHIPLaundryDryerControlsAttributeListAttributeCallback::~CHIPLaundryDryerControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21147,8 +21507,8 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21157,8 +21517,8 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21189,9 +21549,9 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21207,7 +21567,7 @@ CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListA } } -CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() +CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21218,8 +21578,8 @@ CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21227,9 +21587,8 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21237,105 +21596,28 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) + jobject javaValue; + if (value.IsNull()) { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; + javaValue = nullptr; } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + else { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21351,8 +21633,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() +CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21363,10 +21644,9 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( +void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21375,9 +21655,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21404,30 +21683,21 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -21436,53 +21706,45 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); return; } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) + jmethodID semanticTagStructStructCtor_3 = + env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (semanticTagStructStructCtor_3 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); return; } - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21490,11 +21752,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21510,8 +21769,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback( } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() +CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21522,8 +21780,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21531,9 +21788,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21561,11 +21817,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21581,8 +21834,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobje } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() +CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21593,8 +21845,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21602,9 +21853,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21632,11 +21882,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21652,8 +21900,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() +CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21664,7 +21911,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21674,11 +21921,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21709,11 +21953,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21729,8 +21971,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() +CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21741,7 +21982,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21751,11 +21992,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21786,11 +22024,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21806,8 +22041,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jo } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() +CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21818,8 +22052,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21828,9 +22062,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21861,11 +22094,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21881,8 +22111,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() +CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21893,8 +22122,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21903,9 +22132,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21936,9 +22164,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, +CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21955,7 +22183,7 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsS } } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() +CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21966,8 +22194,10 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControls env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21976,8 +22206,8 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21996,7 +22226,85 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22004,10 +22312,9 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22023,7 +22330,7 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherCon } } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() +CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22034,8 +22341,8 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherCo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22043,8 +22350,8 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22072,10 +22379,8 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22091,7 +22396,7 @@ CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherCont } } -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() +CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22102,9 +22407,7 @@ CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22112,9 +22415,8 @@ void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22122,32 +22424,29 @@ void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22164,7 +22463,7 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWashe } } -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22175,7 +22474,7 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWash env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22185,8 +22484,8 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22217,9 +22516,9 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22236,7 +22535,7 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasher } } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22247,7 +22546,7 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWashe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22257,8 +22556,8 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22289,9 +22588,9 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22307,7 +22606,7 @@ CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEv } } -CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() +CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22318,8 +22617,8 @@ CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsE env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22328,8 +22627,8 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22360,10 +22659,9 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22379,7 +22677,7 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherContro } } -CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() +CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22390,7 +22688,7 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherContr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22400,8 +22698,8 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22432,8 +22730,11 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22449,7 +22750,8 @@ CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttri } } -CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22460,9 +22762,10 @@ CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22471,8 +22774,9 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22533,17 +22837,21 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + ChipLogError( + Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); return; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); return; } @@ -22554,17 +22862,21 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); return; } @@ -22577,8 +22889,11 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22594,7 +22909,8 @@ CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(job } } -CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22605,7 +22921,8 @@ CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22613,8 +22930,9 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22642,9 +22960,11 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22660,7 +22980,8 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedComm } } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22671,7 +22992,78 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22681,8 +23073,11 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22713,9 +23108,11 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22731,7 +23128,8 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedComman } } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22742,7 +23140,7 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22752,8 +23150,11 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22784,8 +23185,11 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22801,7 +23205,8 @@ CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallba } } -CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22812,8 +23217,8 @@ CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22822,8 +23227,9 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22854,8 +23260,11 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22871,7 +23280,8 @@ CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttribu } } -CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22882,8 +23292,8 @@ CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22892,8 +23302,9 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22924,9 +23335,10 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22942,7 +23354,7 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesA } } -CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22953,9 +23365,8 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModes env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22964,8 +23375,8 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22984,85 +23395,7 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23070,8 +23403,10 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23087,7 +23422,7 @@ CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback } } -CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23098,7 +23433,8 @@ CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23106,8 +23442,8 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23135,9 +23471,9 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23154,7 +23490,7 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGenerated } } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23165,8 +23501,9 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23175,8 +23512,8 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23195,11 +23532,11 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23207,9 +23544,9 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23226,7 +23563,7 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCo } } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23237,7 +23574,7 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23247,8 +23584,8 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23279,8 +23616,10 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23296,7 +23635,7 @@ CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCa } } -CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23307,8 +23646,8 @@ CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23317,8 +23656,8 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23349,9 +23688,9 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23367,7 +23706,7 @@ CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAtt } } -CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() +CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23378,8 +23717,8 @@ CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23388,8 +23727,8 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23420,9 +23759,9 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23439,8 +23778,7 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCa } } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::~ -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() +CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23451,8 +23789,8 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23461,8 +23799,8 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23481,7 +23819,11 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23489,10 +23831,8 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23508,7 +23848,7 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureCont } } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() +CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23519,8 +23859,9 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23529,8 +23870,8 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23549,11 +23890,85 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23561,10 +23976,8 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23580,7 +23993,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureContr } } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() +CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23591,8 +24004,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureCont env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23600,9 +24012,8 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23610,32 +24021,29 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23651,7 +24059,7 @@ CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventLis } } -CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() +CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23662,8 +24070,8 @@ CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23672,8 +24080,8 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23704,154 +24112,9 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23867,7 +24130,7 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarm } } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() +CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23878,7 +24141,7 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23888,8 +24151,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23920,9 +24183,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23938,7 +24200,7 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListA } } -CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() +CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23949,8 +24211,8 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23959,8 +24221,8 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23991,9 +24253,8 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24009,7 +24270,7 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttrib } } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() +CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24020,8 +24281,8 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24030,8 +24291,8 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24062,9 +24323,9 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24080,7 +24341,7 @@ CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedMo } } -CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() +CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24091,9 +24352,9 @@ CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( +void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24102,8 +24363,8 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24164,17 +24425,17 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); return; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); return; } @@ -24185,17 +24446,17 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); return; } @@ -24208,9 +24469,8 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24226,7 +24486,7 @@ CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAtt } } -CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() +CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24237,8 +24497,7 @@ CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24246,8 +24505,8 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24275,8 +24534,10 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24292,7 +24553,7 @@ CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCall } } -CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24303,7 +24564,8 @@ CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24311,8 +24573,9 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24320,29 +24583,32 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24359,7 +24625,7 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGener } } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24370,7 +24636,7 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24380,8 +24646,8 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24412,10 +24678,8 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24431,7 +24695,7 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAccept } } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() +CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24442,8 +24706,8 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24452,8 +24716,8 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24484,8 +24748,9 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24501,7 +24766,7 @@ CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttribu } } -CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() +CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24512,8 +24777,8 @@ CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24522,8 +24787,8 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24554,9 +24819,10 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24572,7 +24838,8 @@ CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeLis } } -CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::~ +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24583,8 +24850,8 @@ CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24593,8 +24860,8 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24613,11 +24880,7 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24625,9 +24888,10 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24643,7 +24907,7 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedComm } } -CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() +CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24654,7 +24918,7 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24664,8 +24928,8 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24696,9 +24960,10 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24714,7 +24979,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedComman } } -CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() +CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24725,7 +24990,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24735,8 +25000,8 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24767,8 +25032,9 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24784,7 +25050,7 @@ CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallba } } -CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() +CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24795,8 +25061,8 @@ CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24805,8 +25071,8 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24837,8 +25103,10 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24854,7 +25122,7 @@ CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttribu } } -CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() +CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24865,8 +25133,8 @@ CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24875,8 +25143,8 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24907,9 +25175,9 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24926,7 +25194,7 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGenerated } } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24937,7 +25205,7 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24947,8 +25215,8 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24979,9 +25247,9 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24998,7 +25266,7 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCo } } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25009,7 +25277,7 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25019,8 +25287,8 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25051,8 +25319,9 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25068,7 +25337,7 @@ CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCa } } -CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() +CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25079,8 +25348,8 @@ CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25089,8 +25358,8 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25121,9 +25390,9 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25139,7 +25408,7 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAtt } } -CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() +CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25150,8 +25419,8 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25160,8 +25429,8 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25192,10 +25461,9 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25211,7 +25479,7 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGen } } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() +CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25222,8 +25490,9 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25232,8 +25501,8 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25252,11 +25521,85 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25264,10 +25607,9 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25283,7 +25625,7 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcce } } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() +CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25294,8 +25636,8 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25303,9 +25645,8 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25313,31 +25654,28 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25353,7 +25691,7 @@ CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttri } } -CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() +CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25364,8 +25702,7 @@ CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25373,9 +25710,8 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25383,32 +25719,30 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25424,7 +25758,7 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeL } } -CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() +CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25435,8 +25769,8 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25445,8 +25779,8 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25477,157 +25811,9 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25644,7 +25830,7 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenMod } } -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() +CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25655,7 +25841,7 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25665,8 +25851,8 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25697,10 +25883,8 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25716,7 +25900,7 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenMode } } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() +CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25727,8 +25911,8 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25737,8 +25921,8 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25769,9 +25953,9 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25787,7 +25971,7 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListA } } -CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() +CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25798,8 +25982,8 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25808,8 +25992,8 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25840,9 +26024,9 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, +CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25858,7 +26042,7 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttrib } } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() +CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25869,8 +26053,8 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25879,8 +26063,8 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25911,10 +26095,9 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25930,7 +26113,7 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOven } } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() +CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25941,7 +26124,7 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25951,8 +26134,8 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25983,10 +26166,8 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26002,7 +26183,7 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenC } } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() +CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26013,8 +26194,8 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOven env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26023,8 +26204,8 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26055,9 +26236,8 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26073,7 +26253,7 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEven } } -CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() +CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26084,8 +26264,8 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26094,8 +26274,8 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26126,9 +26306,9 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26145,7 +26325,7 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControl } } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26156,8 +26336,8 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenContro env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26166,8 +26346,8 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26198,9 +26378,10 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26216,7 +26397,7 @@ CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAtt } } -CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26227,8 +26408,8 @@ CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26237,8 +26418,8 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26250,31 +26431,27 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26290,7 +26467,7 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPh } } -CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() +CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26301,8 +26478,8 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentP env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26310,8 +26487,9 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26319,29 +26497,32 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26357,7 +26538,7 @@ CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdow } } -CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() +CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26368,8 +26549,8 @@ CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26377,8 +26558,9 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26386,29 +26568,32 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26425,7 +26610,7 @@ CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateO } } -CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26436,10 +26621,8 @@ CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) +void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26448,8 +26631,8 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26468,46 +26651,11 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return; - } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26515,9 +26663,9 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26534,7 +26682,7 @@ CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateG } } -CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26545,7 +26693,7 @@ CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26555,8 +26703,8 @@ void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26587,10 +26735,8 @@ void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26606,7 +26752,7 @@ CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAc } } -CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() +CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26617,8 +26763,8 @@ CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26627,8 +26773,8 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26659,9 +26805,9 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26677,7 +26823,7 @@ CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAtt } } -CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() +CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26688,8 +26834,8 @@ CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26698,8 +26844,8 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26730,9 +26876,10 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26748,7 +26895,7 @@ CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttribut } } -CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26759,8 +26906,10 @@ CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26769,8 +26918,8 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26789,11 +26938,85 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26801,9 +27024,10 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26819,7 +27043,7 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseL } } -CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26830,8 +27054,8 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhase env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26840,8 +27064,8 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26853,31 +27077,28 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26894,7 +27115,7 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCur } } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26905,8 +27126,8 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26914,8 +27135,9 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26923,30 +27145,32 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26962,7 +27186,7 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCo } } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() +CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26973,8 +27197,8 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26982,8 +27206,9 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26991,30 +27216,32 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27030,7 +27257,7 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() +CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27041,10 +27268,8 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) +void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27053,8 +27278,8 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27073,46 +27298,11 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); - return; - } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27120,9 +27310,9 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27139,7 +27329,7 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27150,7 +27340,7 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27160,8 +27350,8 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27192,9 +27382,9 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27211,7 +27401,7 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalS } } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27222,7 +27412,7 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperational env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27232,8 +27422,8 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27264,9 +27454,9 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27282,7 +27472,7 @@ CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventL } } -CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() +CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27293,8 +27483,8 @@ CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27303,8 +27493,8 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27335,9 +27525,9 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27354,7 +27544,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAt } } -CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() +CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27365,7 +27555,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( +void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27375,8 +27565,8 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27407,10 +27597,9 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27426,7 +27615,7 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitori } } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() +CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27437,8 +27626,8 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27446,8 +27635,9 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27455,30 +27645,35 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) + jobject arrayListObj; + if (list.IsNull()) { - javaValue = nullptr; + arrayListObj = nullptr; } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27494,7 +27689,7 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterM } } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() +CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27505,10 +27700,8 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilter env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) +void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27516,9 +27709,8 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27526,58 +27718,29 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); - return; - } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27593,7 +27756,7 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMon } } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27604,8 +27767,8 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27613,9 +27776,8 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27623,32 +27785,29 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( +CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27665,7 +27824,7 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMoni } } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27676,8 +27835,10 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27686,8 +27847,8 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27706,11 +27867,46 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); + return; + } + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27718,9 +27914,10 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27736,7 +27933,7 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEven } } -CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() +CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27747,8 +27944,8 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27757,8 +27954,8 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27789,9 +27986,9 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27808,7 +28005,7 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoring } } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() +CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27819,8 +28016,8 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitorin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27829,8 +28026,8 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27861,182 +28058,9 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); - return; - } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28052,8 +28076,7 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject } } -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28064,8 +28087,8 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28074,8 +28097,8 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28106,10 +28129,9 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28125,8 +28147,7 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject } } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28137,8 +28158,8 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28147,8 +28168,8 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28179,10 +28200,9 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28198,7 +28218,7 @@ CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarb } } -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback() +CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28209,8 +28229,8 @@ CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28219,8 +28239,8 @@ void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28232,28 +28252,31 @@ void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + if (list.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28270,8 +28293,7 @@ CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCa } } -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28282,8 +28304,8 @@ CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28291,9 +28313,8 @@ void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28301,31 +28322,30 @@ void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28341,7 +28361,7 @@ CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(j } } -CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback() +CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28352,8 +28372,8 @@ CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockLockStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28361,8 +28381,8 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28370,7 +28390,7 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -28380,18 +28400,20 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28407,7 +28429,7 @@ CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(j } } -CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback() +CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28418,8 +28440,10 @@ CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28427,8 +28451,9 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28436,29 +28461,68 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + return; + } + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28474,7 +28538,7 @@ CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandL } } -CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommandListAttributeCallback() +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28485,7 +28549,7 @@ CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28495,8 +28559,8 @@ void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28527,9 +28591,10 @@ void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28545,7 +28610,7 @@ CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandLis } } -CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandListAttributeCallback() +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28556,8 +28621,8 @@ CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28566,8 +28631,8 @@ void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28598,8 +28663,9 @@ void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28615,7 +28681,7 @@ CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(j } } -CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback() +CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28626,8 +28692,8 @@ CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28636,8 +28702,8 @@ void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28668,8 +28734,10 @@ void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28685,7 +28753,7 @@ CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCa } } -CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() +CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28696,8 +28764,8 @@ CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28706,8 +28774,8 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28738,9 +28806,9 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28757,7 +28825,7 @@ CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurren } } -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28768,8 +28836,8 @@ CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurre env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28777,8 +28845,8 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28786,7 +28854,7 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -28796,19 +28864,19 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28825,7 +28893,7 @@ CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurren } } -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28836,8 +28904,10 @@ CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurre env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28845,8 +28915,9 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28854,29 +28925,57 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + return; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + return; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28893,8 +28992,7 @@ CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCove } } -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::~ -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28905,8 +29003,8 @@ CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28914,8 +29012,9 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28923,29 +29022,32 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28962,8 +29064,7 @@ CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCove } } -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::~ -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28974,8 +29075,8 @@ CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28983,8 +29084,9 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28992,30 +29094,32 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29031,8 +29135,7 @@ CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaC } } -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::~ -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() +CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29043,8 +29146,8 @@ CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29052,8 +29155,9 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29061,29 +29165,32 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29100,8 +29207,7 @@ CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaC } } -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::~ -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() +CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29112,8 +29218,8 @@ CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29121,8 +29227,9 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29130,29 +29237,32 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29169,8 +29279,8 @@ CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject java } } -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::~ -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29181,8 +29291,8 @@ CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29190,8 +29300,8 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29199,7 +29309,7 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -29209,19 +29319,20 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29238,8 +29349,8 @@ CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject java } } -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::~ -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29250,8 +29361,10 @@ CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29259,8 +29372,10 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29268,29 +29383,58 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + return; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29307,7 +29451,8 @@ CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGener } } -CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGeneratedCommandListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29318,7 +29463,7 @@ CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29328,8 +29473,8 @@ void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29360,9 +29505,9 @@ void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29379,7 +29524,8 @@ CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAccept } } -CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAcceptedCommandListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29390,7 +29536,7 @@ CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29400,8 +29546,8 @@ void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29432,8 +29578,10 @@ void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29449,7 +29597,7 @@ CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttribu } } -CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29460,8 +29608,8 @@ CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29470,8 +29618,8 @@ void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29502,9 +29650,10 @@ void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29520,7 +29669,8 @@ CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeLis } } -CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29531,7 +29681,7 @@ CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( +void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29541,8 +29691,8 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29573,9 +29723,9 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback:: +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29592,7 +29742,8 @@ CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGener } } -CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGeneratedCommandListAttributeCallback() +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback::~ +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29603,7 +29754,7 @@ CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29613,8 +29764,8 @@ void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29645,9 +29796,9 @@ void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback:: +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29664,7 +29815,8 @@ CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAccept } } -CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAcceptedCommandListAttributeCallback() +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback::~ +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29675,7 +29827,7 @@ CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29685,8 +29837,8 @@ void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29717,8 +29869,10 @@ void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateConfigurationEventListAttributeCallback::CHIPBooleanStateConfigurationEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29734,7 +29888,7 @@ CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttribu } } -CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttributeCallback() +CHIPBooleanStateConfigurationEventListAttributeCallback::~CHIPBooleanStateConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29745,8 +29899,8 @@ CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29755,8 +29909,8 @@ void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29787,9 +29941,10 @@ void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateConfigurationAttributeListAttributeCallback::CHIPBooleanStateConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29805,7 +29960,7 @@ CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeLis } } -CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() +CHIPBooleanStateConfigurationAttributeListAttributeCallback::~CHIPBooleanStateConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29816,7 +29971,7 @@ CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29826,8 +29981,8 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29858,9 +30013,9 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( +CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CHIPValveConfigurationAndControlOpenDurationAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29877,7 +30032,7 @@ CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurati } } -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() +CHIPValveConfigurationAndControlOpenDurationAttributeCallback::~CHIPValveConfigurationAndControlOpenDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29888,8 +30043,8 @@ CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29897,8 +30052,8 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29906,7 +30061,7 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -29916,19 +30071,19 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback:: +CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29945,7 +30100,8 @@ CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationA } } -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() +CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback::~ +CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29956,8 +30112,8 @@ CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfiguration env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlDefaultOpenDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29965,8 +30121,8 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29974,7 +30130,7 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -29984,19 +30140,19 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( +CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30013,7 +30169,7 @@ CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAn } } -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() +CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::~CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30024,8 +30180,8 @@ CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30033,8 +30189,8 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30042,7 +30198,7 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -30052,19 +30208,19 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback:: +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30081,8 +30237,8 @@ CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfig } } -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::~ -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback::~ +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30093,8 +30249,8 @@ CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlRemainingDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30102,8 +30258,8 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30111,7 +30267,7 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -30121,19 +30277,19 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( +CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CHIPValveConfigurationAndControlCurrentStateAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30150,8 +30306,7 @@ CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfig } } -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::~ -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() +CHIPValveConfigurationAndControlCurrentStateAttributeCallback::~CHIPValveConfigurationAndControlCurrentStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30162,8 +30317,8 @@ CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30171,8 +30326,8 @@ void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30200,9 +30355,9 @@ void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( +CHIPValveConfigurationAndControlTargetStateAttributeCallback::CHIPValveConfigurationAndControlTargetStateAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30219,7 +30374,7 @@ CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigu } } -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() +CHIPValveConfigurationAndControlTargetStateAttributeCallback::~CHIPValveConfigurationAndControlTargetStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30230,8 +30385,8 @@ CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlTargetStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30239,8 +30394,8 @@ void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30268,9 +30423,9 @@ void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( +CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CHIPValveConfigurationAndControlCurrentLevelAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30287,7 +30442,7 @@ CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigu } } -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() +CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::~CHIPValveConfigurationAndControlCurrentLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30298,8 +30453,8 @@ CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30307,8 +30462,8 @@ void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30336,9 +30491,9 @@ void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( +CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CHIPValveConfigurationAndControlTargetLevelAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30355,7 +30510,7 @@ CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigura } } -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() +CHIPValveConfigurationAndControlTargetLevelAttributeCallback::~CHIPValveConfigurationAndControlTargetLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30366,8 +30521,8 @@ CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30375,8 +30530,8 @@ void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30404,9 +30559,9 @@ void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback:: +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30423,7 +30578,8 @@ CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigura } } -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback::~ +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30434,8 +30590,8 @@ CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30443,8 +30599,9 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30452,29 +30609,32 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback:: +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30491,7 +30651,8 @@ CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback::~ +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30502,8 +30663,8 @@ CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30511,8 +30672,9 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30520,29 +30682,32 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( +CHIPValveConfigurationAndControlEventListAttributeCallback::CHIPValveConfigurationAndControlEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30559,7 +30724,7 @@ CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() +CHIPValveConfigurationAndControlEventListAttributeCallback::~CHIPValveConfigurationAndControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30570,8 +30735,8 @@ CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30579,8 +30744,9 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30588,29 +30754,32 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( +CHIPValveConfigurationAndControlAttributeListAttributeCallback::CHIPValveConfigurationAndControlAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30627,7 +30796,7 @@ CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() +CHIPValveConfigurationAndControlAttributeListAttributeCallback::~CHIPValveConfigurationAndControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30638,8 +30807,8 @@ CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30647,8 +30816,9 @@ void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(vo jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30656,29 +30826,32 @@ void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(vo ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback:: +CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30695,7 +30868,8 @@ CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() +CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback::~ +CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30706,8 +30880,8 @@ CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPElectricalEnergyMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30715,8 +30889,9 @@ void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(vo jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30724,29 +30899,32 @@ void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(vo ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback:: +CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30763,7 +30941,8 @@ CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationA } } -CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() +CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback::~ +CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30774,8 +30953,8 @@ CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfiguration env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPElectricalEnergyMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30783,8 +30962,9 @@ void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30792,29 +30972,32 @@ void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalEnergyMeasurementEventListAttributeCallback::CHIPElectricalEnergyMeasurementEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30831,7 +31014,7 @@ CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndC } } -CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() +CHIPElectricalEnergyMeasurementEventListAttributeCallback::~CHIPElectricalEnergyMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30842,8 +31025,8 @@ CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAnd env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPElectricalEnergyMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30851,8 +31034,9 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30860,29 +31044,32 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::CHIPElectricalEnergyMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30899,8 +31086,7 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject jav } } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::~ -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::~CHIPElectricalEnergyMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30911,8 +31097,8 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPElectricalEnergyMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30920,8 +31106,9 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30929,29 +31116,32 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback:: +CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30968,7 +31158,8 @@ CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndC } } -CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() +CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback::~ +CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30979,8 +31170,10 @@ CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAnd env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPDemandResponseLoadControlLoadControlProgramsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30988,8 +31181,9 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30997,27 +31191,5868 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_programID; + jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.size()), + reinterpret_cast(entry_0.programID.data())); + newElement_0_programID = newElement_0_programIDByteArray; + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_enrollmentGroup; + if (entry_0.enrollmentGroup.IsNull()) + { + newElement_0_enrollmentGroup = nullptr; + } + else + { + std::string newElement_0_enrollmentGroupClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroup = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupClassName.c_str(), newElement_0_enrollmentGroupCtorSignature.c_str(), + jninewElement_0_enrollmentGroup, newElement_0_enrollmentGroup); + } + jobject newElement_0_randomStartMinutes; + if (entry_0.randomStartMinutes.IsNull()) + { + newElement_0_randomStartMinutes = nullptr; + } + else + { + std::string newElement_0_randomStartMinutesClassName = "java/lang/Integer"; + std::string newElement_0_randomStartMinutesCtorSignature = "(I)V"; + jint jninewElement_0_randomStartMinutes = static_cast(entry_0.randomStartMinutes.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_randomStartMinutesClassName.c_str(), newElement_0_randomStartMinutesCtorSignature.c_str(), + jninewElement_0_randomStartMinutes, newElement_0_randomStartMinutes); + } + jobject newElement_0_randomDurationMinutes; + if (entry_0.randomDurationMinutes.IsNull()) + { + newElement_0_randomDurationMinutes = nullptr; + } + else + { + std::string newElement_0_randomDurationMinutesClassName = "java/lang/Integer"; + std::string newElement_0_randomDurationMinutesCtorSignature = "(I)V"; + jint jninewElement_0_randomDurationMinutes = static_cast(entry_0.randomDurationMinutes.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_randomDurationMinutesClassName.c_str(), newElement_0_randomDurationMinutesCtorSignature.c_str(), + jninewElement_0_randomDurationMinutes, newElement_0_randomDurationMinutes); + } + + jclass loadControlProgramStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", + loadControlProgramStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); + return; + } + jmethodID loadControlProgramStructStructCtor_1 = + env->GetMethodID(loadControlProgramStructStructClass_1, "", + "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (loadControlProgramStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); + return; + } + + newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, + newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, + newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: +CHIPDemandResponseLoadControlEventsAttributeCallback::CHIPDemandResponseLoadControlEventsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlEventsAttributeCallback::~CHIPDemandResponseLoadControlEventsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlEventsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_eventID; + jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); + env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), + reinterpret_cast(entry_0.eventID.data())); + newElement_0_eventID = newElement_0_eventIDByteArray; + jobject newElement_0_programID; + if (entry_0.programID.IsNull()) + { + newElement_0_programID = nullptr; + } + else + { + jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), + reinterpret_cast(entry_0.programID.Value().data())); + newElement_0_programID = newElement_0_programIDByteArray; + } + jobject newElement_0_control; + std::string newElement_0_controlClassName = "java/lang/Integer"; + std::string newElement_0_controlCtorSignature = "(I)V"; + jint jninewElement_0_control = static_cast(entry_0.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), + newElement_0_controlCtorSignature.c_str(), + jninewElement_0_control, newElement_0_control); + jobject newElement_0_deviceClass; + std::string newElement_0_deviceClassClassName = "java/lang/Long"; + std::string newElement_0_deviceClassCtorSignature = "(J)V"; + jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), + newElement_0_deviceClassCtorSignature.c_str(), + jninewElement_0_deviceClass, newElement_0_deviceClass); + jobject newElement_0_enrollmentGroup; + if (!entry_0.enrollmentGroup.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); + } + else + { + jobject newElement_0_enrollmentGroupInsideOptional; + std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), + newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroupInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroup); + } + jobject newElement_0_criticality; + std::string newElement_0_criticalityClassName = "java/lang/Integer"; + std::string newElement_0_criticalityCtorSignature = "(I)V"; + jint jninewElement_0_criticality = static_cast(entry_0.criticality); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), + newElement_0_criticalityCtorSignature.c_str(), + jninewElement_0_criticality, newElement_0_criticality); + jobject newElement_0_startTime; + if (entry_0.startTime.IsNull()) + { + newElement_0_startTime = nullptr; + } + else + { + std::string newElement_0_startTimeClassName = "java/lang/Long"; + std::string newElement_0_startTimeCtorSignature = "(J)V"; + jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), + newElement_0_startTimeCtorSignature.c_str(), + jninewElement_0_startTime, newElement_0_startTime); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_duration; + std::string newElement_2_durationClassName = "java/lang/Integer"; + std::string newElement_2_durationCtorSignature = "(I)V"; + jint jninewElement_2_duration = static_cast(entry_2.duration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), + newElement_2_durationCtorSignature.c_str(), + jninewElement_2_duration, newElement_2_duration); + jobject newElement_2_control; + std::string newElement_2_controlClassName = "java/lang/Integer"; + std::string newElement_2_controlCtorSignature = "(I)V"; + jint jninewElement_2_control = static_cast(entry_2.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), + newElement_2_controlCtorSignature.c_str(), + jninewElement_2_control, newElement_2_control); + jobject newElement_2_temperatureControl; + if (!entry_2.temperatureControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); + } + else + { + jobject newElement_2_temperatureControlInsideOptional; + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; + if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; + if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; + if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; + if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return; + } + jmethodID temperatureControlStructStructCtor_5 = + env->GetMethodID(temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return; + } + + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, + newElement_2_temperatureControl); + } + jobject newElement_2_averageLoadControl; + if (!entry_2.averageLoadControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); + } + else + { + jobject newElement_2_averageLoadControlInsideOptional; + jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; + jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = + static_cast(entry_2.averageLoadControl.Value().loadAdjustment); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), + newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), + jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return; + } + jmethodID averageLoadControlStructStructCtor_5 = + env->GetMethodID(averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return; + } + + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, + newElement_2_averageLoadControl); + } + jobject newElement_2_dutyCycleControl; + if (!entry_2.dutyCycleControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); + } + else + { + jobject newElement_2_dutyCycleControlInsideOptional; + jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; + jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = + static_cast(entry_2.dutyCycleControl.Value().dutyCycle); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), + newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), + jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return; + } + jmethodID dutyCycleControlStructStructCtor_5 = + env->GetMethodID(dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return; + } + + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, + newElement_2_dutyCycleControl); + } + jobject newElement_2_powerSavingsControl; + if (!entry_2.powerSavingsControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); + } + else + { + jobject newElement_2_powerSavingsControlInsideOptional; + jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; + jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = + static_cast(entry_2.powerSavingsControl.Value().powerSavings); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), + newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), + jninewElement_2_powerSavingsControlInsideOptional_powerSavings, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return; + } + jmethodID powerSavingsControlStructStructCtor_5 = + env->GetMethodID(powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return; + } + + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, + newElement_2_powerSavingsControl); + } + jobject newElement_2_heatingSourceControl; + if (!entry_2.heatingSourceControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); + } + else + { + jobject newElement_2_heatingSourceControlInsideOptional; + jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; + jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = + static_cast(entry_2.heatingSourceControl.Value().heatingSource); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), + newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), + jninewElement_2_heatingSourceControlInsideOptional_heatingSource, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return; + } + jmethodID heatingSourceControlStructStructCtor_5 = + env->GetMethodID(heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); + return; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + jclass loadControlEventTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + return; + } + jmethodID loadControlEventTransitionStructStructCtor_3 = + env->GetMethodID(loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (loadControlEventTransitionStructStructCtor_3 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct constructor"); + return; + } + + newElement_2 = env->NewObject( + loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, + newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, + newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + + jclass loadControlEventStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); + return; + } + jmethodID loadControlEventStructStructCtor_1 = + env->GetMethodID(loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/" + "util/ArrayList;)V"); + if (loadControlEventStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, + newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, + newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDemandResponseLoadControlActiveEventsAttributeCallback::CHIPDemandResponseLoadControlActiveEventsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlActiveEventsAttributeCallback::~CHIPDemandResponseLoadControlActiveEventsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlActiveEventsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_eventID; + jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); + env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), + reinterpret_cast(entry_0.eventID.data())); + newElement_0_eventID = newElement_0_eventIDByteArray; + jobject newElement_0_programID; + if (entry_0.programID.IsNull()) + { + newElement_0_programID = nullptr; + } + else + { + jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); + env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), + reinterpret_cast(entry_0.programID.Value().data())); + newElement_0_programID = newElement_0_programIDByteArray; + } + jobject newElement_0_control; + std::string newElement_0_controlClassName = "java/lang/Integer"; + std::string newElement_0_controlCtorSignature = "(I)V"; + jint jninewElement_0_control = static_cast(entry_0.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), + newElement_0_controlCtorSignature.c_str(), + jninewElement_0_control, newElement_0_control); + jobject newElement_0_deviceClass; + std::string newElement_0_deviceClassClassName = "java/lang/Long"; + std::string newElement_0_deviceClassCtorSignature = "(J)V"; + jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), + newElement_0_deviceClassCtorSignature.c_str(), + jninewElement_0_deviceClass, newElement_0_deviceClass); + jobject newElement_0_enrollmentGroup; + if (!entry_0.enrollmentGroup.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); + } + else + { + jobject newElement_0_enrollmentGroupInsideOptional; + std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), + newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroupInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, + newElement_0_enrollmentGroup); + } + jobject newElement_0_criticality; + std::string newElement_0_criticalityClassName = "java/lang/Integer"; + std::string newElement_0_criticalityCtorSignature = "(I)V"; + jint jninewElement_0_criticality = static_cast(entry_0.criticality); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), + newElement_0_criticalityCtorSignature.c_str(), + jninewElement_0_criticality, newElement_0_criticality); + jobject newElement_0_startTime; + if (entry_0.startTime.IsNull()) + { + newElement_0_startTime = nullptr; + } + else + { + std::string newElement_0_startTimeClassName = "java/lang/Long"; + std::string newElement_0_startTimeCtorSignature = "(J)V"; + jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), + newElement_0_startTimeCtorSignature.c_str(), + jninewElement_0_startTime, newElement_0_startTime); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_duration; + std::string newElement_2_durationClassName = "java/lang/Integer"; + std::string newElement_2_durationCtorSignature = "(I)V"; + jint jninewElement_2_duration = static_cast(entry_2.duration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), + newElement_2_durationCtorSignature.c_str(), + jninewElement_2_duration, newElement_2_duration); + jobject newElement_2_control; + std::string newElement_2_controlClassName = "java/lang/Integer"; + std::string newElement_2_controlCtorSignature = "(I)V"; + jint jninewElement_2_control = static_cast(entry_2.control.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), + newElement_2_controlCtorSignature.c_str(), + jninewElement_2_control, newElement_2_control); + jobject newElement_2_temperatureControl; + if (!entry_2.temperatureControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); + } + else + { + jobject newElement_2_temperatureControlInsideOptional; + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; + if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; + if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset); + } + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; + if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); + } + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; + if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional( + nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + else + { + jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) + { + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; + } + else + { + std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = + "java/lang/Integer"; + std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = + "(I)V"; + jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = + static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName.c_str(), + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional( + newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } + + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return; + } + jmethodID temperatureControlStructStructCtor_5 = + env->GetMethodID(temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return; + } + + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, + newElement_2_temperatureControl); + } + jobject newElement_2_averageLoadControl; + if (!entry_2.averageLoadControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); + } + else + { + jobject newElement_2_averageLoadControlInsideOptional; + jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; + std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; + jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = + static_cast(entry_2.averageLoadControl.Value().loadAdjustment); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), + newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), + jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return; + } + jmethodID averageLoadControlStructStructCtor_5 = + env->GetMethodID(averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return; + } + + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, + newElement_2_averageLoadControl); + } + jobject newElement_2_dutyCycleControl; + if (!entry_2.dutyCycleControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); + } + else + { + jobject newElement_2_dutyCycleControlInsideOptional; + jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; + std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; + jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = + static_cast(entry_2.dutyCycleControl.Value().dutyCycle); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), + newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), + jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return; + } + jmethodID dutyCycleControlStructStructCtor_5 = + env->GetMethodID(dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return; + } + + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, + newElement_2_dutyCycleControl); + } + jobject newElement_2_powerSavingsControl; + if (!entry_2.powerSavingsControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); + } + else + { + jobject newElement_2_powerSavingsControlInsideOptional; + jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; + std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; + jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = + static_cast(entry_2.powerSavingsControl.Value().powerSavings); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), + newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), + jninewElement_2_powerSavingsControlInsideOptional_powerSavings, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return; + } + jmethodID powerSavingsControlStructStructCtor_5 = + env->GetMethodID(powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return; + } + + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, + newElement_2_powerSavingsControl); + } + jobject newElement_2_heatingSourceControl; + if (!entry_2.heatingSourceControl.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); + } + else + { + jobject newElement_2_heatingSourceControlInsideOptional; + jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; + std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; + jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = + static_cast(entry_2.heatingSourceControl.Value().heatingSource); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), + newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), + jninewElement_2_heatingSourceControlInsideOptional_heatingSource, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return; + } + jmethodID heatingSourceControlStructStructCtor_5 = + env->GetMethodID(heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V"); + if (heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); + return; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + jclass loadControlEventTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + return; + } + jmethodID loadControlEventTransitionStructStructCtor_3 = + env->GetMethodID(loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (loadControlEventTransitionStructStructCtor_3 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct constructor"); + return; + } + + newElement_2 = env->NewObject( + loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, + newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, + newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + + jclass loadControlEventStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); + return; + } + jmethodID loadControlEventStructStructCtor_1 = + env->GetMethodID(loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/" + "util/ArrayList;)V"); + if (loadControlEventStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, + newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, + newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback:: +CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback::~ +CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback:: +CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback::~ +CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDemandResponseLoadControlEventListAttributeCallback::CHIPDemandResponseLoadControlEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlEventListAttributeCallback::~CHIPDemandResponseLoadControlEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDemandResponseLoadControlAttributeListAttributeCallback::CHIPDemandResponseLoadControlAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDemandResponseLoadControlAttributeListAttributeCallback::~CHIPDemandResponseLoadControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDemandResponseLoadControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback:: +CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback::~ +CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDeviceEnergyManagementPowerAdjustmentCapabilityAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::Nullable> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + if (list.IsNull()) + { + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + jobject newElement_1_minPower; + std::string newElement_1_minPowerClassName = "java/lang/Long"; + std::string newElement_1_minPowerCtorSignature = "(J)V"; + jlong jninewElement_1_minPower = static_cast(entry_1.minPower); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_minPowerClassName.c_str(), + newElement_1_minPowerCtorSignature.c_str(), + jninewElement_1_minPower, newElement_1_minPower); + jobject newElement_1_maxPower; + std::string newElement_1_maxPowerClassName = "java/lang/Long"; + std::string newElement_1_maxPowerCtorSignature = "(J)V"; + jlong jninewElement_1_maxPower = static_cast(entry_1.maxPower); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_maxPowerClassName.c_str(), + newElement_1_maxPowerCtorSignature.c_str(), + jninewElement_1_maxPower, newElement_1_maxPower); + jobject newElement_1_minDuration; + std::string newElement_1_minDurationClassName = "java/lang/Long"; + std::string newElement_1_minDurationCtorSignature = "(J)V"; + jlong jninewElement_1_minDuration = static_cast(entry_1.minDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_minDurationClassName.c_str(), + newElement_1_minDurationCtorSignature.c_str(), + jninewElement_1_minDuration, newElement_1_minDuration); + jobject newElement_1_maxDuration; + std::string newElement_1_maxDurationClassName = "java/lang/Long"; + std::string newElement_1_maxDurationCtorSignature = "(J)V"; + jlong jninewElement_1_maxDuration = static_cast(entry_1.maxDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_maxDurationClassName.c_str(), + newElement_1_maxDurationCtorSignature.c_str(), + jninewElement_1_maxDuration, newElement_1_maxDuration); + + jclass powerAdjustStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", + powerAdjustStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); + return; + } + jmethodID powerAdjustStructStructCtor_2 = env->GetMethodID( + powerAdjustStructStructClass_2, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (powerAdjustStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); + return; + } + + newElement_1 = env->NewObject(powerAdjustStructStructClass_2, powerAdjustStructStructCtor_2, newElement_1_minPower, + newElement_1_maxPower, newElement_1_minDuration, newElement_1_maxDuration); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::~CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDeviceEnergyManagementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::~CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDeviceEnergyManagementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDeviceEnergyManagementEventListAttributeCallback::CHIPDeviceEnergyManagementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDeviceEnergyManagementEventListAttributeCallback::~CHIPDeviceEnergyManagementEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDeviceEnergyManagementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDeviceEnergyManagementAttributeListAttributeCallback::CHIPDeviceEnergyManagementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDeviceEnergyManagementAttributeListAttributeCallback::~CHIPDeviceEnergyManagementAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDeviceEnergyManagementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPEnergyEvseStateAttributeCallback::CHIPEnergyEvseStateAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseStateAttributeCallback::~CHIPEnergyEvseStateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseChargingEnabledUntilAttributeCallback::CHIPEnergyEvseChargingEnabledUntilAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseChargingEnabledUntilAttributeCallback::~CHIPEnergyEvseChargingEnabledUntilAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseChargingEnabledUntilAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::CHIPEnergyEvseDischargingEnabledUntilAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::~CHIPEnergyEvseDischargingEnabledUntilAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseDischargingEnabledUntilAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseNextChargeStartTimeAttributeCallback::CHIPEnergyEvseNextChargeStartTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseNextChargeStartTimeAttributeCallback::~CHIPEnergyEvseNextChargeStartTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseNextChargeStartTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::CHIPEnergyEvseNextChargeTargetTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::~CHIPEnergyEvseNextChargeTargetTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseNextChargeTargetTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::~CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseNextChargeRequiredEnergyAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::CHIPEnergyEvseNextChargeTargetSoCAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::~CHIPEnergyEvseNextChargeTargetSoCAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseNextChargeTargetSoCAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::~CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseApproximateEVEfficiencyAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseStateOfChargeAttributeCallback::CHIPEnergyEvseStateOfChargeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseStateOfChargeAttributeCallback::~CHIPEnergyEvseStateOfChargeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseStateOfChargeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseBatteryCapacityAttributeCallback::CHIPEnergyEvseBatteryCapacityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseBatteryCapacityAttributeCallback::~CHIPEnergyEvseBatteryCapacityAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseBatteryCapacityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseVehicleIDAttributeCallback::CHIPEnergyEvseVehicleIDAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseVehicleIDAttributeCallback::~CHIPEnergyEvseVehicleIDAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseVehicleIDAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseSessionIDAttributeCallback::CHIPEnergyEvseSessionIDAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseSessionIDAttributeCallback::~CHIPEnergyEvseSessionIDAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseSessionIDAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseSessionDurationAttributeCallback::CHIPEnergyEvseSessionDurationAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseSessionDurationAttributeCallback::~CHIPEnergyEvseSessionDurationAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseSessionDurationAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseSessionEnergyChargedAttributeCallback::CHIPEnergyEvseSessionEnergyChargedAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseSessionEnergyChargedAttributeCallback::~CHIPEnergyEvseSessionEnergyChargedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseSessionEnergyChargedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::CHIPEnergyEvseSessionEnergyDischargedAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::~CHIPEnergyEvseSessionEnergyDischargedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseSessionEnergyDischargedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPEnergyEvseGeneratedCommandListAttributeCallback::CHIPEnergyEvseGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseGeneratedCommandListAttributeCallback::~CHIPEnergyEvseGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPEnergyEvseAcceptedCommandListAttributeCallback::CHIPEnergyEvseAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseAcceptedCommandListAttributeCallback::~CHIPEnergyEvseAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPEnergyEvseEventListAttributeCallback::CHIPEnergyEvseEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseEventListAttributeCallback::~CHIPEnergyEvseEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPEnergyEvseAttributeListAttributeCallback::CHIPEnergyEvseAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPEnergyEvseAttributeListAttributeCallback::~CHIPEnergyEvseAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPEnergyEvseAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockLockStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::~ +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::~ +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::~ +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::~ +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::~ +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::~ +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::~ +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::~ +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::~ +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) @@ -33710,9 +39745,498 @@ void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPointBIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPointBIntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPointBIntensityAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -33729,7 +40253,8 @@ CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPoin } } -CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPointBIntensityAttributeCallback() +CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::~ +CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -33740,8 +40265,8 @@ CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPoi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -33749,8 +40274,8 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -33778,9 +40303,9 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback( +CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfigurationLampRatedHoursAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -33797,7 +40322,7 @@ CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControl } } -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback() +CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurationLampRatedHoursAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -33808,8 +40333,8 @@ CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorContro env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -33817,8 +40342,8 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -33826,7 +40351,7 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -33836,19 +40361,19 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfigurationLampBurnHoursAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -33865,7 +40390,7 @@ CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGenerated } } -CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGeneratedCommandListAttributeCallback() +CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfigurationLampBurnHoursAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -33876,7 +40401,143 @@ CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfigurationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfigurationGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -33886,8 +40547,8 @@ void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -33918,9 +40579,9 @@ void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigurationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -33937,7 +40598,7 @@ CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCo } } -CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedCommandListAttributeCallback() +CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -33948,7 +40609,7 @@ CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -33958,8 +40619,8 @@ void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -33990,8 +40651,9 @@ void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34007,7 +40669,7 @@ CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCa } } -CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeCallback() +CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34018,8 +40680,8 @@ CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34028,8 +40690,8 @@ void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34060,9 +40722,10 @@ void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfigurationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34078,7 +40741,7 @@ CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAtt } } -CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() +CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34089,8 +40752,8 @@ CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34099,8 +40762,8 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34131,9 +40794,9 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback( +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34150,7 +40813,7 @@ CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConf } } -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback() +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34161,8 +40824,8 @@ CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34170,8 +40833,8 @@ void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34199,9 +40862,9 @@ void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback( +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34218,8 +40881,7 @@ CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastCon } } -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::~ -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34230,8 +40892,8 @@ CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34239,8 +40901,8 @@ void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34268,77 +40930,9 @@ void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfigurationLampRatedHoursAttributeCallback( +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurationLampRatedHoursAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfigurationLampBurnHoursAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34355,7 +40949,7 @@ CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfiguration } } -CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfigurationLampBurnHoursAttributeCallback() +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34366,8 +40960,8 @@ CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfiguratio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34375,8 +40969,8 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34384,7 +40978,7 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -34394,19 +40988,19 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback( +CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34423,7 +41017,7 @@ CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConf } } -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback() +CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34434,8 +41028,8 @@ CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34443,8 +41037,8 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34452,7 +41046,7 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -34462,19 +41056,19 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfigurationGeneratedCommandListAttributeCallback( +CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34491,7 +41085,7 @@ CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfig } } -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfigurationGeneratedCommandListAttributeCallback() +CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34502,7 +41096,7 @@ CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -34512,8 +41106,8 @@ void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34544,9 +41138,9 @@ void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigurationAcceptedCommandListAttributeCallback( +CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34563,7 +41157,7 @@ CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigu } } -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfigurationAcceptedCommandListAttributeCallback() +CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34574,7 +41168,7 @@ CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -34584,8 +41178,8 @@ void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34616,9 +41210,10 @@ void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34634,7 +41229,7 @@ CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEven } } -CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEventListAttributeCallback() +CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34645,8 +41240,8 @@ CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34655,8 +41250,8 @@ void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34687,9 +41282,9 @@ void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfigurationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34706,7 +41301,7 @@ CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfiguration } } -CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfigurationAttributeListAttributeCallback() +CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34717,7 +41312,7 @@ CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfiguratio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( +void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -34727,8 +41322,8 @@ void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34759,9 +41354,9 @@ void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( +CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34778,7 +41373,7 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasure } } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() +CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34789,8 +41384,8 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34798,8 +41393,8 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34827,9 +41422,9 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( +CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34846,7 +41441,7 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() +CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34857,8 +41452,8 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34866,8 +41461,8 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34895,9 +41490,9 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( +CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34914,7 +41509,7 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() +CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34925,8 +41520,8 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -34934,8 +41529,8 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -34963,9 +41558,9 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback( +CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -34982,7 +41577,7 @@ CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasu } } -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback() +CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -34993,8 +41588,8 @@ CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeas env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35002,8 +41597,9 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35011,29 +41607,32 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback( +CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35050,7 +41649,7 @@ CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminance } } -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback() +CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35061,7 +41660,7 @@ CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -35071,8 +41670,8 @@ void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35103,9 +41702,9 @@ void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35122,7 +41721,7 @@ CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceM } } -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback() +CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35133,8 +41732,8 @@ CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminance env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35143,8 +41742,8 @@ void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35175,9 +41774,9 @@ void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35194,7 +41793,7 @@ CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurement } } -CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasurementEventListAttributeCallback() +CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35205,8 +41804,8 @@ CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasuremen env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35215,8 +41814,8 @@ void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35247,9 +41846,9 @@ void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35266,7 +41865,7 @@ CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasure } } -CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() +CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35277,8 +41876,8 @@ CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35286,9 +41885,8 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35296,32 +41894,29 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMeasuredValueAttributeCallback( +CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasurementMinMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35338,7 +41933,7 @@ CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasure } } -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMeasuredValueAttributeCallback() +CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35349,7 +41944,7 @@ CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, +void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -35358,8 +41953,8 @@ void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35387,9 +41982,9 @@ void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback( +CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35406,7 +42001,7 @@ CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeas } } -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback() +CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35417,8 +42012,8 @@ CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35426,8 +42021,8 @@ void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35455,10 +42050,9 @@ void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35474,7 +42068,7 @@ CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeas } } -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback() +CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35485,8 +42079,8 @@ CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35494,8 +42088,8 @@ void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35523,9 +42117,9 @@ void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35542,7 +42136,7 @@ CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperature } } -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback() +CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35553,8 +42147,8 @@ CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35562,9 +42156,8 @@ void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35572,32 +42165,97 @@ void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } } -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback( +CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35614,7 +42272,7 @@ CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureM } } -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback() +CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35625,7 +42283,7 @@ CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperature env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -35635,8 +42293,8 @@ void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35667,9 +42325,9 @@ void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasurementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35686,7 +42344,7 @@ CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurement } } -CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasurementEventListAttributeCallback() +CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35697,8 +42355,8 @@ CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasuremen env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35707,8 +42365,8 @@ void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35739,10 +42397,9 @@ void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35758,7 +42415,7 @@ CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasure } } -CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() +CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35769,8 +42426,8 @@ CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35779,8 +42436,8 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35811,9 +42468,9 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMeasuredValueAttributeCallback(jobject javaCallback, +CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -35830,7 +42487,7 @@ CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMe } } -CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementMeasuredValueAttributeCallback() +CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35841,8 +42498,8 @@ CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35850,76 +42507,9 @@ void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasurementMinMeasuredValueAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -35927,30 +42517,32 @@ void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35966,7 +42558,7 @@ CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasuremen } } -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasurementMaxMeasuredValueAttributeCallback() +CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -35977,8 +42569,8 @@ CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasureme env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -35986,8 +42578,8 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36015,9 +42607,10 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36033,7 +42626,7 @@ CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScal } } -CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() +CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36044,8 +42637,8 @@ CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementSca env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36053,8 +42646,8 @@ void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36082,9 +42675,9 @@ void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36101,7 +42694,7 @@ CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementM } } -CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() +CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36112,8 +42705,8 @@ CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurement env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36121,8 +42714,8 @@ void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36150,9 +42743,9 @@ void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * c env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36169,7 +42762,7 @@ CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementM } } -CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() +CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36180,8 +42773,8 @@ CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurement env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36189,8 +42782,9 @@ void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36198,29 +42792,32 @@ void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasurementGeneratedCommandListAttributeCallback( +CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36237,7 +42834,7 @@ CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasur } } -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasurementGeneratedCommandListAttributeCallback() +CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36248,7 +42845,7 @@ CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -36258,8 +42855,8 @@ void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36290,10 +42887,8 @@ void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36309,7 +42904,7 @@ CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasure } } -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasurementAcceptedCommandListAttributeCallback() +CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36320,8 +42915,8 @@ CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36330,8 +42925,8 @@ void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36362,9 +42957,9 @@ void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventListAttributeCallback(jobject javaCallback, +CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36380,7 +42975,7 @@ CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventL } } -CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEventListAttributeCallback() +CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36391,8 +42986,8 @@ CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36401,8 +42996,8 @@ void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36433,9 +43028,9 @@ void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36452,7 +43047,7 @@ CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAt } } -CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() +CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36463,8 +43058,8 @@ CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36472,9 +43067,8 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36482,32 +43076,30 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36523,7 +43115,8 @@ CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredVa } } -CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::~ +CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36534,8 +43127,8 @@ CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredV env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36543,8 +43136,8 @@ void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36572,9 +43165,9 @@ void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36591,7 +43184,8 @@ CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeas } } -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36602,8 +43196,8 @@ CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36611,8 +43205,8 @@ void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36640,9 +43234,9 @@ void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * con env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36659,7 +43253,8 @@ CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeas } } -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::~ +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36670,8 +43265,8 @@ CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36679,8 +43274,9 @@ void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36688,29 +43284,105 @@ void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - javaValue = nullptr; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - else + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } } -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGeneratedCommandListAttributeCallback( +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::~ +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityMeasurementEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36727,7 +43399,7 @@ CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGen } } -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGeneratedCommandListAttributeCallback() +CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidityMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36738,8 +43410,8 @@ CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36748,8 +43420,8 @@ void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36780,9 +43452,9 @@ void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcceptedCommandListAttributeCallback( +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -36799,7 +43471,7 @@ CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcce } } -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcceptedCommandListAttributeCallback() +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36810,8 +43482,8 @@ CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36820,8 +43492,8 @@ void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36852,8 +43524,10 @@ void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36869,7 +43543,7 @@ CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttri } } -CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttributeCallback() +CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensingGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36880,8 +43554,8 @@ CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36890,8 +43564,8 @@ void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36922,9 +43596,10 @@ void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36940,7 +43615,7 @@ CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeL } } -CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() +CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -36951,8 +43626,8 @@ CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -36961,8 +43636,8 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -36993,10 +43668,9 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37012,7 +43686,7 @@ CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumid } } -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback() +CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37023,8 +43697,8 @@ CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37032,8 +43706,9 @@ void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37041,30 +43716,32 @@ void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37080,8 +43757,7 @@ CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHu } } -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::~ -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() +CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37092,8 +43768,8 @@ CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37101,8 +43777,9 @@ void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37110,29 +43787,32 @@ void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37149,8 +43829,8 @@ CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHu } } -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37161,8 +43841,8 @@ CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37170,8 +43850,8 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37179,7 +43859,7 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -37189,19 +43869,20 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37218,8 +43899,8 @@ CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject jav } } -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::~ -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37230,8 +43911,8 @@ CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37239,9 +43920,9 @@ void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37249,32 +43930,30 @@ void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37291,8 +43970,8 @@ CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject java } } -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::~ -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37303,8 +43982,8 @@ CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37312,9 +43991,9 @@ void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37322,32 +44001,30 @@ void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37364,7 +44041,8 @@ CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityM } } -CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidityMeasurementEventListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37375,8 +44053,8 @@ CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidity env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37384,9 +44062,9 @@ void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37394,32 +44072,30 @@ void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37436,7 +44112,8 @@ CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumid } } -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37447,8 +44124,8 @@ CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37456,9 +44133,9 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37466,32 +44143,30 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37508,7 +44183,8 @@ CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingG } } -CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensingGeneratedCommandListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37519,7 +44195,7 @@ CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensing env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -37529,8 +44205,9 @@ void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37561,9 +44238,10 @@ void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37580,7 +44258,8 @@ CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAc } } -CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingAcceptedCommandListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37591,7 +44270,7 @@ CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -37601,8 +44280,9 @@ void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37633,9 +44313,10 @@ void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37651,7 +44332,8 @@ CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAtt } } -CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37662,8 +44344,8 @@ CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -37672,8 +44354,8 @@ void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37704,9 +44386,10 @@ void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback:: +CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37722,7 +44405,8 @@ CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttribut } } -CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() +CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::~ +CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37733,7 +44417,7 @@ CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( +void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -37743,8 +44427,8 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37775,9 +44459,9 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37794,8 +44478,8 @@ CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject } } -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37806,7 +44490,7 @@ CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -37815,8 +44499,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::C jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -37844,10 +44528,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::C env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37864,8 +44548,8 @@ CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobj } } -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37876,7 +44560,7 @@ CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -37885,8 +44569,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -37915,10 +44599,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -37935,8 +44619,8 @@ CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobj } } -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -37947,7 +44631,7 @@ CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -37956,8 +44640,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -37986,10 +44670,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38006,8 +44690,8 @@ CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(job } } -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38018,7 +44702,7 @@ CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38027,8 +44711,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38057,10 +44741,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38077,8 +44761,8 @@ CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback( } } -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38089,7 +44773,7 @@ CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38098,8 +44782,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCall jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38128,10 +44812,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38148,8 +44832,8 @@ CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback( } } -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38160,7 +44844,7 @@ CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38170,8 +44854,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCall VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38203,10 +44887,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38223,8 +44907,8 @@ CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback(j } } -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38235,7 +44919,7 @@ CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38245,8 +44929,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38278,9 +44962,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38297,8 +44981,8 @@ CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback(jobject jav } } -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38309,7 +44993,7 @@ CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38319,8 +45003,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -38351,9 +45035,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback:: -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback:: +CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38370,8 +45054,8 @@ CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback(jobject } } -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::~ -CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback() +CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::~ +CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38382,7 +45066,7 @@ CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38392,8 +45076,8 @@ void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::C VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -38424,9 +45108,10 @@ void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::C env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38443,8 +45128,8 @@ CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject } } -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38455,7 +45140,7 @@ CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38464,8 +45149,8 @@ void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::Ca jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -38493,10 +45178,10 @@ void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::Ca env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38513,8 +45198,8 @@ CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobje } } -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38525,7 +45210,7 @@ CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38534,8 +45219,8 @@ void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38564,10 +45249,10 @@ void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38584,8 +45269,8 @@ CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobje } } -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38596,7 +45281,7 @@ CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38605,8 +45290,8 @@ void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38635,10 +45320,10 @@ void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38655,8 +45340,8 @@ CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobj } } -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38667,7 +45352,7 @@ CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38676,8 +45361,8 @@ void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38706,10 +45391,10 @@ void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38726,8 +45411,8 @@ CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(j } } -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38738,7 +45423,7 @@ CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -38747,8 +45432,8 @@ void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38777,10 +45462,10 @@ void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallb env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38797,8 +45482,8 @@ CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(j } } -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38809,7 +45494,7 @@ CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38819,8 +45504,8 @@ void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38852,10 +45537,10 @@ void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38872,8 +45557,8 @@ CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jo } } -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38884,7 +45569,7 @@ CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38894,8 +45579,8 @@ void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), + std::unique_ptr + cppCallback(reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. @@ -38927,9 +45612,9 @@ void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -38946,8 +45631,8 @@ CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback(jobject java } } -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -38958,7 +45643,7 @@ CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -38968,8 +45653,8 @@ void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39000,9 +45685,10 @@ void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback:: -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: +CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39019,8 +45705,8 @@ CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject } } -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::~ -CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback() +CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback::~ +CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39031,7 +45717,7 @@ CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -39041,8 +45727,8 @@ void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::Ca VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39073,10 +45759,9 @@ void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::Ca env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39093,8 +45778,7 @@ CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback(jobjec } } -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39105,7 +45789,7 @@ CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39114,8 +45798,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39143,10 +45827,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39163,8 +45846,8 @@ CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback(job } } -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39175,7 +45858,7 @@ CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39184,9 +45867,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39214,10 +45896,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39234,8 +45915,8 @@ CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback(job } } -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39246,7 +45927,7 @@ CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39255,9 +45936,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39285,10 +45965,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39305,8 +45984,8 @@ CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback(jo } } -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39317,7 +45996,7 @@ CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39326,9 +46005,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39356,10 +46034,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39376,8 +46053,8 @@ CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback } } -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39388,7 +46065,7 @@ CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39397,9 +46074,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39427,10 +46103,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCal env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39447,8 +46122,8 @@ CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback } } -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39459,7 +46134,7 @@ CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -39469,9 +46144,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCal VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39502,10 +46176,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCal env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39522,8 +46195,8 @@ CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback( } } -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39534,7 +46207,7 @@ CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -39544,9 +46217,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCall VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39577,9 +46249,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CHIPOzoneConcentrationMeasurementEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39596,8 +46268,7 @@ CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback(jobject ja } } -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback() +CHIPOzoneConcentrationMeasurementEventListAttributeCallback::~CHIPOzoneConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39608,7 +46279,7 @@ CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -39618,8 +46289,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39650,10 +46321,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39670,8 +46340,7 @@ CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback(jobjec } } -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback::~ -CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback() +CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::~CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39682,7 +46351,7 @@ CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -39692,8 +46361,8 @@ void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39724,9 +46393,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback( +CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39743,7 +46412,7 @@ CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CHIPOzoneConcen } } -CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39754,8 +46423,8 @@ CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPOzoneConce env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -39763,8 +46432,8 @@ void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39792,9 +46461,9 @@ void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39811,8 +46480,8 @@ CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaC } } -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39823,7 +46492,7 @@ CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39832,8 +46501,8 @@ void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39861,9 +46530,9 @@ void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39880,8 +46549,8 @@ CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaC } } -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39892,7 +46561,7 @@ CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39901,8 +46570,8 @@ void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39930,9 +46599,9 @@ void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -39949,8 +46618,8 @@ CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject java } } -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -39961,7 +46630,7 @@ CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -39970,8 +46639,8 @@ void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -39999,9 +46668,9 @@ void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40018,8 +46687,8 @@ CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject j } } -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40030,7 +46699,7 @@ CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -40039,8 +46708,8 @@ void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40068,9 +46737,9 @@ void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40087,8 +46756,8 @@ CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject j } } -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40099,7 +46768,7 @@ CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40109,8 +46778,8 @@ void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40141,9 +46810,9 @@ void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40160,8 +46829,8 @@ CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject ja } } -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40172,7 +46841,7 @@ CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40182,8 +46851,8 @@ void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40214,9 +46883,9 @@ void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CHIPOzoneConcentrationMeasurementEventListAttributeCallback( +CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CHIPPm25ConcentrationMeasurementEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40233,7 +46902,7 @@ CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CHIPOzoneConcentrat } } -CHIPOzoneConcentrationMeasurementEventListAttributeCallback::~CHIPOzoneConcentrationMeasurementEventListAttributeCallback() +CHIPPm25ConcentrationMeasurementEventListAttributeCallback::~CHIPPm25ConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40244,7 +46913,7 @@ CHIPOzoneConcentrationMeasurementEventListAttributeCallback::~CHIPOzoneConcentra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40254,8 +46923,8 @@ void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40286,9 +46955,9 @@ void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback( +CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40305,7 +46974,7 @@ CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CHIPOzoneConcen } } -CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::~CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback() +CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40316,7 +46985,7 @@ CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::~CHIPOzoneConce env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40326,8 +46995,8 @@ void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40358,9 +47027,9 @@ void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40377,7 +47046,8 @@ CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm25Concentr } } -CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40388,8 +47058,8 @@ CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm25Concent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -40397,8 +47067,8 @@ void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40426,9 +47096,10 @@ void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40445,8 +47116,8 @@ CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCa } } -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40457,7 +47128,7 @@ CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -40466,8 +47137,8 @@ void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40495,9 +47166,10 @@ void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40514,8 +47186,8 @@ CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCa } } -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40526,7 +47198,7 @@ CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -40535,8 +47207,8 @@ void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40564,9 +47236,10 @@ void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40583,8 +47256,8 @@ CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaC } } -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40595,7 +47268,7 @@ CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -40604,8 +47277,9 @@ void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40633,9 +47307,10 @@ void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40652,8 +47327,8 @@ CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject ja } } -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40664,7 +47339,7 @@ CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -40673,8 +47348,9 @@ void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40702,9 +47378,10 @@ void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40721,8 +47398,8 @@ CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject ja } } -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40733,7 +47410,7 @@ CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40743,8 +47420,9 @@ void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40775,9 +47453,10 @@ void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40794,8 +47473,8 @@ CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject jav } } -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40806,7 +47485,7 @@ CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40816,8 +47495,9 @@ void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40848,9 +47528,9 @@ void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CHIPPm25ConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40867,7 +47547,8 @@ CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CHIPPm25Concentratio } } -CHIPPm25ConcentrationMeasurementEventListAttributeCallback::~CHIPPm25ConcentrationMeasurementEventListAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40878,7 +47559,7 @@ CHIPPm25ConcentrationMeasurementEventListAttributeCallback::~CHIPPm25Concentrati env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40888,8 +47569,8 @@ void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40920,9 +47601,9 @@ void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback:: +CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -40939,7 +47620,8 @@ CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm25Concentr } } -CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback() +CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::~ +CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -40950,7 +47632,7 @@ CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm25Concent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -40960,8 +47642,8 @@ void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -40992,9 +47674,9 @@ void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41011,8 +47693,7 @@ CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback(jobject j } } -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41023,8 +47704,8 @@ CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -41032,8 +47713,8 @@ void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41061,10 +47742,9 @@ void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41081,8 +47761,8 @@ CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback(jobjec } } -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41093,7 +47773,7 @@ CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41102,8 +47782,8 @@ void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41131,10 +47811,9 @@ void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41151,8 +47830,8 @@ CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobjec } } -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41163,7 +47842,7 @@ CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41172,8 +47851,8 @@ void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41201,10 +47880,9 @@ void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41221,8 +47899,8 @@ CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobje } } -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41233,7 +47911,7 @@ CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41242,9 +47920,8 @@ void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41272,10 +47949,9 @@ void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41292,8 +47968,8 @@ CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback(jo } } -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41304,7 +47980,7 @@ CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41313,9 +47989,8 @@ void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41343,10 +48018,9 @@ void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41363,8 +48037,8 @@ CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback(jo } } -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41375,7 +48049,7 @@ CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -41385,9 +48059,8 @@ void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41418,10 +48091,9 @@ void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41438,8 +48110,8 @@ CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback(job } } -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41450,7 +48122,7 @@ CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -41460,9 +48132,8 @@ void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41493,9 +48164,9 @@ void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CHIPPm1ConcentrationMeasurementEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41512,8 +48183,7 @@ CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback(jobject javaC } } -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback() +CHIPPm1ConcentrationMeasurementEventListAttributeCallback::~CHIPPm1ConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41524,7 +48194,7 @@ CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -41534,8 +48204,8 @@ void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41566,9 +48236,9 @@ void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback:: -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41585,8 +48255,7 @@ CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback(jobject j } } -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::~ -CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback() +CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41597,7 +48266,7 @@ CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -41607,8 +48276,8 @@ void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::Cal VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41639,9 +48308,9 @@ void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback( +CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41658,7 +48327,7 @@ CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm1Concentrat } } -CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41669,8 +48338,8 @@ CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm1Concentra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -41678,8 +48347,8 @@ void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(v jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41707,9 +48376,9 @@ void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(v env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41726,8 +48395,8 @@ CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CHIPPm1Concent } } -CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41738,7 +48407,7 @@ CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41747,8 +48416,8 @@ void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41776,9 +48445,9 @@ void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41795,8 +48464,8 @@ CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CHIPPm1Concent } } -CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41807,7 +48476,7 @@ CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41816,8 +48485,8 @@ void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41845,9 +48514,9 @@ void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41864,8 +48533,8 @@ CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCa } } -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41876,7 +48545,7 @@ CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41885,8 +48554,8 @@ void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41914,9 +48583,9 @@ void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -41933,8 +48602,8 @@ CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject jav } } -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -41945,7 +48614,7 @@ CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -41954,8 +48623,8 @@ void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -41983,9 +48652,9 @@ void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42002,8 +48671,8 @@ CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject jav } } -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42014,7 +48683,7 @@ CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42024,8 +48693,8 @@ void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42056,9 +48725,9 @@ void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42075,8 +48744,8 @@ CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject java } } -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42087,7 +48756,7 @@ CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42097,8 +48766,8 @@ void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42129,9 +48798,9 @@ void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CHIPPm1ConcentrationMeasurementEventListAttributeCallback( +CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CHIPPm10ConcentrationMeasurementEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42148,7 +48817,7 @@ CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CHIPPm1ConcentrationM } } -CHIPPm1ConcentrationMeasurementEventListAttributeCallback::~CHIPPm1ConcentrationMeasurementEventListAttributeCallback() +CHIPPm10ConcentrationMeasurementEventListAttributeCallback::~CHIPPm10ConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42159,7 +48828,7 @@ CHIPPm1ConcentrationMeasurementEventListAttributeCallback::~CHIPPm1Concentration env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42169,8 +48838,8 @@ void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42201,9 +48870,9 @@ void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback( +CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42220,7 +48889,7 @@ CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm1Concentrat } } -CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback() +CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42231,7 +48900,7 @@ CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm1Concentra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42241,8 +48910,8 @@ void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42273,9 +48942,10 @@ void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42292,7 +48962,8 @@ CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CHIPPm10Concentr } } -CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42303,8 +48974,8 @@ CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPPm10Concent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -42312,8 +48983,11 @@ void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42341,9 +49015,10 @@ void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42360,8 +49035,8 @@ CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCa } } -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42372,7 +49047,7 @@ CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -42381,8 +49056,11 @@ void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42410,9 +49088,10 @@ void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42429,8 +49108,8 @@ CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCa } } -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42441,7 +49120,7 @@ CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -42450,8 +49129,11 @@ void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42479,9 +49161,10 @@ void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback< + CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterPeakMeasuredValueAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42498,8 +49181,8 @@ CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaC } } -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42510,7 +49193,7 @@ CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -42519,8 +49202,11 @@ void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast( + context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42548,9 +49234,12 @@ void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback< + CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAverageMeasuredValueAttributeCallbackType>(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42567,8 +49256,8 @@ CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject ja } } -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42579,7 +49268,7 @@ CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -42587,9 +49276,13 @@ void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); jobject javaCallbackRef; - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42617,9 +49310,12 @@ void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback< + CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42636,8 +49332,8 @@ CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject ja } } -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42648,7 +49344,7 @@ CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42658,8 +49354,12 @@ void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42690,9 +49390,11 @@ void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback< + CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42709,8 +49411,8 @@ CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject jav } } -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42721,7 +49423,7 @@ CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42731,8 +49433,12 @@ void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast( + context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42763,9 +49469,10 @@ void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CHIPPm10ConcentrationMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42782,7 +49489,8 @@ CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CHIPPm10Concentratio } } -CHIPPm10ConcentrationMeasurementEventListAttributeCallback::~CHIPPm10ConcentrationMeasurementEventListAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42793,7 +49501,7 @@ CHIPPm10ConcentrationMeasurementEventListAttributeCallback::~CHIPPm10Concentrati env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42803,8 +49511,10 @@ void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42835,9 +49545,10 @@ void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback:: +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42854,7 +49565,8 @@ CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CHIPPm10Concentr } } -CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback() +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback::~ +CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42865,7 +49577,7 @@ CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::~CHIPPm10Concent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -42875,8 +49587,11 @@ void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42907,10 +49622,9 @@ void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -42927,8 +49641,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeC } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -42939,7 +49652,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -42948,11 +49661,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttri jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -42980,10 +49690,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttri env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback:: +CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43000,8 +49709,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttribu } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::~ +CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43012,7 +49721,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -43021,11 +49730,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAt jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43053,10 +49759,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAt env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback:: +CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43073,8 +49778,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttribu } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ +CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43085,7 +49790,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -43094,11 +49799,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAt jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43126,10 +49828,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAt env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterPeakMeasuredValueAttributeCallbackType>(CallbackFn, this), +CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback:: +CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43146,8 +49847,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttrib } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ +CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43158,7 +49859,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -43167,11 +49868,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueA jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast( - context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43199,12 +49897,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueA env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAverageMeasuredValueAttributeCallbackType>(CallbackFn, - this), +CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback:: +CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43221,8 +49916,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAtt } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ +CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43233,7 +49928,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; @@ -43242,12 +49937,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43275,12 +49966,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVal env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterGeneratedCommandListAttributeCallbackType>(CallbackFn, - this), +CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback:: +CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43297,8 +49985,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAtt } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::~ +CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43309,7 +49997,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -43319,12 +50007,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandLi VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43355,11 +50039,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandLi env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback< - CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementClusterAcceptedCommandListAttributeCallbackType>(CallbackFn, this), +CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback:: +CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -43376,8 +50058,294 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttr } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::~ +CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRadonConcentrationMeasurementEventListAttributeCallback::CHIPRadonConcentrationMeasurementEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRadonConcentrationMeasurementEventListAttributeCallback::~CHIPRadonConcentrationMeasurementEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CHIPRadonConcentrationMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::~CHIPRadonConcentrationMeasurementAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43388,7 +50356,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -43398,12 +50366,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLis VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast( - context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43434,11 +50398,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLis env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43454,8 +50415,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallb } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback() +CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43466,8 +50426,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43476,10 +50436,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttribute VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43510,11 +50468,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttribute env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback:: -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43530,8 +50485,7 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeC } } -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback::~ -CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback() +CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43542,8 +50496,8 @@ CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43552,11 +50506,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttri VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43587,10 +50538,8 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttri env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43606,7 +50555,7 @@ CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CHIPRadonConcen } } -CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback() +CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43617,8 +50566,9 @@ CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::~CHIPRadonConce env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPChannelChannelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43626,8 +50576,9 @@ void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43635,30 +50586,128 @@ void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_majorNumber; + std::string newElement_0_majorNumberClassName = "java/lang/Integer"; + std::string newElement_0_majorNumberCtorSignature = "(I)V"; + jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + jninewElement_0_majorNumber, newElement_0_majorNumber); + jobject newElement_0_minorNumber; + std::string newElement_0_minorNumberClassName = "java/lang/Integer"; + std::string newElement_0_minorNumberCtorSignature = "(I)V"; + jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + jninewElement_0_minorNumber, newElement_0_minorNumber); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + jobject newElement_0_callSign; + if (!entry_0.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); + } + else + { + jobject newElement_0_callSignInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); + } + jobject newElement_0_affiliateCallSign; + if (!entry_0.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); + } + else + { + jobject newElement_0_affiliateCallSignInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.affiliateCallSign.Value(), + newElement_0_affiliateCallSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, + newElement_0_affiliateCallSign); + } + jobject newElement_0_identifier; + if (!entry_0.identifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_identifier); + } + else + { + jobject newElement_0_identifierInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier.Value(), + newElement_0_identifierInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_identifierInsideOptional, newElement_0_identifier); + } + jobject newElement_0_type; + if (!entry_0.type.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_type); + } + else + { + jobject newElement_0_typeInsideOptional; + std::string newElement_0_typeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_typeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_typeInsideOptional = static_cast(entry_0.type.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeInsideOptionalClassName.c_str(), newElement_0_typeInsideOptionalCtorSignature.c_str(), + jninewElement_0_typeInsideOptional, newElement_0_typeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_typeInsideOptional, newElement_0_type); + } + + jclass channelInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + return; + } + jmethodID channelInfoStructStructCtor_1 = + env->GetMethodID(channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (channelInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, + newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, + newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback:: -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43674,8 +50723,7 @@ CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback(jobject javaC } } -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::~ -CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback() +CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43686,8 +50734,8 @@ CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43695,8 +50743,9 @@ void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43704,30 +50753,32 @@ void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback:: -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43743,8 +50794,7 @@ CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback(jobject javaC } } -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::~ -CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback() +CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43755,8 +50805,8 @@ CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43764,8 +50814,9 @@ void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43773,30 +50824,31 @@ void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback:: -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43812,8 +50864,7 @@ CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback(jobject java } } -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::~ -CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback() +CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43824,8 +50875,8 @@ CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43833,8 +50884,9 @@ void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43842,30 +50894,31 @@ void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback:: -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43881,8 +50934,7 @@ CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback(jobject j } } -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::~ -CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback() +CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43893,8 +50945,8 @@ CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43902,8 +50954,9 @@ void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43911,30 +50964,32 @@ void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - jfloat jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback:: -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43950,8 +51005,7 @@ CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback(jobject j } } -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::~ -CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback() +CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -43962,8 +51016,10 @@ CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -43972,8 +51028,8 @@ void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -43992,11 +51048,34 @@ void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_identifier; + std::string newElement_0_identifierClassName = "java/lang/Integer"; + std::string newElement_0_identifierCtorSignature = "(I)V"; + jint jninewElement_0_identifier = static_cast(entry_0.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + jninewElement_0_identifier, newElement_0_identifier); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + + jclass targetInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); + return; + } + jmethodID targetInfoStructStructCtor_1 = + env->GetMethodID(targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (targetInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44004,9 +51083,9 @@ void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback:: -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -44023,8 +51102,7 @@ CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback(jobject ja } } -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::~ -CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback() +CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44035,7 +51113,7 @@ CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -44045,8 +51123,8 @@ void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44077,9 +51155,9 @@ void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementEventListAttributeCallback::CHIPRadonConcentrationMeasurementEventListAttributeCallback( +CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -44096,7 +51174,7 @@ CHIPRadonConcentrationMeasurementEventListAttributeCallback::CHIPRadonConcentrat } } -CHIPRadonConcentrationMeasurementEventListAttributeCallback::~CHIPRadonConcentrationMeasurementEventListAttributeCallback() +CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44107,8 +51185,8 @@ CHIPRadonConcentrationMeasurementEventListAttributeCallback::~CHIPRadonConcentra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44117,8 +51195,8 @@ void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44149,10 +51227,8 @@ void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CHIPRadonConcentrationMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44168,7 +51244,7 @@ CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CHIPRadonConcen } } -CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::~CHIPRadonConcentrationMeasurementAttributeListAttributeCallback() +CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44179,8 +51255,8 @@ CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::~CHIPRadonConce env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44189,8 +51265,8 @@ void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44221,9 +51297,9 @@ void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44239,7 +51315,7 @@ CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedComman } } -CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedCommandListAttributeCallback() +CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44250,8 +51326,8 @@ CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44260,8 +51336,8 @@ void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44292,9 +51368,8 @@ void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44310,7 +51385,7 @@ CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandL } } -CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommandListAttributeCallback() +CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44321,8 +51396,7 @@ CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44330,9 +51404,8 @@ void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44340,31 +51413,28 @@ void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44380,7 +51450,7 @@ CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback } } -CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallback() +CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44391,8 +51461,7 @@ CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44400,9 +51469,8 @@ void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44410,31 +51478,29 @@ void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44450,7 +51516,7 @@ CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttribute } } -CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() +CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44461,8 +51527,8 @@ CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44470,9 +51536,8 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44480,31 +51545,29 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44520,7 +51583,7 @@ CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback } } -CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() +CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44531,9 +51594,8 @@ CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelChannelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44541,9 +51603,8 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44551,99 +51612,30 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_majorNumber; - std::string newElement_0_majorNumberClassName = "java/lang/Integer"; - std::string newElement_0_majorNumberCtorSignature = "(I)V"; - jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), - newElement_0_majorNumberCtorSignature.c_str(), - jninewElement_0_majorNumber, newElement_0_majorNumber); - jobject newElement_0_minorNumber; - std::string newElement_0_minorNumberClassName = "java/lang/Integer"; - std::string newElement_0_minorNumberCtorSignature = "(I)V"; - jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), - newElement_0_minorNumberCtorSignature.c_str(), - jninewElement_0_minorNumber, newElement_0_minorNumber); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_callSign; - if (!entry_0.callSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); - } - else - { - jobject newElement_0_callSignInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); - } - jobject newElement_0_affiliateCallSign; - if (!entry_0.affiliateCallSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); - } - else - { - jobject newElement_0_affiliateCallSignInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.affiliateCallSign.Value(), - newElement_0_affiliateCallSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, - newElement_0_affiliateCallSign); - } - - jclass channelInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); - return; - } - jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( - channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); - if (channelInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, - newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, newElement_0_affiliateCallSign); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::CHIPMediaPlaybackAvailableAudioTracksAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44659,7 +51651,7 @@ CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandLis } } -CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandListAttributeCallback() +CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::~CHIPMediaPlaybackAvailableAudioTracksAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44670,8 +51662,10 @@ CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackAvailableAudioTracksAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44680,8 +51674,8 @@ void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44693,28 +51687,106 @@ void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + if (list.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + jobject newElement_1_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); + jobject newElement_1_trackAttributes; + if (entry_1.trackAttributes.IsNull()) + { + newElement_1_trackAttributes = nullptr; + } + else + { + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.trackAttributes.Value().languageCode, + newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) + { + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, + newElement_1_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return; + } + jmethodID trackAttributesStructStructCtor_4 = + env->GetMethodID(trackAttributesStructStructClass_4, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + + jclass trackStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return; + } + jmethodID trackStructStructCtor_2 = env->GetMethodID( + trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return; + } + + newElement_1 = + env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackAvailableTextTracksAttributeCallback::CHIPMediaPlaybackAvailableTextTracksAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44730,7 +51802,7 @@ CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListA } } -CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandListAttributeCallback() +CHIPMediaPlaybackAvailableTextTracksAttributeCallback::~CHIPMediaPlaybackAvailableTextTracksAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44741,8 +51813,10 @@ CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackAvailableTextTracksAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44751,8 +51825,8 @@ void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44764,27 +51838,106 @@ void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + if (list.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + jobject newElement_1_id; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); + jobject newElement_1_trackAttributes; + if (entry_1.trackAttributes.IsNull()) + { + newElement_1_trackAttributes = nullptr; + } + else + { + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.trackAttributes.Value().languageCode, + newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.Value().displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) + { + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.Value().displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, + newElement_1_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return; + } + jmethodID trackAttributesStructStructCtor_4 = + env->GetMethodID(trackAttributesStructStructClass_4, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + + jclass trackStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); + return; + } + jmethodID trackStructStructCtor_2 = env->GetMethodID( + trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V"); + if (trackStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); + return; + } + + newElement_1 = + env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44800,7 +51953,7 @@ CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(job } } -CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() +CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44811,8 +51964,8 @@ CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44821,8 +51974,8 @@ void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44853,8 +52006,10 @@ void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44870,7 +52025,7 @@ CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCall } } -CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() +CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44881,8 +52036,8 @@ CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44891,8 +52046,8 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44923,9 +52078,8 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44941,7 +52095,7 @@ CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAtt } } -CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAttributeCallback() +CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -44952,10 +52106,8 @@ CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -44964,8 +52116,8 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -44984,34 +52136,11 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_identifier; - std::string newElement_0_identifierClassName = "java/lang/Integer"; - std::string newElement_0_identifierCtorSignature = "(I)V"; - jint jninewElement_0_identifier = static_cast(entry_0.identifier); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - jninewElement_0_identifier, newElement_0_identifier); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return; - } - jmethodID targetInfoStructStructCtor_1 = - env->GetMethodID(targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (targetInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45019,10 +52148,9 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45038,7 +52166,7 @@ CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGen } } -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGeneratedCommandListAttributeCallback() +CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45049,8 +52177,8 @@ CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45059,8 +52187,8 @@ void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45091,10 +52219,8 @@ void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45110,7 +52236,7 @@ CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcce } } -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcceptedCommandListAttributeCallback() +CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45121,8 +52247,9 @@ CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaInputInputListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45131,8 +52258,8 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45151,11 +52278,44 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, + newElement_0_index); + jobject newElement_0_inputType; + std::string newElement_0_inputTypeClassName = "java/lang/Integer"; + std::string newElement_0_inputTypeCtorSignature = "(I)V"; + jint jninewElement_0_inputType = static_cast(entry_0.inputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), + newElement_0_inputTypeCtorSignature.c_str(), + jninewElement_0_inputType, newElement_0_inputType); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_description; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); + + jclass inputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); + return; + } + jmethodID inputInfoStructStructCtor_1 = + env->GetMethodID(inputInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); + if (inputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, + newElement_0_inputType, newElement_0_name, newElement_0_description); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45163,8 +52323,9 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45180,7 +52341,7 @@ CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttri } } -CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttributeCallback() +CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45191,8 +52352,8 @@ CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45201,8 +52362,8 @@ void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45233,9 +52394,9 @@ void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45251,7 +52412,7 @@ CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeL } } -CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() +CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45262,8 +52423,8 @@ CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45272,8 +52433,8 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45304,8 +52465,8 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45321,7 +52482,7 @@ CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttribute } } -CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() +CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45332,7 +52493,8 @@ CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45340,73 +52502,9 @@ void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} -CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45414,29 +52512,31 @@ void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, cons ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45452,7 +52552,7 @@ CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAtt } } -CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() +CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45463,8 +52563,8 @@ CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45472,8 +52572,9 @@ void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45481,29 +52582,32 @@ void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45519,7 +52623,7 @@ CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStar } } -CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() +CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45530,8 +52634,8 @@ CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeSta env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45539,8 +52643,9 @@ void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45548,30 +52653,32 @@ void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45587,7 +52694,7 @@ CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGenerat } } -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGeneratedCommandListAttributeCallback() +CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45598,8 +52705,8 @@ CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGenera env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45608,8 +52715,8 @@ void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45640,10 +52747,8 @@ void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45659,7 +52764,7 @@ CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAccepted } } -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAcceptedCommandListAttributeCallback() +CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45670,8 +52775,8 @@ CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAccepte env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45680,8 +52785,8 @@ void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45712,8 +52817,8 @@ void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45729,7 +52834,7 @@ CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttribute } } -CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttributeCallback() +CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45740,8 +52845,8 @@ CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45750,8 +52855,8 @@ void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45782,9 +52887,10 @@ void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45800,7 +52906,7 @@ CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListA } } -CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() +CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45811,8 +52917,8 @@ CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45821,8 +52927,8 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45853,8 +52959,9 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45870,7 +52977,7 @@ CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallba } } -CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallback() +CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45881,9 +52988,8 @@ CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputInputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45892,8 +52998,8 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -45912,44 +53018,11 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - jint jninewElement_0_index = static_cast(entry_0.index); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, - newElement_0_index); - jobject newElement_0_inputType; - std::string newElement_0_inputTypeClassName = "java/lang/Integer"; - std::string newElement_0_inputTypeCtorSignature = "(I)V"; - jint jninewElement_0_inputType = static_cast(entry_0.inputType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), - newElement_0_inputTypeCtorSignature.c_str(), - jninewElement_0_inputType, newElement_0_inputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_description; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); - - jclass inputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); - return; - } - jmethodID inputInfoStructStructCtor_1 = - env->GetMethodID(inputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); - if (inputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, - newElement_0_inputType, newElement_0_name, newElement_0_description); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45957,9 +53030,8 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45975,7 +53047,7 @@ CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedComm } } -CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCommandListAttributeCallback() +CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -45986,8 +53058,8 @@ CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -45996,8 +53068,8 @@ void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46028,9 +53100,8 @@ void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46046,7 +53117,7 @@ CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedComman } } -CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedCommandListAttributeCallback() +CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46057,8 +53128,8 @@ CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46067,8 +53138,8 @@ void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46099,8 +53170,9 @@ void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeaderAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46116,7 +53188,7 @@ CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallba } } -CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallback() +CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHeaderAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46127,8 +53199,8 @@ CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46137,8 +53209,8 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46157,11 +53229,7 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46169,8 +53237,10 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46186,7 +53256,7 @@ CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttribu } } -CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() +CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46197,8 +53267,8 @@ CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46207,8 +53277,8 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46239,9 +53309,10 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46257,7 +53328,7 @@ CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandL } } -CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommandListAttributeCallback() +CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46268,7 +53339,7 @@ CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46278,8 +53349,8 @@ void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46310,9 +53381,8 @@ void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46328,7 +53398,7 @@ CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandLis } } -CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandListAttributeCallback() +CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46339,8 +53409,8 @@ CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46349,8 +53419,8 @@ void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46381,8 +53451,9 @@ void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46398,7 +53469,7 @@ CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(j } } -CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback() +CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46409,8 +53480,8 @@ CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46419,8 +53490,8 @@ void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46451,8 +53522,8 @@ void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46468,7 +53539,7 @@ CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCa } } -CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() +CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46479,8 +53550,9 @@ CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46489,8 +53561,8 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46509,11 +53581,41 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, + newElement_0_index); + jobject newElement_0_outputType; + std::string newElement_0_outputTypeClassName = "java/lang/Integer"; + std::string newElement_0_outputTypeCtorSignature = "(I)V"; + jint jninewElement_0_outputType = static_cast(entry_0.outputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), + newElement_0_outputTypeCtorSignature.c_str(), + jninewElement_0_outputType, newElement_0_outputType); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + + jclass outputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); + return; + } + jmethodID outputInfoStructStructCtor_1 = env->GetMethodID(outputInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); + if (outputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, + newElement_0_outputType, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46521,9 +53623,9 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCommandListAttributeCallback(jobject javaCallback, +CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -46540,7 +53642,7 @@ CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCo } } -CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedCommandListAttributeCallback() +CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46551,7 +53653,7 @@ CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46561,8 +53663,8 @@ void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46593,9 +53695,9 @@ void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46611,7 +53713,7 @@ CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedComm } } -CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCommandListAttributeCallback() +CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46622,7 +53724,7 @@ CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46632,8 +53734,8 @@ void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46664,8 +53766,8 @@ void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46681,7 +53783,7 @@ CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCall } } -CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCallback() +CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46692,7 +53794,7 @@ CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, +void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46702,8 +53804,8 @@ void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46734,8 +53836,8 @@ void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46751,7 +53853,7 @@ CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttri } } -CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() +CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46762,7 +53864,7 @@ CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, +void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46772,8 +53874,8 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46804,9 +53906,9 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeaderAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCatalogListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46822,7 +53924,7 @@ CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeade } } -CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHeaderAttributeCallback() +CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCatalogListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46833,8 +53935,8 @@ CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHead env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -46843,8 +53945,8 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46863,7 +53965,11 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46871,9 +53977,9 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGeneratedCommandListAttributeCallback( +CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLauncherGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -46890,7 +53996,7 @@ CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGen } } -CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGeneratedCommandListAttributeCallback() +CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLauncherGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46901,7 +54007,7 @@ CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46911,8 +54017,8 @@ void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -46943,9 +54049,9 @@ void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcceptedCommandListAttributeCallback( +CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLauncherAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -46962,7 +54068,7 @@ CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcce } } -CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcceptedCommandListAttributeCallback() +CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLauncherAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -46973,7 +54079,7 @@ CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -46983,8 +54089,8 @@ void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47015,8 +54121,9 @@ void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47032,7 +54139,7 @@ CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttri } } -CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttributeCallback() +CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47043,8 +54150,8 @@ CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47053,8 +54160,8 @@ void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47085,9 +54192,10 @@ void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47103,7 +54211,7 @@ CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeL } } -CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() +CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47114,7 +54222,7 @@ CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( +void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -47124,8 +54232,8 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47156,8 +54264,10 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47173,7 +54283,7 @@ CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCa } } -CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeCallback() +CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAllowedVendorListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47184,9 +54294,8 @@ CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47195,8 +54304,8 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47215,41 +54324,11 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - jint jninewElement_0_index = static_cast(entry_0.index); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, - newElement_0_index); - jobject newElement_0_outputType; - std::string newElement_0_outputTypeClassName = "java/lang/Integer"; - std::string newElement_0_outputTypeCtorSignature = "(I)V"; - jint jninewElement_0_outputType = static_cast(entry_0.outputType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), - newElement_0_outputTypeCtorSignature.c_str(), - jninewElement_0_outputType, newElement_0_outputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass outputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); - return; - } - jmethodID outputInfoStructStructCtor_1 = env->GetMethodID(outputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - if (outputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, - newElement_0_outputType, newElement_0_name); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -47257,9 +54336,9 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -47276,7 +54355,7 @@ CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCo } } -CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedCommandListAttributeCallback() +CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasicGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47287,7 +54366,7 @@ CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -47297,8 +54376,8 @@ void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47329,9 +54408,10 @@ void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47347,7 +54427,7 @@ CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedComm } } -CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCommandListAttributeCallback() +CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47358,7 +54438,7 @@ CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -47368,78 +54448,8 @@ void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47470,8 +54480,9 @@ void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47487,7 +54498,7 @@ CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttri } } -CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() +CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47498,8 +54509,8 @@ CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47508,8 +54519,8 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47540,9 +54551,9 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCatalogListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47558,7 +54569,7 @@ CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCata } } -CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCatalogListAttributeCallback() +CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47569,8 +54580,8 @@ CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47579,8 +54590,8 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47599,11 +54610,11 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -47611,9 +54622,9 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLauncherGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -47630,7 +54641,7 @@ CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLau } } -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLauncherGeneratedCommandListAttributeCallback() +CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47641,7 +54652,7 @@ CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -47651,8 +54662,8 @@ void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47683,9 +54694,9 @@ void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLauncherAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -47702,7 +54713,7 @@ CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLaun } } -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLauncherAcceptedCommandListAttributeCallback() +CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47713,7 +54724,7 @@ CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLau env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -47723,8 +54734,8 @@ void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47755,9 +54766,8 @@ void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47773,7 +54783,7 @@ CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventL } } -CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEventListAttributeCallback() +CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47784,8 +54794,8 @@ CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47794,8 +54804,8 @@ void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47826,10 +54836,9 @@ void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47845,7 +54854,7 @@ CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAt } } -CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() +CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47856,8 +54865,8 @@ CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47866,8 +54875,8 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47898,9 +54907,110 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentControlOnDemandRatingsAttributeCallback::CHIPContentControlOnDemandRatingsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPContentControlOnDemandRatingsAttributeCallback::~CHIPContentControlOnDemandRatingsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPContentControlOnDemandRatingsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_ratingName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); + jobject newElement_0_ratingNameDesc; + if (!entry_0.ratingNameDesc.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); + } + else + { + jobject newElement_0_ratingNameDescInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingNameDesc.Value(), + newElement_0_ratingNameDescInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, + newElement_0_ratingNameDesc); + } + + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return; + } + jmethodID ratingNameStructStructCtor_1 = + env->GetMethodID(ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return; + } + + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, + newElement_0_ratingNameDesc); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPContentControlScheduledContentRatingsAttributeCallback::CHIPContentControlScheduledContentRatingsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -47917,7 +55027,7 @@ CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllo } } -CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAllowedVendorListAttributeCallback() +CHIPContentControlScheduledContentRatingsAttributeCallback::~CHIPContentControlScheduledContentRatingsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -47928,8 +55038,9 @@ CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAll env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPContentControlScheduledContentRatingsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -47938,8 +55049,8 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -47958,11 +55069,40 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + jobject newElement_0_ratingName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); + jobject newElement_0_ratingNameDesc; + if (!entry_0.ratingNameDesc.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); + } + else + { + jobject newElement_0_ratingNameDescInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingNameDesc.Value(), + newElement_0_ratingNameDescInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, + newElement_0_ratingNameDesc); + } + + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return; + } + jmethodID ratingNameStructStructCtor_1 = + env->GetMethodID(ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V"); + if (ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return; + } + + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, + newElement_0_ratingNameDesc); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -47970,9 +55110,9 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicGeneratedCommandListAttributeCallback( +CHIPContentControlGeneratedCommandListAttributeCallback::CHIPContentControlGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -47989,7 +55129,7 @@ CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicG } } -CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasicGeneratedCommandListAttributeCallback() +CHIPContentControlGeneratedCommandListAttributeCallback::~CHIPContentControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48000,7 +55140,7 @@ CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPContentControlGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -48010,8 +55150,8 @@ void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48042,9 +55182,9 @@ void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentControlAcceptedCommandListAttributeCallback::CHIPContentControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -48061,7 +55201,7 @@ CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAc } } -CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicAcceptedCommandListAttributeCallback() +CHIPContentControlAcceptedCommandListAttributeCallback::~CHIPContentControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48072,7 +55212,7 @@ CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPContentControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -48082,8 +55222,8 @@ void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48114,9 +55254,8 @@ void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentControlEventListAttributeCallback::CHIPContentControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48132,7 +55271,7 @@ CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAtt } } -CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAttributeCallback() +CHIPContentControlEventListAttributeCallback::~CHIPContentControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48143,8 +55282,8 @@ CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -48153,8 +55292,8 @@ void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48185,9 +55324,9 @@ void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentControlAttributeListAttributeCallback::CHIPContentControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48203,7 +55342,7 @@ CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttribut } } -CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() +CHIPContentControlAttributeListAttributeCallback::~CHIPContentControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48214,7 +55353,7 @@ CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( +void CHIPContentControlAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -48224,8 +55363,8 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48256,9 +55395,9 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentAppObserverGeneratedCommandListAttributeCallback::CHIPContentAppObserverGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -48275,7 +55414,7 @@ CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGenerated } } -CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGeneratedCommandListAttributeCallback() +CHIPContentAppObserverGeneratedCommandListAttributeCallback::~CHIPContentAppObserverGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48286,7 +55425,7 @@ CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPContentAppObserverGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -48296,8 +55435,8 @@ void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48328,9 +55467,9 @@ void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentAppObserverAcceptedCommandListAttributeCallback::CHIPContentAppObserverAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -48347,7 +55486,7 @@ CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCo } } -CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedCommandListAttributeCallback() +CHIPContentAppObserverAcceptedCommandListAttributeCallback::~CHIPContentAppObserverAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48358,7 +55497,7 @@ CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPContentAppObserverAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -48368,8 +55507,8 @@ void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48400,8 +55539,9 @@ void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentAppObserverEventListAttributeCallback::CHIPContentAppObserverEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48417,7 +55557,7 @@ CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCa } } -CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeCallback() +CHIPContentAppObserverEventListAttributeCallback::~CHIPContentAppObserverEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48428,8 +55568,8 @@ CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentAppObserverEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -48438,8 +55578,8 @@ void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -48470,9 +55610,10 @@ void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentAppObserverAttributeListAttributeCallback::CHIPContentAppObserverAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48488,7 +55629,7 @@ CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAtt } } -CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() +CHIPContentAppObserverAttributeListAttributeCallback::~CHIPContentAppObserverAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -48499,8 +55640,8 @@ CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentAppObserverAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -48509,8 +55650,8 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index cceffb9f26a411..5c720c7d3da4e4 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -332,9 +332,9 @@ class ChipClusters: "reportable": True, }, 0x00000007: { - "attributeName": "RemainingCapacity", + "attributeName": "FabricSceneInfo", "attributeId": 0x00000007, - "type": "int", + "type": "", "reportable": True, }, 0x0000FFF8: { @@ -1423,6 +1423,18 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x00000015: { + "attributeName": "SpecificationVersion", + "attributeId": 0x00000015, + "type": "int", + "reportable": True, + }, + 0x00000016: { + "attributeName": "MaxPathsPerInvoke", + "attributeId": 0x00000016, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -4327,8 +4339,97 @@ class ChipClusters: }, }, } - _OVEN_OPERATIONAL_STATE_CLUSTER_INFO = { - "clusterName": "OvenOperationalState", + _TIMER_CLUSTER_INFO = { + "clusterName": "Timer", + "clusterId": 0x00000047, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "SetTimer", + "args": { + "newTime": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ResetTimer", + "args": { + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "AddTime", + "args": { + "additionalTime": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "ReduceTime", + "args": { + "timeReduction": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "SetTime", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "TimeRemaining", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "TimerState", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _OVEN_CAVITY_OPERATIONAL_STATE_CLUSTER_INFO = { + "clusterName": "OvenCavityOperationalState", "clusterId": 0x00000048, "commands": { 0x00000000: { @@ -4431,6 +4532,140 @@ class ChipClusters: }, }, } + _OVEN_MODE_CLUSTER_INFO = { + "clusterName": "OvenMode", + "clusterId": 0x00000049, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "SupportedModes", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x00000001: { + "attributeName": "CurrentMode", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "StartUpMode", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000003: { + "attributeName": "OnMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _LAUNDRY_DRYER_CONTROLS_CLUSTER_INFO = { + "clusterName": "LaundryDryerControls", + "clusterId": 0x0000004A, + "commands": { + }, + "attributes": { + 0x00000000: { + "attributeName": "SupportedDrynessLevels", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "SelectedDrynessLevel", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _MODE_SELECT_CLUSTER_INFO = { "clusterName": "ModeSelect", "clusterId": 0x00000050, @@ -5900,50 +6135,862 @@ class ChipClusters: }, }, } - _DOOR_LOCK_CLUSTER_INFO = { - "clusterName": "DoorLock", - "clusterId": 0x00000101, + _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "BooleanStateConfiguration", + "clusterId": 0x00000080, "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "LockDoor", + "commandName": "SuppressAlarm", "args": { - "PINCode": "bytes", + "alarmsToSuppress": "int", }, }, 0x00000001: { "commandId": 0x00000001, - "commandName": "UnlockDoor", + "commandName": "EnableDisableAlarm", "args": { - "PINCode": "bytes", + "alarmsToEnableDisable": "int", }, }, - 0x00000003: { - "commandId": 0x00000003, - "commandName": "UnlockWithTimeout", - "args": { - "timeout": "int", - "PINCode": "bytes", - }, + }, + "attributes": { + 0x00000000: { + "attributeName": "CurrentSensitivityLevel", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + "writable": True, }, - 0x0000000B: { - "commandId": 0x0000000B, - "commandName": "SetWeekDaySchedule", - "args": { - "weekDayIndex": "int", - "userIndex": "int", - "daysMask": "int", - "startHour": "int", - "startMinute": "int", - "endHour": "int", - "endMinute": "int", - }, + 0x00000001: { + "attributeName": "SupportedSensitivityLevels", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, }, - 0x0000000C: { - "commandId": 0x0000000C, - "commandName": "GetWeekDaySchedule", - "args": { - "weekDayIndex": "int", + 0x00000002: { + "attributeName": "DefaultSensitivityLevel", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "AlarmsActive", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "AlarmsSuppressed", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "AlarmsEnabled", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "AlarmsSupported", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "SensorFault", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO = { + "clusterName": "ValveConfigurationAndControl", + "clusterId": 0x00000081, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "Open", + "args": { + "openDuration": "int", + "targetLevel": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "Close", + "args": { + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "OpenDuration", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "DefaultOpenDuration", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000002: { + "attributeName": "AutoCloseTime", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "RemainingDuration", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "CurrentState", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "TargetState", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "CurrentLevel", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "TargetLevel", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "DefaultOpenLevel", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000009: { + "attributeName": "ValveFault", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO = { + "clusterName": "ElectricalEnergyMeasurement", + "clusterId": 0x00000091, + "commands": { + }, + "attributes": { + 0x00000000: { + "attributeName": "Accuracy", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x00000001: { + "attributeName": "CumulativeEnergyImported", + "attributeId": 0x00000001, + "type": "", + "reportable": True, + }, + 0x00000002: { + "attributeName": "CumulativeEnergyExported", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "PeriodicEnergyImported", + "attributeId": 0x00000003, + "type": "", + "reportable": True, + }, + 0x00000004: { + "attributeName": "PeriodicEnergyExported", + "attributeId": 0x00000004, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO = { + "clusterName": "DemandResponseLoadControl", + "clusterId": 0x00000096, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "RegisterLoadControlProgramRequest", + "args": { + "loadControlProgram": "LoadControlProgramStruct", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "UnregisterLoadControlProgramRequest", + "args": { + "loadControlProgramID": "bytes", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "AddLoadControlEventRequest", + "args": { + "event": "LoadControlEventStruct", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "RemoveLoadControlEventRequest", + "args": { + "eventID": "bytes", + "cancelControl": "int", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "ClearLoadControlEventsRequest", + "args": { + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "LoadControlPrograms", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x00000001: { + "attributeName": "NumberOfLoadControlPrograms", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "Events", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "ActiveEvents", + "attributeId": 0x00000003, + "type": "", + "reportable": True, + }, + 0x00000004: { + "attributeName": "NumberOfEventsPerProgram", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "NumberOfTransitions", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "DefaultRandomStart", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000007: { + "attributeName": "DefaultRandomDuration", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _DEVICE_ENERGY_MANAGEMENT_CLUSTER_INFO = { + "clusterName": "DeviceEnergyManagement", + "clusterId": 0x00000098, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "PowerAdjustRequest", + "args": { + "power": "int", + "duration": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "CancelPowerAdjustRequest", + "args": { + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "StartTimeAdjustRequest", + "args": { + "requestedStartTime": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "PauseRequest", + "args": { + "duration": "int", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "ResumeRequest", + "args": { + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "ModifyForecastRequest", + "args": { + "forecastId": "int", + "slotAdjustments": "SlotAdjustmentStruct", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "RequestConstraintBasedForecast", + "args": { + "constraints": "ConstraintsStruct", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "ESAType", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "ESACanGenerate", + "attributeId": 0x00000001, + "type": "bool", + "reportable": True, + }, + 0x00000002: { + "attributeName": "ESAState", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "AbsMinPower", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "AbsMaxPower", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "PowerAdjustmentCapability", + "attributeId": 0x00000005, + "type": "", + "reportable": True, + }, + 0x00000006: { + "attributeName": "Forecast", + "attributeId": 0x00000006, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _ENERGY_EVSE_CLUSTER_INFO = { + "clusterName": "EnergyEvse", + "clusterId": 0x00000099, + "commands": { + 0x00000001: { + "commandId": 0x00000001, + "commandName": "Disable", + "args": { + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "EnableCharging", + "args": { + "chargingEnabledUntil": "int", + "minimumChargeCurrent": "int", + "maximumChargeCurrent": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "EnableDischarging", + "args": { + "dischargingEnabledUntil": "int", + "maximumDischargeCurrent": "int", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "StartDiagnostics", + "args": { + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "SetTargets", + "args": { + "dayOfWeekforSequence": "int", + "chargingTargets": "ChargingTargetStruct", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "GetTargets", + "args": { + "daysToReturn": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "ClearTargets", + "args": { + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "State", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "SupplyState", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "FaultState", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "ChargingEnabledUntil", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "DischargingEnabledUntil", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "CircuitCapacity", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "MinimumChargeCurrent", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "MaximumChargeCurrent", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "MaximumDischargeCurrent", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + }, + 0x00000009: { + "attributeName": "UserMaximumChargeCurrent", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000000A: { + "attributeName": "RandomizationDelayWindow", + "attributeId": 0x0000000A, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000021: { + "attributeName": "NumberOfWeeklyTargets", + "attributeId": 0x00000021, + "type": "int", + "reportable": True, + }, + 0x00000022: { + "attributeName": "NumberOfDailyTargets", + "attributeId": 0x00000022, + "type": "int", + "reportable": True, + }, + 0x00000023: { + "attributeName": "NextChargeStartTime", + "attributeId": 0x00000023, + "type": "int", + "reportable": True, + }, + 0x00000024: { + "attributeName": "NextChargeTargetTime", + "attributeId": 0x00000024, + "type": "int", + "reportable": True, + }, + 0x00000025: { + "attributeName": "NextChargeRequiredEnergy", + "attributeId": 0x00000025, + "type": "int", + "reportable": True, + }, + 0x00000026: { + "attributeName": "NextChargeTargetSoC", + "attributeId": 0x00000026, + "type": "int", + "reportable": True, + }, + 0x00000027: { + "attributeName": "ApproximateEVEfficiency", + "attributeId": 0x00000027, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000030: { + "attributeName": "StateOfCharge", + "attributeId": 0x00000030, + "type": "int", + "reportable": True, + }, + 0x00000031: { + "attributeName": "BatteryCapacity", + "attributeId": 0x00000031, + "type": "int", + "reportable": True, + }, + 0x00000032: { + "attributeName": "VehicleID", + "attributeId": 0x00000032, + "type": "str", + "reportable": True, + }, + 0x00000040: { + "attributeName": "SessionID", + "attributeId": 0x00000040, + "type": "int", + "reportable": True, + }, + 0x00000041: { + "attributeName": "SessionDuration", + "attributeId": 0x00000041, + "type": "int", + "reportable": True, + }, + 0x00000042: { + "attributeName": "SessionEnergyCharged", + "attributeId": 0x00000042, + "type": "int", + "reportable": True, + }, + 0x00000043: { + "attributeName": "SessionEnergyDischarged", + "attributeId": 0x00000043, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _DOOR_LOCK_CLUSTER_INFO = { + "clusterName": "DoorLock", + "clusterId": 0x00000101, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "LockDoor", + "args": { + "PINCode": "bytes", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "UnlockDoor", + "args": { + "PINCode": "bytes", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "UnlockWithTimeout", + "args": { + "timeout": "int", + "PINCode": "bytes", + }, + }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "SetWeekDaySchedule", + "args": { + "weekDayIndex": "int", + "userIndex": "int", + "daysMask": "int", + "startHour": "int", + "startMinute": "int", + "endHour": "int", + "endMinute": "int", + }, + }, + 0x0000000C: { + "commandId": 0x0000000C, + "commandName": "GetWeekDaySchedule", + "args": { + "weekDayIndex": "int", "userIndex": "int", }, }, @@ -6890,7 +7937,7 @@ class ChipClusters: "numberOfTransitionsForSequence": "int", "dayOfWeekForSequence": "int", "modeForSequence": "int", - "transitions": "ThermostatScheduleTransition", + "transitions": "WeeklyScheduleTransitionStruct", }, }, 0x00000002: { @@ -9859,6 +10906,39 @@ class ChipClusters: "count": "int", }, }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "GetProgramGuide", + "args": { + "startTime": "int", + "endTime": "int", + "channelList": "ChannelInfoStruct", + "pageToken": "PageTokenStruct", + "recordingFlag": "int", + "externalIDList": "AdditionalInfoStruct", + "data": "bytes", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "RecordProgram", + "args": { + "programIdentifier": "str", + "shouldRecordSeries": "bool", + "externalIDList": "AdditionalInfoStruct", + "data": "bytes", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "CancelRecordProgram", + "args": { + "programIdentifier": "str", + "shouldRecordSeries": "bool", + "externalIDList": "AdditionalInfoStruct", + "data": "bytes", + }, + }, }, "attributes": { 0x00000000: { @@ -10025,12 +11105,14 @@ class ChipClusters: "commandId": 0x00000006, "commandName": "Rewind", "args": { + "audioAdvanceUnmuted": "bool", }, }, 0x00000007: { "commandId": 0x00000007, "commandName": "FastForward", "args": { + "audioAdvanceUnmuted": "bool", }, }, 0x00000008: { @@ -10054,6 +11136,27 @@ class ChipClusters: "position": "int", }, }, + 0x0000000C: { + "commandId": 0x0000000C, + "commandName": "ActivateAudioTrack", + "args": { + "trackID": "str", + "audioOutputIndex": "int", + }, + }, + 0x0000000D: { + "commandId": 0x0000000D, + "commandName": "ActivateTextTrack", + "args": { + "trackID": "str", + }, + }, + 0x0000000E: { + "commandId": 0x0000000E, + "commandName": "DeactivateTextTrack", + "args": { + }, + }, }, "attributes": { 0x00000000: { @@ -10098,6 +11201,30 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000007: { + "attributeName": "ActiveAudioTrack", + "attributeId": 0x00000007, + "type": "", + "reportable": True, + }, + 0x00000008: { + "attributeName": "AvailableAudioTracks", + "attributeId": 0x00000008, + "type": "", + "reportable": True, + }, + 0x00000009: { + "attributeName": "ActiveTextTrack", + "attributeId": 0x00000009, + "type": "", + "reportable": True, + }, + 0x0000000A: { + "attributeName": "AvailableTextTracks", + "attributeId": 0x0000000A, + "type": "", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -10331,6 +11458,8 @@ class ChipClusters: "search": "ContentSearchStruct", "autoPlay": "bool", "data": "str", + "playbackPreferences": "PlaybackPreferencesStruct", + "useCurrentContext": "bool", }, }, 0x00000001: { @@ -10652,12 +11781,225 @@ class ChipClusters: "args": { "tempAccountIdentifier": "str", "setupPIN": "str", + "node": "int", }, }, 0x00000003: { "commandId": 0x00000003, "commandName": "Logout", "args": { + "node": "int", + }, + }, + }, + "attributes": { + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _CONTENT_CONTROL_CLUSTER_INFO = { + "clusterName": "ContentControl", + "clusterId": 0x0000050F, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "UpdatePIN", + "args": { + "oldPIN": "str", + "newPIN": "str", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ResetPIN", + "args": { + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "Enable", + "args": { + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "Disable", + "args": { + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "AddBonusTime", + "args": { + "PINCode": "str", + "bonusTime": "int", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "SetScreenDailyTime", + "args": { + "screenTime": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "BlockUnratedContent", + "args": { + }, + }, + 0x00000008: { + "commandId": 0x00000008, + "commandName": "UnblockUnratedContent", + "args": { + }, + }, + 0x00000009: { + "commandId": 0x00000009, + "commandName": "SetOnDemandRatingThreshold", + "args": { + "rating": "str", + }, + }, + 0x0000000A: { + "commandId": 0x0000000A, + "commandName": "SetScheduledContentRatingThreshold", + "args": { + "rating": "str", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Enabled", + "attributeId": 0x00000000, + "type": "bool", + "reportable": True, + }, + 0x00000001: { + "attributeName": "OnDemandRatings", + "attributeId": 0x00000001, + "type": "", + "reportable": True, + }, + 0x00000002: { + "attributeName": "OnDemandRatingThreshold", + "attributeId": 0x00000002, + "type": "str", + "reportable": True, + }, + 0x00000003: { + "attributeName": "ScheduledContentRatings", + "attributeId": 0x00000003, + "type": "", + "reportable": True, + }, + 0x00000004: { + "attributeName": "ScheduledContentRatingThreshold", + "attributeId": 0x00000004, + "type": "str", + "reportable": True, + }, + 0x00000005: { + "attributeName": "ScreenDailyTime", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "RemainingScreenTime", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "BlockUnrated", + "attributeId": 0x00000007, + "type": "bool", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _CONTENT_APP_OBSERVER_CLUSTER_INFO = { + "clusterName": "ContentAppObserver", + "clusterId": 0x00000510, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ContentAppMessage", + "args": { + "data": "str", + "encodingHint": "str", }, }, }, @@ -12494,7 +13836,10 @@ class ChipClusters: 0x00000044: _PROXY_VALID_CLUSTER_INFO, 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000046: _ICD_MANAGEMENT_CLUSTER_INFO, - 0x00000048: _OVEN_OPERATIONAL_STATE_CLUSTER_INFO, + 0x00000047: _TIMER_CLUSTER_INFO, + 0x00000048: _OVEN_CAVITY_OPERATIONAL_STATE_CLUSTER_INFO, + 0x00000049: _OVEN_MODE_CLUSTER_INFO, + 0x0000004A: _LAUNDRY_DRYER_CONTROLS_CLUSTER_INFO, 0x00000050: _MODE_SELECT_CLUSTER_INFO, 0x00000051: _LAUNDRY_WASHER_MODE_CLUSTER_INFO, 0x00000052: _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, @@ -12513,6 +13858,12 @@ class ChipClusters: 0x00000061: _RVC_OPERATIONAL_STATE_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, 0x00000072: _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, + 0x00000080: _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, + 0x00000081: _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, + 0x00000091: _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO, + 0x00000096: _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, + 0x00000098: _DEVICE_ENERGY_MANAGEMENT_CLUSTER_INFO, + 0x00000099: _ENERGY_EVSE_CLUSTER_INFO, 0x00000101: _DOOR_LOCK_CLUSTER_INFO, 0x00000102: _WINDOW_COVERING_CLUSTER_INFO, 0x00000103: _BARRIER_CONTROL_CLUSTER_INFO, @@ -12550,6 +13901,8 @@ class ChipClusters: 0x0000050C: _APPLICATION_LAUNCHER_CLUSTER_INFO, 0x0000050D: _APPLICATION_BASIC_CLUSTER_INFO, 0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO, + 0x0000050F: _CONTENT_CONTROL_CLUSTER_INFO, + 0x00000510: _CONTENT_APP_OBSERVER_CLUSTER_INFO, 0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, 0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO, 0xFFF1FC06: _FAULT_INJECTION_CLUSTER_INFO, @@ -12598,7 +13951,10 @@ class ChipClusters: "ProxyValid": _PROXY_VALID_CLUSTER_INFO, "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "IcdManagement": _ICD_MANAGEMENT_CLUSTER_INFO, - "OvenOperationalState": _OVEN_OPERATIONAL_STATE_CLUSTER_INFO, + "Timer": _TIMER_CLUSTER_INFO, + "OvenCavityOperationalState": _OVEN_CAVITY_OPERATIONAL_STATE_CLUSTER_INFO, + "OvenMode": _OVEN_MODE_CLUSTER_INFO, + "LaundryDryerControls": _LAUNDRY_DRYER_CONTROLS_CLUSTER_INFO, "ModeSelect": _MODE_SELECT_CLUSTER_INFO, "LaundryWasherMode": _LAUNDRY_WASHER_MODE_CLUSTER_INFO, "RefrigeratorAndTemperatureControlledCabinetMode": _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, @@ -12617,6 +13973,12 @@ class ChipClusters: "RvcOperationalState": _RVC_OPERATIONAL_STATE_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, "ActivatedCarbonFilterMonitoring": _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, + "BooleanStateConfiguration": _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, + "ValveConfigurationAndControl": _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, + "ElectricalEnergyMeasurement": _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO, + "DemandResponseLoadControl": _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, + "DeviceEnergyManagement": _DEVICE_ENERGY_MANAGEMENT_CLUSTER_INFO, + "EnergyEvse": _ENERGY_EVSE_CLUSTER_INFO, "DoorLock": _DOOR_LOCK_CLUSTER_INFO, "WindowCovering": _WINDOW_COVERING_CLUSTER_INFO, "BarrierControl": _BARRIER_CONTROL_CLUSTER_INFO, @@ -12654,6 +14016,8 @@ class ChipClusters: "ApplicationLauncher": _APPLICATION_LAUNCHER_CLUSTER_INFO, "ApplicationBasic": _APPLICATION_BASIC_CLUSTER_INFO, "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO, + "ContentControl": _CONTENT_CONTROL_CLUSTER_INFO, + "ContentAppObserver": _CONTENT_APP_OBSERVER_CLUSTER_INFO, "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, "UnitTesting": _UNIT_TESTING_CLUSTER_INFO, "FaultInjection": _FAULT_INJECTION_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0b69d20afbff03..d5de5ecabd7b30 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -590,14 +590,14 @@ class Scenes(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=bool), + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="nameSupport", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="lastConfiguredBy", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="sceneTableSize", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricSceneInfo", Tag=0x00000007, Type=typing.List[Scenes.Structs.SceneInfoStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -606,14 +606,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - sceneCount: 'uint' = None - currentScene: 'uint' = None - currentGroup: 'uint' = None - sceneValid: 'bool' = None + sceneCount: 'typing.Optional[uint]' = None + currentScene: 'typing.Optional[uint]' = None + currentGroup: 'typing.Optional[uint]' = None + sceneValid: 'typing.Optional[bool]' = None nameSupport: 'uint' = None lastConfiguredBy: 'typing.Union[None, Nullable, uint]' = None sceneTableSize: 'uint' = None - remainingCapacity: 'uint' = None + fabricSceneInfo: 'typing.List[Scenes.Structs.SceneInfoStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -661,6 +661,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterID: 'uint' = 0 attributeValueList: 'typing.List[Scenes.Structs.AttributeValuePair]' = field(default_factory=lambda: []) + @dataclass + class SceneInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=3, Type=bool), + ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + sceneCount: 'uint' = 0 + currentScene: 'uint' = 0 + currentGroup: 'uint' = 0 + sceneValid: 'bool' = False + remainingCapacity: 'uint' = 0 + fabricIndex: 'uint' = 0 + class Commands: @dataclass class AddScene(ClusterCommand): @@ -1063,9 +1084,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class CurrentScene(ClusterAttributeDescriptor): @@ -1079,9 +1100,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class CurrentGroup(ClusterAttributeDescriptor): @@ -1095,9 +1116,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class SceneValid(ClusterAttributeDescriptor): @@ -1111,9 +1132,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'bool' = False + value: 'typing.Optional[bool]' = None @dataclass class NameSupport(ClusterAttributeDescriptor): @@ -1164,7 +1185,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class RemainingCapacity(ClusterAttributeDescriptor): + class FabricSceneInfo(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000005 @@ -1175,9 +1196,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[Scenes.Structs.SceneInfoStruct]) - value: 'uint' = 0 + value: 'typing.List[Scenes.Structs.SceneInfoStruct]' = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -1834,7 +1855,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class MoveMode(MatterIntEnum): + class MoveModeEnum(MatterIntEnum): kUp = 0x00 kDown = 0x01 # All received enum values that are not listed above will be mapped @@ -1843,7 +1864,7 @@ class MoveMode(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, - class StepMode(MatterIntEnum): + class StepModeEnum(MatterIntEnum): kUp = 0x00 kDown = 0x01 # All received enum values that are not listed above will be mapped @@ -1858,7 +1879,7 @@ class Feature(IntFlag): kLighting = 0x2 kFrequency = 0x4 - class LevelControlOptions(IntFlag): + class OptionsBitmap(IntFlag): kExecuteIfOff = 0x1 kCoupleColorTempToLevel = 0x2 @@ -1896,13 +1917,13 @@ class Move(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'LevelControl.Enums.MoveMode' = 0 + moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 rate: 'typing.Union[Nullable, uint]' = NullValue optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -1918,14 +1939,14 @@ class Step(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'LevelControl.Enums.StepMode' = 0 + stepMode: 'LevelControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'typing.Union[Nullable, uint]' = NullValue optionsMask: 'uint' = 0 @@ -1982,13 +2003,13 @@ class MoveWithOnOff(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'LevelControl.Enums.MoveMode' = 0 + moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 rate: 'typing.Union[Nullable, uint]' = NullValue optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -2004,14 +2025,14 @@ class StepWithOnOff(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'LevelControl.Enums.StepMode' = 0 + stepMode: 'LevelControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'typing.Union[Nullable, uint]' = NullValue optionsMask: 'uint' = 0 @@ -4108,6 +4129,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="capabilityMinima", Tag=0x00000013, Type=BasicInformation.Structs.CapabilityMinimaStruct), ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]), + ClusterObjectFieldDescriptor(Label="specificationVersion", Tag=0x00000015, Type=uint), + ClusterObjectFieldDescriptor(Label="maxPathsPerInvoke", Tag=0x00000016, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -4137,6 +4160,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: uniqueID: 'typing.Optional[str]' = None capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + specificationVersion: 'uint' = None + maxPathsPerInvoke: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -4564,6 +4589,38 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + @dataclass + class SpecificationVersion(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000015 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class MaxPathsPerInvoke(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000016 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -8426,12 +8483,12 @@ class TimeSnapshotResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="systemTimeUs", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="UTCTimeUs", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="systemTimeMs", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="posixTimeMs", Tag=1, Type=typing.Union[Nullable, uint]), ]) - systemTimeUs: 'uint' = 0 - UTCTimeUs: 'typing.Union[Nullable, uint]' = NullValue + systemTimeMs: 'uint' = 0 + posixTimeMs: 'typing.Union[Nullable, uint]' = NullValue class Attributes: @dataclass @@ -14904,14 +14961,30 @@ class StayActiveRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'StayActiveResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class StayActiveResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000046 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="promisedActiveDuration", Tag=0, Type=uint), ]) + promisedActiveDuration: 'uint' = 0 + class Attributes: @dataclass class IdleModeDuration(ClusterAttributeDescriptor): @@ -15139,7 +15212,260 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class OvenOperationalState(Cluster): +class Timer(Cluster): + id: typing.ClassVar[int] = 0x00000047 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="setTime", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="timeRemaining", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="timerState", Tag=0x00000002, Type=Timer.Enums.TimerStatusEnum), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + setTime: 'uint' = None + timeRemaining: 'uint' = None + timerState: 'Timer.Enums.TimerStatusEnum' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class TimerStatusEnum(MatterIntEnum): + kRunning = 0x00 + kPaused = 0x01 + kExpired = 0x02 + kReady = 0x03 + # 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 = 4, + + class Bitmaps: + class Feature(IntFlag): + kReset = 0x1 + + class Commands: + @dataclass + class SetTimer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000047 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newTime", Tag=0, Type=uint), + ]) + + newTime: 'uint' = 0 + + @dataclass + class ResetTimer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000047 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class AddTime(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000047 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="additionalTime", Tag=0, Type=uint), + ]) + + additionalTime: 'uint' = 0 + + @dataclass + class ReduceTime(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000047 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeReduction", Tag=0, Type=uint), + ]) + + timeReduction: 'uint' = 0 + + class Attributes: + @dataclass + class SetTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class TimeRemaining(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class TimerState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=Timer.Enums.TimerStatusEnum) + + value: 'Timer.Enums.TimerStatusEnum' = 0 + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000047 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class OvenCavityOperationalState(Cluster): id: typing.ClassVar[int] = 0x00000048 @ChipUtility.classproperty @@ -15149,9 +15475,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="phaseList", Tag=0x00000000, Type=typing.Union[Nullable, typing.List[str]]), ClusterObjectFieldDescriptor(Label="currentPhase", Tag=0x00000001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="countdownTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[OvenOperationalState.Structs.OperationalStateStruct]), - ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=uint), - ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=OvenOperationalState.Structs.ErrorStateStruct), + ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]), + ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=OvenCavityOperationalState.Enums.OperationalStateEnum), + ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15163,9 +15489,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: phaseList: 'typing.Union[Nullable, typing.List[str]]' = None currentPhase: 'typing.Union[Nullable, uint]' = None countdownTime: 'typing.Union[None, Nullable, uint]' = None - operationalStateList: 'typing.List[OvenOperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'uint' = None - operationalError: 'OvenOperationalState.Structs.ErrorStateStruct' = None + operationalStateList: 'typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]' = None + operationalState: 'OvenCavityOperationalState.Enums.OperationalStateEnum' = None + operationalError: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15186,15 +15512,15 @@ class ErrorStateEnum(MatterIntEnum): kUnknownEnumValue = 4, class OperationalStateEnum(MatterIntEnum): - kPreheating = 0x40 - kPreheated = 0x41 - kCoolingDown = 0x42 - kSelfCleaning = 0x43 + kStopped = 0x00 + kRunning = 0x01 + kPaused = 0x02 + kError = 0x03 # 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 = 0, + kUnknownEnumValue = 4, class Structs: @dataclass @@ -15289,10 +15615,10 @@ class OperationalCommandResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=OvenOperationalState.Structs.ErrorStateStruct), + ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ]) - commandResponseState: 'OvenOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenOperationalState.Structs.ErrorStateStruct()) + commandResponseState: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) class Attributes: @dataclass @@ -15355,9 +15681,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[OvenOperationalState.Structs.OperationalStateStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]) - value: 'typing.List[OvenOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: 'typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) @dataclass class OperationalState(ClusterAttributeDescriptor): @@ -15371,9 +15697,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=OvenCavityOperationalState.Enums.OperationalStateEnum) - value: 'uint' = 0 + value: 'OvenCavityOperationalState.Enums.OperationalStateEnum' = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): @@ -15387,9 +15713,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=OvenOperationalState.Structs.ErrorStateStruct) + return ClusterObjectFieldDescriptor(Type=OvenCavityOperationalState.Structs.ErrorStateStruct) - value: 'OvenOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenOperationalState.Structs.ErrorStateStruct()) + value: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -15502,10 +15828,10 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=OvenOperationalState.Structs.ErrorStateStruct), + ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ]) - errorState: 'OvenOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenOperationalState.Structs.ErrorStateStruct()) + errorState: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) @dataclass class OperationCompletion(ClusterEvent): @@ -15532,19 +15858,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass -class ModeSelect(Cluster): - id: typing.ClassVar[int] = 0x00000050 +class OvenMode(Cluster): + id: typing.ClassVar[int] = 0x00000049 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), - ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[ModeSelect.Structs.ModeOptionStruct]), - ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[OvenMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15553,9 +15877,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - description: 'str' = None - standardNamespace: 'typing.Union[Nullable, uint]' = None - supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None + supportedModes: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -15566,22 +15888,39 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ModeTag(MatterIntEnum): + kBake = 0x4000 + kConvection = 0x4001 + kGrill = 0x4002 + kRoast = 0x4003 + kClean = 0x4004 + kConvectionBake = 0x4005 + kConvectionRoast = 0x4006 + kWarming = 0x4007 + kProofing = 0x4008 + # 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 = 0, + class Bitmaps: class Feature(IntFlag): kOnOff = 0x1 class Structs: @dataclass - class SemanticTagStruct(ClusterObject): + class ModeTagStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), ]) - mfgCode: 'uint' = 0 + mfgCode: 'typing.Optional[uint]' = None value: 'uint' = 0 @dataclass @@ -15592,20 +15931,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="semanticTags", Tag=2, Type=typing.List[ModeSelect.Structs.SemanticTagStruct]), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[OvenMode.Structs.ModeTagStruct]), ]) label: 'str' = "" mode: 'uint' = 0 - semanticTags: 'typing.List[ModeSelect.Structs.SemanticTagStruct]' = field(default_factory=lambda: []) + modeTags: 'typing.List[OvenMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000050 + cluster_id: typing.ClassVar[int] = 0x00000049 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15616,12 +15955,30 @@ def descriptor(cls) -> ClusterObjectDescriptor: newMode: 'uint' = 0 + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000049 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + class Attributes: @dataclass - class Description(ClusterAttributeDescriptor): + class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15629,15 +15986,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.List[OvenMode.Structs.ModeOptionStruct]) - value: 'str' = "" + value: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) @dataclass - class StandardNamespace(ClusterAttributeDescriptor): + class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15645,15 +16002,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'uint' = 0 @dataclass - class SupportedModes(ClusterAttributeDescriptor): + class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15661,20 +16018,100 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ModeSelect.Structs.ModeOptionStruct]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class CurrentMode(ClusterAttributeDescriptor): + class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: return 0x00000003 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) @@ -15682,42 +16119,99 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class StartUpMode(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 - value: 'typing.Union[None, Nullable, uint]' = None +@dataclass +class LaundryDryerControls(Cluster): + id: typing.ClassVar[int] = 0x0000004A + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="supportedDrynessLevels", Tag=0x00000000, Type=typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]), + ClusterObjectFieldDescriptor(Label="selectedDrynessLevel", Tag=0x00000001, Type=typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + supportedDrynessLevels: 'typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]' = None + selectedDrynessLevel: 'typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class DrynessLevelEnum(MatterIntEnum): + kLow = 0x00 + kNormal = 0x01 + kExtra = 0x02 + kMax = 0x03 + # 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 = 4, + + class Attributes: @dataclass - class OnMode(ClusterAttributeDescriptor): + class SupportedDrynessLevels(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]' = field(default_factory=lambda: []) + + @dataclass + class SelectedDrynessLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000004A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]) + + value: 'typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]' = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15733,7 +16227,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15749,7 +16243,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15765,7 +16259,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15781,7 +16275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15797,7 +16291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x0000004A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15811,17 +16305,19 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class LaundryWasherMode(Cluster): - id: typing.ClassVar[int] = 0x00000051 +class ModeSelect(Cluster): + id: typing.ClassVar[int] = 0x00000050 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]), - ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[ModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15830,7 +16326,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None + description: 'str' = None + standardNamespace: 'typing.Union[Nullable, uint]' = None + supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -15841,34 +16339,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class ModeTag(MatterIntEnum): - kNormal = 0x4000 - kDelicate = 0x4001 - kHeavy = 0x4002 - kWhites = 0x4003 - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. - class Bitmaps: class Feature(IntFlag): kOnOff = 0x1 class Structs: @dataclass - class ModeTagStruct(ClusterObject): + class SemanticTagStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), ]) - mfgCode: 'typing.Optional[uint]' = None + mfgCode: 'uint' = 0 value: 'uint' = 0 @dataclass @@ -15879,20 +16365,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[LaundryWasherMode.Structs.ModeTagStruct]), + ClusterObjectFieldDescriptor(Label="semanticTags", Tag=2, Type=typing.List[ModeSelect.Structs.SemanticTagStruct]), ]) label: 'str' = "" mode: 'uint' = 0 - modeTags: 'typing.List[LaundryWasherMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + semanticTags: 'typing.List[ModeSelect.Structs.SemanticTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000051 + cluster_id: typing.ClassVar[int] = 0x00000050 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15903,50 +16389,64 @@ def descriptor(cls) -> ClusterObjectDescriptor: newMode: 'uint' = 0 + class Attributes: @dataclass - class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000051 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class Description(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000050 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class StandardNamespace(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000050 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue - class Attributes: @dataclass class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[ModeSelect.Structs.ModeOptionStruct]) - value: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15958,11 +16458,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15974,11 +16474,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15990,7 +16490,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16006,7 +16506,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16022,7 +16522,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16038,7 +16538,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16054,7 +16554,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16070,7 +16570,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16084,14 +16584,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class RefrigeratorAndTemperatureControlledCabinetMode(Cluster): - id: typing.ClassVar[int] = 0x00000052 +class LaundryWasherMode(Cluster): + id: typing.ClassVar[int] = 0x00000051 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), @@ -16103,7 +16603,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None + supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -16116,8 +16616,281 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): - kRapidCool = 0x4000 - kRapidFreeze = 0x4001 + kNormal = 0x4000 + kDelicate = 0x4001 + kHeavy = 0x4002 + kWhites = 0x4003 + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. + + class Bitmaps: + class Feature(IntFlag): + kOnOff = 0x1 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[LaundryWasherMode.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[LaundryWasherMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + + class Commands: + @dataclass + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000051 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000051 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + + class Attributes: + @dataclass + class SupportedModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]) + + value: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class RefrigeratorAndTemperatureControlledCabinetMode(Cluster): + id: typing.ClassVar[int] = 0x00000052 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ModeTag(MatterIntEnum): + kRapidCool = 0x4000 + kRapidFreeze = 0x4001 # kUnknownEnumValue intentionally not defined. This enum never goes # through DataModel::Decode, likely because it is a part of a derived # cluster. As a result having kUnknownEnumValue in this enum is error @@ -20710,49 +21483,21 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class DoorLock(Cluster): - id: typing.ClassVar[int] = 0x00000101 +class BooleanStateConfiguration(Cluster): + id: typing.ClassVar[int] = 0x00000080 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="lockState", Tag=0x00000000, Type=typing.Union[Nullable, DoorLock.Enums.DlLockState]), - ClusterObjectFieldDescriptor(Label="lockType", Tag=0x00000001, Type=DoorLock.Enums.DlLockType), - ClusterObjectFieldDescriptor(Label="actuatorEnabled", Tag=0x00000002, Type=bool), - ClusterObjectFieldDescriptor(Label="doorState", Tag=0x00000003, Type=typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]), - ClusterObjectFieldDescriptor(Label="doorOpenEvents", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="doorClosedEvents", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="openPeriod", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfTotalUsersSupported", Tag=0x00000011, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfPINUsersSupported", Tag=0x00000012, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfRFIDUsersSupported", Tag=0x00000013, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfWeekDaySchedulesSupportedPerUser", Tag=0x00000014, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfYearDaySchedulesSupportedPerUser", Tag=0x00000015, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfHolidaySchedulesSupported", Tag=0x00000016, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxPINCodeLength", Tag=0x00000017, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minPINCodeLength", Tag=0x00000018, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxRFIDCodeLength", Tag=0x00000019, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minRFIDCodeLength", Tag=0x0000001A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="credentialRulesSupport", Tag=0x0000001B, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfCredentialsSupportedPerUser", Tag=0x0000001C, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="language", Tag=0x00000021, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="LEDSettings", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="autoRelockTime", Tag=0x00000023, Type=uint), - ClusterObjectFieldDescriptor(Label="soundVolume", Tag=0x00000024, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="operatingMode", Tag=0x00000025, Type=DoorLock.Enums.OperatingModeEnum), - ClusterObjectFieldDescriptor(Label="supportedOperatingModes", Tag=0x00000026, Type=uint), - ClusterObjectFieldDescriptor(Label="defaultConfigurationRegister", Tag=0x00000027, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="enableLocalProgramming", Tag=0x00000028, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="enableOneTouchLocking", Tag=0x00000029, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="enableInsideStatusLED", Tag=0x0000002A, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="enablePrivacyModeButton", Tag=0x0000002B, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="localProgrammingFeatures", Tag=0x0000002C, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="wrongCodeEntryLimit", Tag=0x00000030, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="userCodeTemporaryDisableTime", Tag=0x00000031, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="sendPINOverTheAir", Tag=0x00000032, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="requirePINforRemoteOperation", Tag=0x00000033, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="expiringUserTimeout", Tag=0x00000035, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentSensitivityLevel", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="supportedSensitivityLevels", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="defaultSensitivityLevel", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsEnabled", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsSupported", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -20761,42 +21506,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - lockState: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = None - lockType: 'DoorLock.Enums.DlLockType' = None - actuatorEnabled: 'bool' = None - doorState: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None - doorOpenEvents: 'typing.Optional[uint]' = None - doorClosedEvents: 'typing.Optional[uint]' = None - openPeriod: 'typing.Optional[uint]' = None - numberOfTotalUsersSupported: 'typing.Optional[uint]' = None - numberOfPINUsersSupported: 'typing.Optional[uint]' = None - numberOfRFIDUsersSupported: 'typing.Optional[uint]' = None - numberOfWeekDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None - numberOfYearDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None - numberOfHolidaySchedulesSupported: 'typing.Optional[uint]' = None - maxPINCodeLength: 'typing.Optional[uint]' = None - minPINCodeLength: 'typing.Optional[uint]' = None - maxRFIDCodeLength: 'typing.Optional[uint]' = None - minRFIDCodeLength: 'typing.Optional[uint]' = None - credentialRulesSupport: 'typing.Optional[uint]' = None - numberOfCredentialsSupportedPerUser: 'typing.Optional[uint]' = None - language: 'typing.Optional[str]' = None - LEDSettings: 'typing.Optional[uint]' = None - autoRelockTime: 'uint' = None - soundVolume: 'typing.Optional[uint]' = None - operatingMode: 'DoorLock.Enums.OperatingModeEnum' = None - supportedOperatingModes: 'uint' = None - defaultConfigurationRegister: 'typing.Optional[uint]' = None - enableLocalProgramming: 'typing.Optional[bool]' = None - enableOneTouchLocking: 'typing.Optional[bool]' = None - enableInsideStatusLED: 'typing.Optional[bool]' = None - enablePrivacyModeButton: 'typing.Optional[bool]' = None - localProgrammingFeatures: 'typing.Optional[uint]' = None - wrongCodeEntryLimit: 'typing.Optional[uint]' = None - userCodeTemporaryDisableTime: 'typing.Optional[uint]' = None - sendPINOverTheAir: 'typing.Optional[bool]' = None - requirePINforRemoteOperation: 'typing.Optional[bool]' = None - expiringUserTimeout: 'typing.Optional[uint]' = None + currentSensitivityLevel: 'typing.Optional[uint]' = None + supportedSensitivityLevels: 'typing.Optional[uint]' = None + defaultSensitivityLevel: 'typing.Optional[uint]' = None + alarmsActive: 'typing.Optional[uint]' = None + alarmsSuppressed: 'typing.Optional[uint]' = None + alarmsEnabled: 'typing.Optional[uint]' = None + alarmsSupported: 'typing.Optional[uint]' = None + sensorFault: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -20804,743 +21521,5307 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class AlarmCodeEnum(MatterIntEnum): - kLockJammed = 0x00 - kLockFactoryReset = 0x01 - kLockRadioPowerCycled = 0x03 - kWrongCodeEntryLimit = 0x04 - kFrontEsceutcheonRemoved = 0x05 - kDoorForcedOpen = 0x06 - kDoorAjar = 0x07 - kForcedUser = 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 = 2, + class Bitmaps: + class AlarmModeBitmap(IntFlag): + kVisual = 0x1 + kAudible = 0x2 - class CredentialRuleEnum(MatterIntEnum): - kSingle = 0x00 - kDual = 0x01 - kTri = 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, + class Feature(IntFlag): + kVisual = 0x1 + kAudible = 0x2 + kAlarmSuppress = 0x4 + kSensitivityLevel = 0x8 - class CredentialTypeEnum(MatterIntEnum): - kProgrammingPIN = 0x00 - kPin = 0x01 - kRfid = 0x02 - kFingerprint = 0x03 - kFingerVein = 0x04 - kFace = 0x05 - # 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 = 6, + class SensorFaultBitmap(IntFlag): + kGeneralFault = 0x1 - class DataOperationTypeEnum(MatterIntEnum): - kAdd = 0x00 - kClear = 0x01 - kModify = 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, + class Commands: + @dataclass + class SuppressAlarm(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000080 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None - class DlLockState(MatterIntEnum): - kNotFullyLocked = 0x00 - kLocked = 0x01 - kUnlocked = 0x02 - kUnlatched = 0x03 - # 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 = 4, + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsToSuppress", Tag=0, Type=uint), + ]) - class DlLockType(MatterIntEnum): - kDeadBolt = 0x00 - kMagnetic = 0x01 - kOther = 0x02 - kMortise = 0x03 - kRim = 0x04 - kLatchBolt = 0x05 - kCylindricalLock = 0x06 - kTubularLock = 0x07 - kInterconnectedLock = 0x08 - kDeadLatch = 0x09 - kDoorFurniture = 0x0A - kEurocylinder = 0x0B - # 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 = 12, + alarmsToSuppress: 'uint' = 0 - class DlStatus(MatterIntEnum): - kSuccess = 0x00 - kFailure = 0x01 - kDuplicate = 0x02 - kOccupied = 0x03 - kInvalidField = 0x85 - kResourceExhausted = 0x89 - kNotFound = 0x8B - # 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 = 4, + @dataclass + class EnableDisableAlarm(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000080 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None - class DoorLockOperationEventCode(MatterIntEnum): - kUnknownOrMfgSpecific = 0x00 - kLock = 0x01 - kUnlock = 0x02 - kLockInvalidPinOrId = 0x03 - kLockInvalidSchedule = 0x04 - kUnlockInvalidPinOrId = 0x05 - kUnlockInvalidSchedule = 0x06 - kOneTouchLock = 0x07 - kKeyLock = 0x08 - kKeyUnlock = 0x09 - kAutoLock = 0x0A - kScheduleLock = 0x0B - kScheduleUnlock = 0x0C - kManualLock = 0x0D - kManualUnlock = 0x0E - # 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 = 15, + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsToEnableDisable", Tag=0, Type=uint), + ]) - class DoorLockProgrammingEventCode(MatterIntEnum): - kUnknownOrMfgSpecific = 0x00 - kMasterCodeChanged = 0x01 - kPinAdded = 0x02 - kPinDeleted = 0x03 - kPinChanged = 0x04 - kIdAdded = 0x05 - kIdDeleted = 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, + alarmsToEnableDisable: 'uint' = 0 - class DoorLockSetPinOrIdStatus(MatterIntEnum): - kSuccess = 0x00 - kGeneralFailure = 0x01 - kMemoryFull = 0x02 - kDuplicateCodeError = 0x03 - # 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 = 4, + class Attributes: + @dataclass + class CurrentSensitivityLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 - class DoorLockUserStatus(MatterIntEnum): - kAvailable = 0x00 - kOccupiedEnabled = 0x01 - kOccupiedDisabled = 0x03 - kNotSupported = 0xFF - # 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 = 2, + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 - class DoorLockUserType(MatterIntEnum): - kUnrestricted = 0x00 - kYearDayScheduleUser = 0x01 - kWeekDayScheduleUser = 0x02 - kMasterUser = 0x03 - kNonAccessUser = 0x04 - kNotSupported = 0xFF + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class SupportedSensitivityLevels(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class DefaultSensitivityLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsActive(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsSuppressed(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class SensorFault(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class AlarmsStateChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=1, Type=typing.Optional[uint]), + ]) + + alarmsActive: 'uint' = 0 + alarmsSuppressed: 'typing.Optional[uint]' = None + + @dataclass + class SensorFault(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0, Type=uint), + ]) + + sensorFault: 'uint' = 0 + + +@dataclass +class ValveConfigurationAndControl(Cluster): + id: typing.ClassVar[int] = 0x00000081 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="openDuration", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="defaultOpenDuration", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="autoCloseTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="remainingDuration", Tag=0x00000003, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentState", Tag=0x00000004, Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]), + ClusterObjectFieldDescriptor(Label="targetState", Tag=0x00000005, Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]), + ClusterObjectFieldDescriptor(Label="currentLevel", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="targetLevel", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="defaultOpenLevel", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="valveFault", 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="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + openDuration: 'typing.Union[Nullable, uint]' = None + defaultOpenDuration: 'typing.Union[Nullable, uint]' = None + autoCloseTime: 'typing.Union[None, Nullable, uint]' = None + remainingDuration: 'typing.Union[Nullable, uint]' = None + currentState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + targetState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + currentLevel: 'typing.Union[None, Nullable, uint]' = None + targetLevel: 'typing.Union[None, Nullable, uint]' = None + defaultOpenLevel: 'typing.Optional[uint]' = None + valveFault: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class StatusCodeEnum(MatterIntEnum): + kFailureDueToFault = 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 = 5, + kUnknownEnumValue = 0, - class DoorStateEnum(MatterIntEnum): - kDoorOpen = 0x00 - kDoorClosed = 0x01 - kDoorJammed = 0x02 - kDoorForcedOpen = 0x03 - kDoorUnspecifiedError = 0x04 - kDoorAjar = 0x05 + class ValveStateEnum(MatterIntEnum): + kClosed = 0x00 + kOpen = 0x01 + kTransitioning = 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 = 6, + kUnknownEnumValue = 3, - class LockDataTypeEnum(MatterIntEnum): - kUnspecified = 0x00 - kProgrammingCode = 0x01 - kUserIndex = 0x02 - kWeekDaySchedule = 0x03 - kYearDaySchedule = 0x04 - kHolidaySchedule = 0x05 - kPin = 0x06 - kRfid = 0x07 - kFingerprint = 0x08 - kFingerVein = 0x09 - kFace = 0x0A - # 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 = 11, + class Bitmaps: + class Feature(IntFlag): + kTimeSync = 0x1 + kLevel = 0x2 - class LockOperationTypeEnum(MatterIntEnum): - kLock = 0x00 - kUnlock = 0x01 - kNonAccessUserEvent = 0x02 - kForcedUserEvent = 0x03 - kUnlatch = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, + class ValveFaultBitmap(IntFlag): + kGeneralFault = 0x1 + kBlocked = 0x2 + kLeaking = 0x4 + kNotConnected = 0x8 + kShortCircuit = 0x10 + kCurrentExceeded = 0x20 - class OperatingModeEnum(MatterIntEnum): - kNormal = 0x00 - kVacation = 0x01 - kPrivacy = 0x02 - kNoRemoteLockUnlock = 0x03 - kPassage = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, + class Commands: + @dataclass + class Open(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000081 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None - class OperationErrorEnum(MatterIntEnum): - kUnspecified = 0x00 - kInvalidCredential = 0x01 - kDisabledUserDenied = 0x02 - kRestricted = 0x03 - kInsufficientBattery = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="openDuration", Tag=0, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="targetLevel", Tag=1, Type=typing.Optional[uint]), + ]) - class OperationSourceEnum(MatterIntEnum): + openDuration: 'typing.Union[None, Nullable, uint]' = None + targetLevel: 'typing.Optional[uint]' = None + + @dataclass + class Close(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000081 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + class Attributes: + @dataclass + class OpenDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class DefaultOpenDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class AutoCloseTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class RemainingDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class CurrentState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) + + value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + + @dataclass + class TargetState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) + + value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + + @dataclass + class CurrentLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class TargetLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class DefaultOpenLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @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 ValveFault(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @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 + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class ValveStateChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="valveState", Tag=0, Type=ValveConfigurationAndControl.Enums.ValveStateEnum), + ClusterObjectFieldDescriptor(Label="valveLevel", Tag=1, Type=typing.Optional[uint]), + ]) + + valveState: 'ValveConfigurationAndControl.Enums.ValveStateEnum' = 0 + valveLevel: 'typing.Optional[uint]' = None + + @dataclass + class ValveFault(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="valveFault", Tag=0, Type=uint), + ]) + + valveFault: 'uint' = 0 + + +@dataclass +class ElectricalEnergyMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000091 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="accuracy", Tag=0x00000000, Type=ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct), + ClusterObjectFieldDescriptor(Label="cumulativeEnergyImported", Tag=0x00000001, Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="cumulativeEnergyExported", Tag=0x00000002, Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="periodicEnergyImported", Tag=0x00000003, Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="periodicEnergyExported", Tag=0x00000004, Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + accuracy: 'ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct' = None + cumulativeEnergyImported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + cumulativeEnergyExported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + periodicEnergyImported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + periodicEnergyExported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class MeasurementTypeEnum(MatterIntEnum): kUnspecified = 0x00 - kManual = 0x01 - kProprietaryRemote = 0x02 - kKeypad = 0x03 - kAuto = 0x04 - kButton = 0x05 - kSchedule = 0x06 - kRemote = 0x07 - kRfid = 0x08 - kBiometric = 0x09 + kVoltage = 0x01 + kActiveCurrent = 0x02 + kReactiveCurrent = 0x03 + kApparentCurrent = 0x04 + kActivePower = 0x05 + kReactivePower = 0x06 + kApparentPower = 0x07 + kRMSVoltage = 0x08 + kRMSCurrent = 0x09 + kRMSPower = 0x0A + kFrequency = 0x0B + kPowerFactor = 0x0C + kNeutralCurrent = 0x0D + kElectricalEnergy = 0x0E # 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 = 10, + kUnknownEnumValue = 15, + + class Bitmaps: + class Feature(IntFlag): + kImportedEnergy = 0x1 + kExportedEnergy = 0x2 + kCumulativeEnergy = 0x4 + kPeriodicEnergy = 0x8 + + class Structs: + @dataclass + class MeasurementAccuracyRangeStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="rangeMin", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="rangeMax", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="percentMax", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="percentMin", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="percentTypical", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="fixedMax", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="fixedMin", Tag=6, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="fixedTypical", Tag=7, Type=typing.Optional[uint]), + ]) + + rangeMin: 'int' = 0 + rangeMax: 'int' = 0 + percentMax: 'typing.Optional[uint]' = None + percentMin: 'typing.Optional[uint]' = None + percentTypical: 'typing.Optional[uint]' = None + fixedMax: 'typing.Optional[uint]' = None + fixedMin: 'typing.Optional[uint]' = None + fixedTypical: 'typing.Optional[uint]' = None + + @dataclass + class MeasurementAccuracyStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="measurementType", Tag=0, Type=ElectricalEnergyMeasurement.Enums.MeasurementTypeEnum), + ClusterObjectFieldDescriptor(Label="measured", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=2, Type=int), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=3, Type=int), + ClusterObjectFieldDescriptor(Label="accuracyRanges", Tag=4, Type=typing.List[ElectricalEnergyMeasurement.Structs.MeasurementAccuracyRangeStruct]), + ]) + + measurementType: 'ElectricalEnergyMeasurement.Enums.MeasurementTypeEnum' = 0 + measured: 'bool' = False + minMeasuredValue: 'int' = 0 + maxMeasuredValue: 'int' = 0 + accuracyRanges: 'typing.List[ElectricalEnergyMeasurement.Structs.MeasurementAccuracyRangeStruct]' = field(default_factory=lambda: []) + + @dataclass + class EnergyMeasurementStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="energy", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="startTimestamp", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endTimestamp", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startSystime", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endSystime", Tag=4, Type=typing.Optional[uint]), + ]) + + energy: 'int' = 0 + startTimestamp: 'typing.Optional[uint]' = None + endTimestamp: 'typing.Optional[uint]' = None + startSystime: 'typing.Optional[uint]' = None + endSystime: 'typing.Optional[uint]' = None + + class Attributes: + @dataclass + class Accuracy(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct) + + value: 'ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct' = field(default_factory=lambda: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct()) + + @dataclass + class CumulativeEnergyImported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) + + value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + @dataclass + class CumulativeEnergyExported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) + + value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + @dataclass + class PeriodicEnergyImported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) + + value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + @dataclass + class PeriodicEnergyExported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) + + value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class CumulativeEnergyMeasured(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="energyImported", Tag=0, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="energyExported", Tag=1, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ]) + + energyImported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + energyExported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + @dataclass + class PeriodicEnergyMeasured(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000091 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="energyImported", Tag=0, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ClusterObjectFieldDescriptor(Label="energyExported", Tag=1, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), + ]) + + energyImported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + energyExported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + + +@dataclass +class DemandResponseLoadControl(Cluster): + id: typing.ClassVar[int] = 0x00000096 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="loadControlPrograms", Tag=0x00000000, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]), + ClusterObjectFieldDescriptor(Label="numberOfLoadControlPrograms", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="events", Tag=0x00000002, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), + ClusterObjectFieldDescriptor(Label="activeEvents", Tag=0x00000003, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), + ClusterObjectFieldDescriptor(Label="numberOfEventsPerProgram", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="numberOfTransitions", Tag=0x00000005, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultRandomStart", Tag=0x00000006, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultRandomDuration", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + loadControlPrograms: 'typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]' = None + numberOfLoadControlPrograms: 'uint' = None + events: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None + activeEvents: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None + numberOfEventsPerProgram: 'uint' = None + numberOfTransitions: 'uint' = None + defaultRandomStart: 'uint' = None + defaultRandomDuration: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class CriticalityLevelEnum(MatterIntEnum): + kUnknown = 0x00 + kGreen = 0x01 + kLevel1 = 0x02 + kLevel2 = 0x03 + kLevel3 = 0x04 + kLevel4 = 0x05 + kLevel5 = 0x06 + kEmergency = 0x07 + kPlannedOutage = 0x08 + kServiceDisconnect = 0x09 + # 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 = 10, + + class HeatingSourceEnum(MatterIntEnum): + kAny = 0x00 + kElectric = 0x01 + kNonElectric = 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, + + class LoadControlEventChangeSourceEnum(MatterIntEnum): + kAutomatic = 0x00 + kUserAction = 0x01 + # 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 = 2, + + class LoadControlEventStatusEnum(MatterIntEnum): + kUnknown = 0x00 + kReceived = 0x01 + kInProgress = 0x02 + kCompleted = 0x03 + kOptedOut = 0x04 + kOptedIn = 0x05 + kCanceled = 0x06 + kSuperseded = 0x07 + kPartialOptedOut = 0x08 + kPartialOptedIn = 0x09 + kNoParticipation = 0x0A + kUnavailable = 0x0B + kFailed = 0x0C + # 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 = 13, + + class Bitmaps: + class CancelControlBitmap(IntFlag): + kRandomEnd = 0x1 + + class DeviceClassBitmap(IntFlag): + kHvac = 0x1 + kStripHeater = 0x2 + kWaterHeater = 0x4 + kPoolPump = 0x8 + kSmartAppliance = 0x10 + kIrrigationPump = 0x20 + kCommercialLoad = 0x40 + kResidentialLoad = 0x80 + kExteriorLighting = 0x100 + kInteriorLighting = 0x200 + kEv = 0x400 + kGenerationSystem = 0x800 + kSmartInverter = 0x1000 + kEvse = 0x2000 + kResu = 0x4000 + kEms = 0x8000 + kSem = 0x10000 + + class EventControlBitmap(IntFlag): + kRandomStart = 0x1 + + class EventTransitionControlBitmap(IntFlag): + kRandomDuration = 0x1 + kIgnoreOptOut = 0x2 + + class Feature(IntFlag): + kEnrollmentGroups = 0x1 + kTemperatureOffset = 0x2 + kTemperatureSetpoint = 0x4 + kLoadAdjustment = 0x8 + kDutyCycle = 0x10 + kPowerSavings = 0x20 + kHeatingSource = 0x40 + + class Structs: + @dataclass + class HeatingSourceControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="heatingSource", Tag=0, Type=DemandResponseLoadControl.Enums.HeatingSourceEnum), + ]) + + heatingSource: 'DemandResponseLoadControl.Enums.HeatingSourceEnum' = 0 + + @dataclass + class PowerSavingsControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="powerSavings", Tag=0, Type=uint), + ]) + + powerSavings: 'uint' = 0 + + @dataclass + class DutyCycleControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dutyCycle", Tag=0, Type=uint), + ]) + + dutyCycle: 'uint' = 0 + + @dataclass + class AverageLoadControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="loadAdjustment", Tag=0, Type=int), + ]) + + loadAdjustment: 'int' = 0 + + @dataclass + class TemperatureControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="coolingTempOffset", Tag=0, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="heatingtTempOffset", Tag=1, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="coolingTempSetpoint", Tag=2, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="heatingTempSetpoint", Tag=3, Type=typing.Union[None, Nullable, int]), + ]) + + coolingTempOffset: 'typing.Union[None, Nullable, uint]' = None + heatingtTempOffset: 'typing.Union[None, Nullable, uint]' = None + coolingTempSetpoint: 'typing.Union[None, Nullable, int]' = None + heatingTempSetpoint: 'typing.Union[None, Nullable, int]' = None + + @dataclass + class LoadControlEventTransitionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="duration", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="control", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="temperatureControl", Tag=2, Type=typing.Optional[DemandResponseLoadControl.Structs.TemperatureControlStruct]), + ClusterObjectFieldDescriptor(Label="averageLoadControl", Tag=3, Type=typing.Optional[DemandResponseLoadControl.Structs.AverageLoadControlStruct]), + ClusterObjectFieldDescriptor(Label="dutyCycleControl", Tag=4, Type=typing.Optional[DemandResponseLoadControl.Structs.DutyCycleControlStruct]), + ClusterObjectFieldDescriptor(Label="powerSavingsControl", Tag=5, Type=typing.Optional[DemandResponseLoadControl.Structs.PowerSavingsControlStruct]), + ClusterObjectFieldDescriptor(Label="heatingSourceControl", Tag=6, Type=typing.Optional[DemandResponseLoadControl.Structs.HeatingSourceControlStruct]), + ]) + + duration: 'uint' = 0 + control: 'uint' = 0 + temperatureControl: 'typing.Optional[DemandResponseLoadControl.Structs.TemperatureControlStruct]' = None + averageLoadControl: 'typing.Optional[DemandResponseLoadControl.Structs.AverageLoadControlStruct]' = None + dutyCycleControl: 'typing.Optional[DemandResponseLoadControl.Structs.DutyCycleControlStruct]' = None + powerSavingsControl: 'typing.Optional[DemandResponseLoadControl.Structs.PowerSavingsControlStruct]' = None + heatingSourceControl: 'typing.Optional[DemandResponseLoadControl.Structs.HeatingSourceControlStruct]' = None + + @dataclass + class LoadControlEventStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="eventID", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="programID", Tag=1, Type=typing.Union[Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="control", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="deviceClass", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="enrollmentGroup", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="criticality", Tag=5, Type=DemandResponseLoadControl.Enums.CriticalityLevelEnum), + ClusterObjectFieldDescriptor(Label="startTime", Tag=6, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=7, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventTransitionStruct]), + ]) + + eventID: 'bytes' = b"" + programID: 'typing.Union[Nullable, bytes]' = NullValue + control: 'uint' = 0 + deviceClass: 'uint' = 0 + enrollmentGroup: 'typing.Optional[uint]' = None + criticality: 'DemandResponseLoadControl.Enums.CriticalityLevelEnum' = 0 + startTime: 'typing.Union[Nullable, uint]' = NullValue + transitions: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventTransitionStruct]' = field(default_factory=lambda: []) + + @dataclass + class LoadControlProgramStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="programID", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="enrollmentGroup", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="randomStartMinutes", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="randomDurationMinutes", Tag=4, Type=typing.Union[Nullable, uint]), + ]) + + programID: 'bytes' = b"" + name: 'str' = "" + enrollmentGroup: 'typing.Union[Nullable, uint]' = NullValue + randomStartMinutes: 'typing.Union[Nullable, uint]' = NullValue + randomDurationMinutes: 'typing.Union[Nullable, uint]' = NullValue + + class Commands: + @dataclass + class RegisterLoadControlProgramRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000096 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="loadControlProgram", Tag=0, Type=DemandResponseLoadControl.Structs.LoadControlProgramStruct), + ]) + + loadControlProgram: 'DemandResponseLoadControl.Structs.LoadControlProgramStruct' = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlProgramStruct()) + + @dataclass + class UnregisterLoadControlProgramRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000096 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="loadControlProgramID", Tag=0, Type=bytes), + ]) + + loadControlProgramID: 'bytes' = b"" + + @dataclass + class AddLoadControlEventRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000096 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="event", Tag=0, Type=DemandResponseLoadControl.Structs.LoadControlEventStruct), + ]) + + event: 'DemandResponseLoadControl.Structs.LoadControlEventStruct' = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlEventStruct()) + + @dataclass + class RemoveLoadControlEventRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000096 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="eventID", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="cancelControl", Tag=1, Type=uint), + ]) + + eventID: 'bytes' = b"" + cancelControl: 'uint' = 0 + + @dataclass + class ClearLoadControlEventsRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000096 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + class Attributes: + @dataclass + class LoadControlPrograms(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]) + + value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]' = field(default_factory=lambda: []) + + @dataclass + class NumberOfLoadControlPrograms(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class Events(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]) + + value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = field(default_factory=lambda: []) + + @dataclass + class ActiveEvents(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]) + + value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = field(default_factory=lambda: []) + + @dataclass + class NumberOfEventsPerProgram(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class NumberOfTransitions(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class DefaultRandomStart(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class DefaultRandomDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class LoadControlEventStatusChange(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000096 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="eventID", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="transitionIndex", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="status", Tag=2, Type=DemandResponseLoadControl.Enums.LoadControlEventStatusEnum), + ClusterObjectFieldDescriptor(Label="criticality", Tag=3, Type=DemandResponseLoadControl.Enums.CriticalityLevelEnum), + ClusterObjectFieldDescriptor(Label="control", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="temperatureControl", Tag=5, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.TemperatureControlStruct]), + ClusterObjectFieldDescriptor(Label="averageLoadControl", Tag=6, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.AverageLoadControlStruct]), + ClusterObjectFieldDescriptor(Label="dutyCycleControl", Tag=7, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.DutyCycleControlStruct]), + ClusterObjectFieldDescriptor(Label="powerSavingsControl", Tag=8, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.PowerSavingsControlStruct]), + ClusterObjectFieldDescriptor(Label="heatingSourceControl", Tag=9, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.HeatingSourceControlStruct]), + ]) + + eventID: 'bytes' = b"" + transitionIndex: 'typing.Union[Nullable, uint]' = NullValue + status: 'DemandResponseLoadControl.Enums.LoadControlEventStatusEnum' = 0 + criticality: 'DemandResponseLoadControl.Enums.CriticalityLevelEnum' = 0 + control: 'uint' = 0 + temperatureControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.TemperatureControlStruct]' = None + averageLoadControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.AverageLoadControlStruct]' = None + dutyCycleControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.DutyCycleControlStruct]' = None + powerSavingsControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.PowerSavingsControlStruct]' = None + heatingSourceControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.HeatingSourceControlStruct]' = None + + +@dataclass +class DeviceEnergyManagement(Cluster): + id: typing.ClassVar[int] = 0x00000098 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="ESAType", Tag=0x00000000, Type=DeviceEnergyManagement.Enums.ESATypeEnum), + ClusterObjectFieldDescriptor(Label="ESACanGenerate", Tag=0x00000001, Type=bool), + ClusterObjectFieldDescriptor(Label="ESAState", Tag=0x00000002, Type=DeviceEnergyManagement.Enums.ESAStateEnum), + ClusterObjectFieldDescriptor(Label="absMinPower", Tag=0x00000003, Type=int), + ClusterObjectFieldDescriptor(Label="absMaxPower", Tag=0x00000004, Type=int), + ClusterObjectFieldDescriptor(Label="powerAdjustmentCapability", Tag=0x00000005, Type=typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]), + ClusterObjectFieldDescriptor(Label="forecast", Tag=0x00000006, Type=typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + ESAType: 'DeviceEnergyManagement.Enums.ESATypeEnum' = None + ESACanGenerate: 'bool' = None + ESAState: 'DeviceEnergyManagement.Enums.ESAStateEnum' = None + absMinPower: 'int' = None + absMaxPower: 'int' = None + powerAdjustmentCapability: 'typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]' = None + forecast: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class CauseEnum(MatterIntEnum): + kNormalCompletion = 0x00 + kOffline = 0x01 + kFault = 0x02 + kUserOptOut = 0x03 + # 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 = 4, + + class CostTypeEnum(MatterIntEnum): + kFinancial = 0x00 + kGHGEmissions = 0x01 + kComfort = 0x02 + kTemperature = 0x03 + # 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 = 4, + + class ESAStateEnum(MatterIntEnum): + kOffline = 0x00 + kOnline = 0x01 + kFault = 0x02 + kUserOptOut = 0x03 + kPowerAdjustActive = 0x04 + kPaused = 0x05 + # 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 = 6, + + class ESATypeEnum(MatterIntEnum): + kEvse = 0x00 + kSpaceHeating = 0x01 + kWaterHeating = 0x02 + kSpaceCooling = 0x03 + kSpaceHeatingCooling = 0x04 + kBatteryStorage = 0x05 + kSolarPV = 0x06 + kFridgeFreezer = 0x07 + kWashingMachine = 0x08 + kDishwasher = 0x09 + kCooking = 0x0A + kHomeWaterPump = 0x0B + kIrrigationWaterPump = 0x0C + kPoolPump = 0x0D + kOther = 0xFF + # 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 = 14, + + class Bitmaps: + class Feature(IntFlag): + kPowerAdjustment = 0x1 + kPowerForecastReporting = 0x2 + kStateForecastReporting = 0x4 + kForecastAdjustment = 0x8 + + class Structs: + @dataclass + class CostStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="costType", Tag=0, Type=DeviceEnergyManagement.Enums.CostTypeEnum), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="decimalPoints", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="currency", Tag=3, Type=typing.Optional[uint]), + ]) + + costType: 'DeviceEnergyManagement.Enums.CostTypeEnum' = 0 + value: 'int' = 0 + decimalPoints: 'uint' = 0 + currency: 'typing.Optional[uint]' = None + + @dataclass + class SlotStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="minDuration", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="maxDuration", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultDuration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="elapsedSlotTime", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="remainingSlotTime", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="slotIsPauseable", Tag=5, Type=bool), + ClusterObjectFieldDescriptor(Label="minPauseDuration", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="maxPauseDuration", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="manufacturerESAState", Tag=8, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="nominalPower", Tag=9, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minPower", Tag=10, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxPower", Tag=11, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="nominalEnergy", Tag=12, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="costs", Tag=13, Type=typing.Optional[typing.List[DeviceEnergyManagement.Structs.CostStruct]]), + ClusterObjectFieldDescriptor(Label="minPowerAdjustment", Tag=14, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxPowerAdjustment", Tag=15, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minDurationAdjustment", Tag=16, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxDurationAdjustment", Tag=17, Type=typing.Optional[uint]), + ]) + + minDuration: 'uint' = 0 + maxDuration: 'uint' = 0 + defaultDuration: 'uint' = 0 + elapsedSlotTime: 'uint' = 0 + remainingSlotTime: 'uint' = 0 + slotIsPauseable: 'bool' = False + minPauseDuration: 'uint' = 0 + maxPauseDuration: 'uint' = 0 + manufacturerESAState: 'typing.Optional[uint]' = None + nominalPower: 'typing.Optional[int]' = None + minPower: 'typing.Optional[int]' = None + maxPower: 'typing.Optional[int]' = None + nominalEnergy: 'typing.Optional[int]' = None + costs: 'typing.Optional[typing.List[DeviceEnergyManagement.Structs.CostStruct]]' = None + minPowerAdjustment: 'typing.Optional[int]' = None + maxPowerAdjustment: 'typing.Optional[int]' = None + minDurationAdjustment: 'typing.Optional[uint]' = None + maxDurationAdjustment: 'typing.Optional[uint]' = None + + @dataclass + class ForecastStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="forecastId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="activeSlotNumber", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="startTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="endTime", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="earliestStartTime", Tag=4, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="latestEndTime", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="isPauseable", Tag=6, Type=bool), + ClusterObjectFieldDescriptor(Label="slots", Tag=7, Type=typing.List[DeviceEnergyManagement.Structs.SlotStruct]), + ]) + + forecastId: 'uint' = 0 + activeSlotNumber: 'typing.Union[Nullable, uint]' = NullValue + startTime: 'uint' = 0 + endTime: 'uint' = 0 + earliestStartTime: 'typing.Union[None, Nullable, uint]' = None + latestEndTime: 'typing.Optional[uint]' = None + isPauseable: 'bool' = False + slots: 'typing.List[DeviceEnergyManagement.Structs.SlotStruct]' = field(default_factory=lambda: []) + + @dataclass + class ConstraintsStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="startTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="duration", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="nominalPower", Tag=2, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maximumEnergy", Tag=3, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="loadControl", Tag=4, Type=typing.Optional[int]), + ]) + + startTime: 'uint' = 0 + duration: 'uint' = 0 + nominalPower: 'typing.Optional[int]' = None + maximumEnergy: 'typing.Optional[int]' = None + loadControl: 'typing.Optional[int]' = None + + @dataclass + class PowerAdjustStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="minPower", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="maxPower", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="minDuration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="maxDuration", Tag=3, Type=uint), + ]) + + minPower: 'int' = 0 + maxPower: 'int' = 0 + minDuration: 'uint' = 0 + maxDuration: 'uint' = 0 + + @dataclass + class SlotAdjustmentStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="slotIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="nominalPower", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ]) + + slotIndex: 'uint' = 0 + nominalPower: 'int' = 0 + duration: 'uint' = 0 + + class Commands: + @dataclass + class PowerAdjustRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="power", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="duration", Tag=1, Type=uint), + ]) + + power: 'int' = 0 + duration: 'uint' = 0 + + @dataclass + class CancelPowerAdjustRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class StartTimeAdjustRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="requestedStartTime", Tag=0, Type=uint), + ]) + + requestedStartTime: 'uint' = 0 + + @dataclass + class PauseRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="duration", Tag=0, Type=uint), + ]) + + duration: 'uint' = 0 + + @dataclass + class ResumeRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class ModifyForecastRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="forecastId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="slotAdjustments", Tag=1, Type=typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct]), + ]) + + forecastId: 'uint' = 0 + slotAdjustments: 'typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct]' = field(default_factory=lambda: []) + + @dataclass + class RequestConstraintBasedForecast(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000098 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="constraints", Tag=0, Type=typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct]), + ]) + + constraints: 'typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct]' = field(default_factory=lambda: []) + + class Attributes: + @dataclass + class ESAType(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=DeviceEnergyManagement.Enums.ESATypeEnum) + + value: 'DeviceEnergyManagement.Enums.ESATypeEnum' = 0 + + @dataclass + class ESACanGenerate(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bool) + + value: 'bool' = False + + @dataclass + class ESAState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=DeviceEnergyManagement.Enums.ESAStateEnum) + + value: 'DeviceEnergyManagement.Enums.ESAStateEnum' = 0 + + @dataclass + class AbsMinPower(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + value: 'int' = 0 + + @dataclass + class AbsMaxPower(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + value: 'int' = 0 + + @dataclass + class PowerAdjustmentCapability(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]) + + value: 'typing.Union[None, Nullable, typing.List[DeviceEnergyManagement.Structs.PowerAdjustStruct]]' = None + + @dataclass + class Forecast(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]) + + value: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class PowerAdjustStart(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class PowerAdjustEnd(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="cause", Tag=0, Type=DeviceEnergyManagement.Enums.CauseEnum), + ClusterObjectFieldDescriptor(Label="duration", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="energyUse", Tag=2, Type=int), + ]) + + cause: 'DeviceEnergyManagement.Enums.CauseEnum' = 0 + duration: 'uint' = 0 + energyUse: 'int' = 0 + + @dataclass + class Paused(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Resumed(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000098 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + +@dataclass +class EnergyEvse(Cluster): + id: typing.ClassVar[int] = 0x00000099 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="state", Tag=0x00000000, Type=typing.Union[Nullable, EnergyEvse.Enums.StateEnum]), + ClusterObjectFieldDescriptor(Label="supplyState", Tag=0x00000001, Type=EnergyEvse.Enums.SupplyStateEnum), + ClusterObjectFieldDescriptor(Label="faultState", Tag=0x00000002, Type=EnergyEvse.Enums.FaultStateEnum), + ClusterObjectFieldDescriptor(Label="chargingEnabledUntil", Tag=0x00000003, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="dischargingEnabledUntil", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="circuitCapacity", Tag=0x00000005, Type=int), + ClusterObjectFieldDescriptor(Label="minimumChargeCurrent", Tag=0x00000006, Type=int), + ClusterObjectFieldDescriptor(Label="maximumChargeCurrent", Tag=0x00000007, Type=int), + ClusterObjectFieldDescriptor(Label="maximumDischargeCurrent", Tag=0x00000008, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="userMaximumChargeCurrent", Tag=0x00000009, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="randomizationDelayWindow", Tag=0x0000000A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfWeeklyTargets", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfDailyTargets", Tag=0x00000022, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="nextChargeStartTime", Tag=0x00000023, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextChargeTargetTime", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextChargeRequiredEnergy", Tag=0x00000025, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="nextChargeTargetSoC", Tag=0x00000026, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="approximateEVEfficiency", Tag=0x00000027, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="stateOfCharge", Tag=0x00000030, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="batteryCapacity", Tag=0x00000031, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="vehicleID", Tag=0x00000032, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0x00000040, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sessionDuration", Tag=0x00000041, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sessionEnergyCharged", Tag=0x00000042, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="sessionEnergyDischarged", Tag=0x00000043, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + state: 'typing.Union[Nullable, EnergyEvse.Enums.StateEnum]' = None + supplyState: 'EnergyEvse.Enums.SupplyStateEnum' = None + faultState: 'EnergyEvse.Enums.FaultStateEnum' = None + chargingEnabledUntil: 'typing.Union[Nullable, uint]' = None + dischargingEnabledUntil: 'typing.Union[None, Nullable, uint]' = None + circuitCapacity: 'int' = None + minimumChargeCurrent: 'int' = None + maximumChargeCurrent: 'int' = None + maximumDischargeCurrent: 'typing.Optional[int]' = None + userMaximumChargeCurrent: 'typing.Optional[int]' = None + randomizationDelayWindow: 'typing.Optional[uint]' = None + numberOfWeeklyTargets: 'typing.Optional[uint]' = None + numberOfDailyTargets: 'typing.Optional[uint]' = None + nextChargeStartTime: 'typing.Union[None, Nullable, uint]' = None + nextChargeTargetTime: 'typing.Union[None, Nullable, uint]' = None + nextChargeRequiredEnergy: 'typing.Union[None, Nullable, int]' = None + nextChargeTargetSoC: 'typing.Union[None, Nullable, uint]' = None + approximateEVEfficiency: 'typing.Union[None, Nullable, uint]' = None + stateOfCharge: 'typing.Union[None, Nullable, uint]' = None + batteryCapacity: 'typing.Union[None, Nullable, int]' = None + vehicleID: 'typing.Union[None, Nullable, str]' = None + sessionID: 'typing.Union[Nullable, uint]' = None + sessionDuration: 'typing.Union[Nullable, uint]' = None + sessionEnergyCharged: 'typing.Union[Nullable, int]' = None + sessionEnergyDischarged: 'typing.Union[None, Nullable, int]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class EnergyTransferStoppedReasonEnum(MatterIntEnum): + kEVStopped = 0x00 + kEVSEStopped = 0x01 + kOther = 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, + + class FaultStateEnum(MatterIntEnum): + kNoError = 0x00 + kMeterFailure = 0x01 + kOverVoltage = 0x02 + kUnderVoltage = 0x03 + kOverCurrent = 0x04 + kContactWetFailure = 0x05 + kContactDryFailure = 0x06 + kGroundFault = 0x07 + kPowerLoss = 0x08 + kPowerQuality = 0x09 + kPilotShortCircuit = 0x0A + kEmergencyStop = 0x0B + kEVDisconnected = 0x0C + kWrongPowerSupply = 0x0D + kLiveNeutralSwap = 0x0E + kOverTemperature = 0x0F + kOther = 0xFF + # 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 = 16, + + class StateEnum(MatterIntEnum): + kNotPluggedIn = 0x00 + kPluggedInNoDemand = 0x01 + kPluggedInDemand = 0x02 + kPluggedInCharging = 0x03 + kPluggedInDischarging = 0x04 + kSessionEnding = 0x05 + kFault = 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, + + class SupplyStateEnum(MatterIntEnum): + kDisabled = 0x00 + kChargingEnabled = 0x01 + kDischargingEnabled = 0x02 + kDisabledError = 0x03 + kDisabledDiagnostics = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class Bitmaps: + class Feature(IntFlag): + kChargingPreferences = 0x1 + kSoCReporting = 0x2 + kPlugAndCharge = 0x4 + kRfid = 0x8 + kV2x = 0x10 + + class TargetDayOfWeekBitmap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + + class Structs: + @dataclass + class ChargingTargetStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="targetTimeMinutesPastMidnight", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="targetSoC", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="addedEnergy", Tag=2, Type=typing.Optional[int]), + ]) + + targetTimeMinutesPastMidnight: 'uint' = 0 + targetSoC: 'typing.Optional[uint]' = None + addedEnergy: 'typing.Optional[int]' = None + + class Commands: + @dataclass + class GetTargetsResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]), + ]) + + dayOfWeekforSequence: 'uint' = 0 + chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: []) + + @dataclass + class Disable(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + @dataclass + class EnableCharging(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="chargingEnabledUntil", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minimumChargeCurrent", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="maximumChargeCurrent", Tag=2, Type=int), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + chargingEnabledUntil: 'typing.Union[Nullable, uint]' = NullValue + minimumChargeCurrent: 'int' = 0 + maximumChargeCurrent: 'int' = 0 + + @dataclass + class EnableDischarging(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dischargingEnabledUntil", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maximumDischargeCurrent", Tag=1, Type=int), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + dischargingEnabledUntil: 'typing.Union[Nullable, uint]' = NullValue + maximumDischargeCurrent: 'int' = 0 + + @dataclass + class StartDiagnostics(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + @dataclass + class SetTargets(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + dayOfWeekforSequence: 'uint' = 0 + chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: []) + + @dataclass + class GetTargets(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetTargetsResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + daysToReturn: 'uint' = 0 + + @dataclass + class ClearTargets(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000099 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + class Attributes: + @dataclass + class State(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, EnergyEvse.Enums.StateEnum]) + + value: 'typing.Union[Nullable, EnergyEvse.Enums.StateEnum]' = NullValue + + @dataclass + class SupplyState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=EnergyEvse.Enums.SupplyStateEnum) + + value: 'EnergyEvse.Enums.SupplyStateEnum' = 0 + + @dataclass + class FaultState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=EnergyEvse.Enums.FaultStateEnum) + + value: 'EnergyEvse.Enums.FaultStateEnum' = 0 + + @dataclass + class ChargingEnabledUntil(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class DischargingEnabledUntil(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class CircuitCapacity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + value: 'int' = 0 + + @dataclass + class MinimumChargeCurrent(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + value: 'int' = 0 + + @dataclass + class MaximumChargeCurrent(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=int) + + value: 'int' = 0 + + @dataclass + class MaximumDischargeCurrent(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class UserMaximumChargeCurrent(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None + + @dataclass + class RandomizationDelayWindow(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfWeeklyTargets(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000021 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfDailyTargets(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000022 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NextChargeStartTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000023 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class NextChargeTargetTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000024 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class NextChargeRequiredEnergy(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + + value: 'typing.Union[None, Nullable, int]' = None + + @dataclass + class NextChargeTargetSoC(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000026 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class ApproximateEVEfficiency(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000027 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class StateOfCharge(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000030 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class BatteryCapacity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000031 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + + value: 'typing.Union[None, Nullable, int]' = None + + @dataclass + class VehicleID(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000032 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, str]) + + value: 'typing.Union[None, Nullable, str]' = None + + @dataclass + class SessionID(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000040 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class SessionDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000041 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class SessionEnergyCharged(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000042 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + + value: 'typing.Union[Nullable, int]' = NullValue + + @dataclass + class SessionEnergyDischarged(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000043 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + + value: 'typing.Union[None, Nullable, int]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class EVConnected(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=uint), + ]) + + sessionID: 'uint' = 0 + + @dataclass + class EVNotDetected(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=1, Type=EnergyEvse.Enums.StateEnum), + ClusterObjectFieldDescriptor(Label="sessionDuration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sessionEnergyCharged", Tag=3, Type=int), + ClusterObjectFieldDescriptor(Label="sessionEnergyDischarged", Tag=4, Type=typing.Optional[int]), + ]) + + sessionID: 'uint' = 0 + state: 'EnergyEvse.Enums.StateEnum' = 0 + sessionDuration: 'uint' = 0 + sessionEnergyCharged: 'int' = 0 + sessionEnergyDischarged: 'typing.Optional[int]' = None + + @dataclass + class EnergyTransferStarted(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=1, Type=EnergyEvse.Enums.StateEnum), + ClusterObjectFieldDescriptor(Label="maximumCurrent", Tag=2, Type=int), + ]) + + sessionID: 'uint' = 0 + state: 'EnergyEvse.Enums.StateEnum' = 0 + maximumCurrent: 'int' = 0 + + @dataclass + class EnergyTransferStopped(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=1, Type=EnergyEvse.Enums.StateEnum), + ClusterObjectFieldDescriptor(Label="reason", Tag=2, Type=EnergyEvse.Enums.EnergyTransferStoppedReasonEnum), + ClusterObjectFieldDescriptor(Label="energyTransferred", Tag=4, Type=int), + ]) + + sessionID: 'uint' = 0 + state: 'EnergyEvse.Enums.StateEnum' = 0 + reason: 'EnergyEvse.Enums.EnergyTransferStoppedReasonEnum' = 0 + energyTransferred: 'int' = 0 + + @dataclass + class Fault(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="state", Tag=1, Type=EnergyEvse.Enums.StateEnum), + ClusterObjectFieldDescriptor(Label="faultStatePreviousState", Tag=2, Type=EnergyEvse.Enums.FaultStateEnum), + ClusterObjectFieldDescriptor(Label="faultStateCurrentState", Tag=4, Type=EnergyEvse.Enums.FaultStateEnum), + ]) + + sessionID: 'typing.Union[Nullable, uint]' = NullValue + state: 'EnergyEvse.Enums.StateEnum' = 0 + faultStatePreviousState: 'EnergyEvse.Enums.FaultStateEnum' = 0 + faultStateCurrentState: 'EnergyEvse.Enums.FaultStateEnum' = 0 + + @dataclass + class Rfid(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000099 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="uid", Tag=0, Type=bytes), + ]) + + uid: 'bytes' = b"" + + +@dataclass +class DoorLock(Cluster): + id: typing.ClassVar[int] = 0x00000101 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="lockState", Tag=0x00000000, Type=typing.Union[Nullable, DoorLock.Enums.DlLockState]), + ClusterObjectFieldDescriptor(Label="lockType", Tag=0x00000001, Type=DoorLock.Enums.DlLockType), + ClusterObjectFieldDescriptor(Label="actuatorEnabled", Tag=0x00000002, Type=bool), + ClusterObjectFieldDescriptor(Label="doorState", Tag=0x00000003, Type=typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]), + ClusterObjectFieldDescriptor(Label="doorOpenEvents", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="doorClosedEvents", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="openPeriod", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfTotalUsersSupported", Tag=0x00000011, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfPINUsersSupported", Tag=0x00000012, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfRFIDUsersSupported", Tag=0x00000013, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfWeekDaySchedulesSupportedPerUser", Tag=0x00000014, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfYearDaySchedulesSupportedPerUser", Tag=0x00000015, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfHolidaySchedulesSupported", Tag=0x00000016, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxPINCodeLength", Tag=0x00000017, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minPINCodeLength", Tag=0x00000018, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxRFIDCodeLength", Tag=0x00000019, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minRFIDCodeLength", Tag=0x0000001A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="credentialRulesSupport", Tag=0x0000001B, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfCredentialsSupportedPerUser", Tag=0x0000001C, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="language", Tag=0x00000021, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="LEDSettings", Tag=0x00000022, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="autoRelockTime", Tag=0x00000023, Type=uint), + ClusterObjectFieldDescriptor(Label="soundVolume", Tag=0x00000024, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="operatingMode", Tag=0x00000025, Type=DoorLock.Enums.OperatingModeEnum), + ClusterObjectFieldDescriptor(Label="supportedOperatingModes", Tag=0x00000026, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultConfigurationRegister", Tag=0x00000027, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="enableLocalProgramming", Tag=0x00000028, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="enableOneTouchLocking", Tag=0x00000029, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="enableInsideStatusLED", Tag=0x0000002A, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="enablePrivacyModeButton", Tag=0x0000002B, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="localProgrammingFeatures", Tag=0x0000002C, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="wrongCodeEntryLimit", Tag=0x00000030, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="userCodeTemporaryDisableTime", Tag=0x00000031, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sendPINOverTheAir", Tag=0x00000032, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="requirePINforRemoteOperation", Tag=0x00000033, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="expiringUserTimeout", Tag=0x00000035, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + lockState: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = None + lockType: 'DoorLock.Enums.DlLockType' = None + actuatorEnabled: 'bool' = None + doorState: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None + doorOpenEvents: 'typing.Optional[uint]' = None + doorClosedEvents: 'typing.Optional[uint]' = None + openPeriod: 'typing.Optional[uint]' = None + numberOfTotalUsersSupported: 'typing.Optional[uint]' = None + numberOfPINUsersSupported: 'typing.Optional[uint]' = None + numberOfRFIDUsersSupported: 'typing.Optional[uint]' = None + numberOfWeekDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None + numberOfYearDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None + numberOfHolidaySchedulesSupported: 'typing.Optional[uint]' = None + maxPINCodeLength: 'typing.Optional[uint]' = None + minPINCodeLength: 'typing.Optional[uint]' = None + maxRFIDCodeLength: 'typing.Optional[uint]' = None + minRFIDCodeLength: 'typing.Optional[uint]' = None + credentialRulesSupport: 'typing.Optional[uint]' = None + numberOfCredentialsSupportedPerUser: 'typing.Optional[uint]' = None + language: 'typing.Optional[str]' = None + LEDSettings: 'typing.Optional[uint]' = None + autoRelockTime: 'uint' = None + soundVolume: 'typing.Optional[uint]' = None + operatingMode: 'DoorLock.Enums.OperatingModeEnum' = None + supportedOperatingModes: 'uint' = None + defaultConfigurationRegister: 'typing.Optional[uint]' = None + enableLocalProgramming: 'typing.Optional[bool]' = None + enableOneTouchLocking: 'typing.Optional[bool]' = None + enableInsideStatusLED: 'typing.Optional[bool]' = None + enablePrivacyModeButton: 'typing.Optional[bool]' = None + localProgrammingFeatures: 'typing.Optional[uint]' = None + wrongCodeEntryLimit: 'typing.Optional[uint]' = None + userCodeTemporaryDisableTime: 'typing.Optional[uint]' = None + sendPINOverTheAir: 'typing.Optional[bool]' = None + requirePINforRemoteOperation: 'typing.Optional[bool]' = None + expiringUserTimeout: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class AlarmCodeEnum(MatterIntEnum): + kLockJammed = 0x00 + kLockFactoryReset = 0x01 + kLockRadioPowerCycled = 0x03 + kWrongCodeEntryLimit = 0x04 + kFrontEsceutcheonRemoved = 0x05 + kDoorForcedOpen = 0x06 + kDoorAjar = 0x07 + kForcedUser = 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 = 2, + + class CredentialRuleEnum(MatterIntEnum): + kSingle = 0x00 + kDual = 0x01 + kTri = 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, + + class CredentialTypeEnum(MatterIntEnum): + kProgrammingPIN = 0x00 + kPin = 0x01 + kRfid = 0x02 + kFingerprint = 0x03 + kFingerVein = 0x04 + kFace = 0x05 + # 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 = 6, + + class DataOperationTypeEnum(MatterIntEnum): + kAdd = 0x00 + kClear = 0x01 + kModify = 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, + + class DlLockState(MatterIntEnum): + kNotFullyLocked = 0x00 + kLocked = 0x01 + kUnlocked = 0x02 + kUnlatched = 0x03 + # 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 = 4, + + class DlLockType(MatterIntEnum): + kDeadBolt = 0x00 + kMagnetic = 0x01 + kOther = 0x02 + kMortise = 0x03 + kRim = 0x04 + kLatchBolt = 0x05 + kCylindricalLock = 0x06 + kTubularLock = 0x07 + kInterconnectedLock = 0x08 + kDeadLatch = 0x09 + kDoorFurniture = 0x0A + kEurocylinder = 0x0B + # 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 = 12, + + class DlStatus(MatterIntEnum): + kSuccess = 0x00 + kFailure = 0x01 + kDuplicate = 0x02 + kOccupied = 0x03 + kInvalidField = 0x85 + kResourceExhausted = 0x89 + kNotFound = 0x8B + # 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 = 4, + + class DoorLockOperationEventCode(MatterIntEnum): + kUnknownOrMfgSpecific = 0x00 + kLock = 0x01 + kUnlock = 0x02 + kLockInvalidPinOrId = 0x03 + kLockInvalidSchedule = 0x04 + kUnlockInvalidPinOrId = 0x05 + kUnlockInvalidSchedule = 0x06 + kOneTouchLock = 0x07 + kKeyLock = 0x08 + kKeyUnlock = 0x09 + kAutoLock = 0x0A + kScheduleLock = 0x0B + kScheduleUnlock = 0x0C + kManualLock = 0x0D + kManualUnlock = 0x0E + # 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 = 15, + + class DoorLockProgrammingEventCode(MatterIntEnum): + kUnknownOrMfgSpecific = 0x00 + kMasterCodeChanged = 0x01 + kPinAdded = 0x02 + kPinDeleted = 0x03 + kPinChanged = 0x04 + kIdAdded = 0x05 + kIdDeleted = 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, + + class DoorLockSetPinOrIdStatus(MatterIntEnum): + kSuccess = 0x00 + kGeneralFailure = 0x01 + kMemoryFull = 0x02 + kDuplicateCodeError = 0x03 + # 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 = 4, + + class DoorLockUserStatus(MatterIntEnum): + kAvailable = 0x00 + kOccupiedEnabled = 0x01 + kOccupiedDisabled = 0x03 + kNotSupported = 0xFF + # 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 = 2, + + class DoorLockUserType(MatterIntEnum): + kUnrestricted = 0x00 + kYearDayScheduleUser = 0x01 + kWeekDayScheduleUser = 0x02 + kMasterUser = 0x03 + kNonAccessUser = 0x04 + kNotSupported = 0xFF + # 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 = 5, + + class DoorStateEnum(MatterIntEnum): + kDoorOpen = 0x00 + kDoorClosed = 0x01 + kDoorJammed = 0x02 + kDoorForcedOpen = 0x03 + kDoorUnspecifiedError = 0x04 + kDoorAjar = 0x05 + # 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 = 6, + + class LockDataTypeEnum(MatterIntEnum): + kUnspecified = 0x00 + kProgrammingCode = 0x01 + kUserIndex = 0x02 + kWeekDaySchedule = 0x03 + kYearDaySchedule = 0x04 + kHolidaySchedule = 0x05 + kPin = 0x06 + kRfid = 0x07 + kFingerprint = 0x08 + kFingerVein = 0x09 + kFace = 0x0A + # 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 = 11, + + class LockOperationTypeEnum(MatterIntEnum): + kLock = 0x00 + kUnlock = 0x01 + kNonAccessUserEvent = 0x02 + kForcedUserEvent = 0x03 + kUnlatch = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class OperatingModeEnum(MatterIntEnum): + kNormal = 0x00 + kVacation = 0x01 + kPrivacy = 0x02 + kNoRemoteLockUnlock = 0x03 + kPassage = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class OperationErrorEnum(MatterIntEnum): + kUnspecified = 0x00 + kInvalidCredential = 0x01 + kDisabledUserDenied = 0x02 + kRestricted = 0x03 + kInsufficientBattery = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class OperationSourceEnum(MatterIntEnum): + kUnspecified = 0x00 + kManual = 0x01 + kProprietaryRemote = 0x02 + kKeypad = 0x03 + kAuto = 0x04 + kButton = 0x05 + kSchedule = 0x06 + kRemote = 0x07 + kRfid = 0x08 + kBiometric = 0x09 + # 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 = 10, + + class UserStatusEnum(MatterIntEnum): + kAvailable = 0x00 + kOccupiedEnabled = 0x01 + kOccupiedDisabled = 0x03 + # 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 = 2, + + class UserTypeEnum(MatterIntEnum): + kUnrestrictedUser = 0x00 + kYearDayScheduleUser = 0x01 + kWeekDayScheduleUser = 0x02 + kProgrammingUser = 0x03 + kNonAccessUser = 0x04 + kForcedUser = 0x05 + kDisposableUser = 0x06 + kExpiringUser = 0x07 + kScheduleRestrictedUser = 0x08 + kRemoteOnlyUser = 0x09 + # 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 = 10, + + class Bitmaps: + class DaysMaskMap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + + class DlCredentialRuleMask(IntFlag): + kSingle = 0x1 + kDual = 0x2 + kTri = 0x4 + + class DlCredentialRulesSupport(IntFlag): + kSingle = 0x1 + kDual = 0x2 + kTri = 0x4 + + class DlDefaultConfigurationRegister(IntFlag): + kEnableLocalProgrammingEnabled = 0x1 + kKeypadInterfaceDefaultAccessEnabled = 0x2 + kRemoteInterfaceDefaultAccessIsEnabled = 0x4 + kSoundEnabled = 0x20 + kAutoRelockTimeSet = 0x40 + kLEDSettingsSet = 0x80 + + class DlKeypadOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidPIN = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidCode = 0x20 + kUnlockInvalidSchedule = 0x40 + kNonAccessUserOpEvent = 0x80 + + class DlKeypadProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kProgrammingPINChanged = 0x2 + kPINAdded = 0x4 + kPINCleared = 0x8 + kPINChanged = 0x10 + + class DlLocalProgrammingFeatures(IntFlag): + kAddUsersCredentialsSchedulesLocally = 0x1 + kModifyUsersCredentialsSchedulesLocally = 0x2 + kClearUsersCredentialsSchedulesLocally = 0x4 + kAdjustLockSettingsLocally = 0x8 + + class DlManualOperationEventMask(IntFlag): + kUnknown = 0x1 + kThumbturnLock = 0x2 + kThumbturnUnlock = 0x4 + kOneTouchLock = 0x8 + kKeyLock = 0x10 + kKeyUnlock = 0x20 + kAutoLock = 0x40 + kScheduleLock = 0x80 + kScheduleUnlock = 0x100 + kManualLock = 0x200 + kManualUnlock = 0x400 + + class DlRFIDOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidRFID = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidRFID = 0x20 + kUnlockInvalidSchedule = 0x40 + + class DlRFIDProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kRFIDCodeAdded = 0x20 + kRFIDCodeCleared = 0x40 + + class DlRemoteOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidCode = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidCode = 0x20 + kUnlockInvalidSchedule = 0x40 + + class DlRemoteProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kProgrammingPINChanged = 0x2 + kPINAdded = 0x4 + kPINCleared = 0x8 + kPINChanged = 0x10 + kRFIDCodeAdded = 0x20 + kRFIDCodeCleared = 0x40 + + class DlSupportedOperatingModes(IntFlag): + kNormal = 0x1 + kVacation = 0x2 + kPrivacy = 0x4 + kNoRemoteLockUnlock = 0x8 + kPassage = 0x10 + + class DoorLockDayOfWeek(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + + class Feature(IntFlag): + kPinCredential = 0x1 + kRfidCredential = 0x2 + kFingerCredentials = 0x4 + kLogging = 0x8 + kWeekDayAccessSchedules = 0x10 + kDoorPositionSensor = 0x20 + kFaceCredentials = 0x40 + kCredentialsOverTheAirAccess = 0x80 + kUser = 0x100 + kNotification = 0x200 + kYearDayAccessSchedules = 0x400 + kHolidaySchedules = 0x800 + kUnbolt = 0x1000 + + class Structs: + @dataclass + class CredentialStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="credentialType", Tag=0, Type=DoorLock.Enums.CredentialTypeEnum), + ClusterObjectFieldDescriptor(Label="credentialIndex", Tag=1, Type=uint), + ]) + + credentialType: 'DoorLock.Enums.CredentialTypeEnum' = 0 + credentialIndex: 'uint' = 0 + + class Commands: + @dataclass + class LockDoor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + PINCode: 'typing.Optional[bytes]' = None + + @dataclass + class UnlockDoor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + PINCode: 'typing.Optional[bytes]' = None + + @dataclass + class UnlockWithTimeout(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeout", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="PINCode", Tag=1, Type=typing.Optional[bytes]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + timeout: 'uint' = 0 + PINCode: 'typing.Optional[bytes]' = None + + @dataclass + class SetWeekDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="daysMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="startHour", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="startMinute", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="endHour", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="endMinute", Tag=6, Type=uint), + ]) + + weekDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + daysMask: 'uint' = 0 + startHour: 'uint' = 0 + startMinute: 'uint' = 0 + endHour: 'uint' = 0 + endMinute: 'uint' = 0 + + @dataclass + class GetWeekDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000C + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetWeekDayScheduleResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ]) + + weekDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + + @dataclass + class GetWeekDayScheduleResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000C + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="status", Tag=2, Type=DoorLock.Enums.DlStatus), + ClusterObjectFieldDescriptor(Label="daysMask", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startHour", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startMinute", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endHour", Tag=6, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endMinute", Tag=7, Type=typing.Optional[uint]), + ]) + + weekDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + status: 'DoorLock.Enums.DlStatus' = 0 + daysMask: 'typing.Optional[uint]' = None + startHour: 'typing.Optional[uint]' = None + startMinute: 'typing.Optional[uint]' = None + endHour: 'typing.Optional[uint]' = None + endMinute: 'typing.Optional[uint]' = None + + @dataclass + class ClearWeekDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000D + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ]) + + weekDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + + @dataclass + class SetYearDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000E + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="localStartTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="localEndTime", Tag=3, Type=uint), + ]) + + yearDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + localStartTime: 'uint' = 0 + localEndTime: 'uint' = 0 + + @dataclass + class GetYearDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000F + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetYearDayScheduleResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ]) + + yearDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + + @dataclass + class GetYearDayScheduleResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000000F + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="status", Tag=2, Type=DoorLock.Enums.DlStatus), + ClusterObjectFieldDescriptor(Label="localStartTime", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="localEndTime", Tag=4, Type=typing.Optional[uint]), + ]) + + yearDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + status: 'DoorLock.Enums.DlStatus' = 0 + localStartTime: 'typing.Optional[uint]' = None + localEndTime: 'typing.Optional[uint]' = None + + @dataclass + class ClearYearDaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000010 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ]) + + yearDayIndex: 'uint' = 0 + userIndex: 'uint' = 0 + + @dataclass + class SetHolidaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000011 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="localStartTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="localEndTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="operatingMode", Tag=3, Type=DoorLock.Enums.OperatingModeEnum), + ]) + + holidayIndex: 'uint' = 0 + localStartTime: 'uint' = 0 + localEndTime: 'uint' = 0 + operatingMode: 'DoorLock.Enums.OperatingModeEnum' = 0 + + @dataclass + class GetHolidaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000012 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetHolidayScheduleResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ]) + + holidayIndex: 'uint' = 0 + + @dataclass + class GetHolidayScheduleResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000012 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=DoorLock.Enums.DlStatus), + ClusterObjectFieldDescriptor(Label="localStartTime", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="localEndTime", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="operatingMode", Tag=4, Type=typing.Optional[DoorLock.Enums.OperatingModeEnum]), + ]) + + holidayIndex: 'uint' = 0 + status: 'DoorLock.Enums.DlStatus' = 0 + localStartTime: 'typing.Optional[uint]' = None + localEndTime: 'typing.Optional[uint]' = None + operatingMode: 'typing.Optional[DoorLock.Enums.OperatingModeEnum]' = None + + @dataclass + class ClearHolidaySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000013 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ]) + + holidayIndex: 'uint' = 0 + + @dataclass + class SetUser(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000001A + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="operationType", Tag=0, Type=DoorLock.Enums.DataOperationTypeEnum), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="userName", Tag=2, Type=typing.Union[Nullable, str]), + ClusterObjectFieldDescriptor(Label="userUniqueID", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="userStatus", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), + ClusterObjectFieldDescriptor(Label="userType", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), + ClusterObjectFieldDescriptor(Label="credentialRule", Tag=6, Type=typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 + userIndex: 'uint' = 0 + userName: 'typing.Union[Nullable, str]' = NullValue + userUniqueID: 'typing.Union[Nullable, uint]' = NullValue + userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue + userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue + credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue + + @dataclass + class GetUser(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000001B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetUserResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), + ]) + + userIndex: 'uint' = 0 + + @dataclass + class GetUserResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000001C + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="userName", Tag=1, Type=typing.Union[Nullable, str]), + ClusterObjectFieldDescriptor(Label="userUniqueID", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="userStatus", Tag=3, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), + ClusterObjectFieldDescriptor(Label="userType", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), + ClusterObjectFieldDescriptor(Label="credentialRule", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]), + ClusterObjectFieldDescriptor(Label="credentials", Tag=6, Type=typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), + ClusterObjectFieldDescriptor(Label="creatorFabricIndex", Tag=7, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lastModifiedFabricIndex", Tag=8, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextUserIndex", Tag=9, Type=typing.Union[Nullable, uint]), + ]) + + userIndex: 'uint' = 0 + userName: 'typing.Union[Nullable, str]' = NullValue + userUniqueID: 'typing.Union[Nullable, uint]' = NullValue + userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue + userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue + credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue + credentials: 'typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = NullValue + creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue + lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue + nextUserIndex: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class ClearUser(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x0000001D + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + userIndex: 'uint' = 0 + + @dataclass + class SetCredential(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000022 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SetCredentialResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="operationType", Tag=0, Type=DoorLock.Enums.DataOperationTypeEnum), + ClusterObjectFieldDescriptor(Label="credential", Tag=1, Type=DoorLock.Structs.CredentialStruct), + ClusterObjectFieldDescriptor(Label="credentialData", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="userStatus", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), + ClusterObjectFieldDescriptor(Label="userType", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 + credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) + credentialData: 'bytes' = b"" + userIndex: 'typing.Union[Nullable, uint]' = NullValue + userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue + userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue + + @dataclass + class SetCredentialResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000023 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=DoorLock.Enums.DlStatus), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ]) + + status: 'DoorLock.Enums.DlStatus' = 0 + userIndex: 'typing.Union[Nullable, uint]' = NullValue + nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class GetCredentialStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000024 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetCredentialStatusResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="credential", Tag=0, Type=DoorLock.Structs.CredentialStruct), + ]) + + credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) + + @dataclass + class GetCredentialStatusResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000025 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="credentialExists", Tag=0, Type=bool), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="creatorFabricIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lastModifiedFabricIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=4, Type=typing.Union[Nullable, uint]), + ]) + + credentialExists: 'bool' = False + userIndex: 'typing.Union[Nullable, uint]' = NullValue + creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue + lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue + nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class ClearCredential(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000026 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="credential", Tag=0, Type=typing.Union[Nullable, DoorLock.Structs.CredentialStruct]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + credential: 'typing.Union[Nullable, DoorLock.Structs.CredentialStruct]' = NullValue + + @dataclass + class UnboltDoor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000027 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + PINCode: 'typing.Optional[bytes]' = None + + class Attributes: + @dataclass + class LockState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, DoorLock.Enums.DlLockState]) + + value: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = NullValue + + @dataclass + class LockType(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.DlLockType) + + value: 'DoorLock.Enums.DlLockType' = 0 + + @dataclass + class ActuatorEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bool) + + value: 'bool' = False + + @dataclass + class DoorState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]) + + value: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None + + @dataclass + class DoorOpenEvents(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class DoorClosedEvents(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class OpenPeriod(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfTotalUsersSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000011 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfPINUsersSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000012 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfRFIDUsersSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000013 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfWeekDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000014 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfYearDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000015 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfHolidaySchedulesSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000016 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class MaxPINCodeLength(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000017 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class MinPINCodeLength(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000018 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class MaxRFIDCodeLength(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000019 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class MinRFIDCodeLength(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class CredentialRulesSupport(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001B + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfCredentialsSupportedPerUser(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class Language(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000021 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None + + @dataclass + class LEDSettings(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000022 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AutoRelockTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000023 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class SoundVolume(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000024 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class OperatingMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.OperatingModeEnum) + + value: 'DoorLock.Enums.OperatingModeEnum' = 0 + + @dataclass + class SupportedOperatingModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000026 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class DefaultConfigurationRegister(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000027 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class EnableLocalProgramming(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000028 - class UserStatusEnum(MatterIntEnum): - kAvailable = 0x00 - kOccupiedEnabled = 0x01 - kOccupiedDisabled = 0x03 - # 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 = 2, + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - class UserTypeEnum(MatterIntEnum): - kUnrestrictedUser = 0x00 - kYearDayScheduleUser = 0x01 - kWeekDayScheduleUser = 0x02 - kProgrammingUser = 0x03 - kNonAccessUser = 0x04 - kForcedUser = 0x05 - kDisposableUser = 0x06 - kExpiringUser = 0x07 - kScheduleRestrictedUser = 0x08 - kRemoteOnlyUser = 0x09 - # 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 = 10, + value: 'typing.Optional[bool]' = None - class Bitmaps: - class DaysMaskMap(IntFlag): - kSunday = 0x1 - kMonday = 0x2 - kTuesday = 0x4 - kWednesday = 0x8 - kThursday = 0x10 - kFriday = 0x20 - kSaturday = 0x40 + @dataclass + class EnableOneTouchLocking(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 - class DlCredentialRuleMask(IntFlag): - kSingle = 0x1 - kDual = 0x2 - kTri = 0x4 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000029 - class DlCredentialRulesSupport(IntFlag): - kSingle = 0x1 - kDual = 0x2 - kTri = 0x4 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - class DlDefaultConfigurationRegister(IntFlag): - kEnableLocalProgrammingEnabled = 0x1 - kKeypadInterfaceDefaultAccessEnabled = 0x2 - kRemoteInterfaceDefaultAccessIsEnabled = 0x4 - kSoundEnabled = 0x20 - kAutoRelockTimeSet = 0x40 - kLEDSettingsSet = 0x80 + value: 'typing.Optional[bool]' = None - class DlKeypadOperationEventMask(IntFlag): - kUnknown = 0x1 - kLock = 0x2 - kUnlock = 0x4 - kLockInvalidPIN = 0x8 - kLockInvalidSchedule = 0x10 - kUnlockInvalidCode = 0x20 - kUnlockInvalidSchedule = 0x40 - kNonAccessUserOpEvent = 0x80 + @dataclass + class EnableInsideStatusLED(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 - class DlKeypadProgrammingEventMask(IntFlag): - kUnknown = 0x1 - kProgrammingPINChanged = 0x2 - kPINAdded = 0x4 - kPINCleared = 0x8 - kPINChanged = 0x10 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002A - class DlLocalProgrammingFeatures(IntFlag): - kAddUsersCredentialsSchedulesLocally = 0x1 - kModifyUsersCredentialsSchedulesLocally = 0x2 - kClearUsersCredentialsSchedulesLocally = 0x4 - kAdjustLockSettingsLocally = 0x8 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - class DlManualOperationEventMask(IntFlag): - kUnknown = 0x1 - kThumbturnLock = 0x2 - kThumbturnUnlock = 0x4 - kOneTouchLock = 0x8 - kKeyLock = 0x10 - kKeyUnlock = 0x20 - kAutoLock = 0x40 - kScheduleLock = 0x80 - kScheduleUnlock = 0x100 - kManualLock = 0x200 - kManualUnlock = 0x400 + value: 'typing.Optional[bool]' = None - class DlRFIDOperationEventMask(IntFlag): - kUnknown = 0x1 - kLock = 0x2 - kUnlock = 0x4 - kLockInvalidRFID = 0x8 - kLockInvalidSchedule = 0x10 - kUnlockInvalidRFID = 0x20 - kUnlockInvalidSchedule = 0x40 + @dataclass + class EnablePrivacyModeButton(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 - class DlRFIDProgrammingEventMask(IntFlag): - kUnknown = 0x1 - kRFIDCodeAdded = 0x20 - kRFIDCodeCleared = 0x40 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002B - class DlRemoteOperationEventMask(IntFlag): - kUnknown = 0x1 - kLock = 0x2 - kUnlock = 0x4 - kLockInvalidCode = 0x8 - kLockInvalidSchedule = 0x10 - kUnlockInvalidCode = 0x20 - kUnlockInvalidSchedule = 0x40 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - class DlRemoteProgrammingEventMask(IntFlag): - kUnknown = 0x1 - kProgrammingPINChanged = 0x2 - kPINAdded = 0x4 - kPINCleared = 0x8 - kPINChanged = 0x10 - kRFIDCodeAdded = 0x20 - kRFIDCodeCleared = 0x40 + value: 'typing.Optional[bool]' = None - class DlSupportedOperatingModes(IntFlag): - kNormal = 0x1 - kVacation = 0x2 - kPrivacy = 0x4 - kNoRemoteLockUnlock = 0x8 - kPassage = 0x10 + @dataclass + class LocalProgrammingFeatures(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 - class DoorLockDayOfWeek(IntFlag): - kSunday = 0x1 - kMonday = 0x2 - kTuesday = 0x4 - kWednesday = 0x8 - kThursday = 0x10 - kFriday = 0x20 - kSaturday = 0x40 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002C - class Feature(IntFlag): - kPinCredential = 0x1 - kRfidCredential = 0x2 - kFingerCredentials = 0x4 - kLogging = 0x8 - kWeekDayAccessSchedules = 0x10 - kDoorPositionSensor = 0x20 - kFaceCredentials = 0x40 - kCredentialsOverTheAirAccess = 0x80 - kUser = 0x100 - kNotification = 0x200 - kYearDayAccessSchedules = 0x400 - kHolidaySchedules = 0x800 - kUnbolt = 0x1000 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None - class Structs: @dataclass - class CredentialStruct(ClusterObject): + class WrongCodeEntryLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="credentialType", Tag=0, Type=DoorLock.Enums.CredentialTypeEnum), - ClusterObjectFieldDescriptor(Label="credentialIndex", Tag=1, Type=uint), - ]) + def cluster_id(cls) -> int: + return 0x00000101 - credentialType: 'DoorLock.Enums.CredentialTypeEnum' = 0 - credentialIndex: 'uint' = 0 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000030 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None - class Commands: @dataclass - class LockDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class UserCodeTemporaryDisableTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), - ]) + def attribute_id(cls) -> int: + return 0x00000031 @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - PINCode: 'typing.Optional[bytes]' = None + value: 'typing.Optional[uint]' = None @dataclass - class UnlockDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class SendPINOverTheAir(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), - ]) + def attribute_id(cls) -> int: + return 0x00000032 @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - PINCode: 'typing.Optional[bytes]' = None + value: 'typing.Optional[bool]' = None @dataclass - class UnlockWithTimeout(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class RequirePINforRemoteOperation(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="timeout", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="PINCode", Tag=1, Type=typing.Optional[bytes]), - ]) + def attribute_id(cls) -> int: + return 0x00000033 @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - timeout: 'uint' = 0 - PINCode: 'typing.Optional[bytes]' = None + value: 'typing.Optional[bool]' = None @dataclass - class SetWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000B - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ExpiringUserTimeout(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="daysMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="startHour", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="startMinute", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="endHour", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="endMinute", Tag=6, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000035 - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - daysMask: 'uint' = 0 - startHour: 'uint' = 0 - startMinute: 'uint' = 0 - endHour: 'uint' = 0 - endMinute: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class GetWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000C - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetWeekDayScheduleResponse' + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000FFF8 - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class GetWeekDayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000C - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=2, Type=DoorLock.Enums.DlStatus), - ClusterObjectFieldDescriptor(Label="daysMask", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startHour", Tag=4, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startMinute", Tag=5, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="endHour", Tag=6, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="endMinute", Tag=7, Type=typing.Optional[uint]), - ]) + def attribute_id(cls) -> int: + return 0x0000FFF9 - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - daysMask: 'typing.Optional[uint]' = None - startHour: 'typing.Optional[uint]' = None - startMinute: 'typing.Optional[uint]' = None - endHour: 'typing.Optional[uint]' = None - endMinute: 'typing.Optional[uint]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ClearWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000D - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="weekDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000FFFA - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class SetYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000E - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="localStartTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="localEndTime", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000FFFB - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - localStartTime: 'uint' = 0 - localEndTime: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class GetYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000F - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetYearDayScheduleResponse' + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000FFFC - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class GetYearDayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000000F - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=2, Type=DoorLock.Enums.DlStatus), - ClusterObjectFieldDescriptor(Label="localStartTime", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="localEndTime", Tag=4, Type=typing.Optional[uint]), - ]) + def attribute_id(cls) -> int: + return 0x0000FFFD - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - localStartTime: 'typing.Optional[uint]' = None - localEndTime: 'typing.Optional[uint]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + value: 'uint' = 0 + + class Events: @dataclass - class ClearYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000010 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class DoorLockAlarm(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="yearDayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="alarmCode", Tag=0, Type=DoorLock.Enums.AlarmCodeEnum), ]) - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + alarmCode: 'DoorLock.Enums.AlarmCodeEnum' = 0 @dataclass - class SetHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000011 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class DoorStateChange(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="localStartTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="localEndTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="operatingMode", Tag=3, Type=DoorLock.Enums.OperatingModeEnum), + ClusterObjectFieldDescriptor(Label="doorState", Tag=0, Type=DoorLock.Enums.DoorStateEnum), ]) - holidayIndex: 'uint' = 0 - localStartTime: 'uint' = 0 - localEndTime: 'uint' = 0 - operatingMode: 'DoorLock.Enums.OperatingModeEnum' = 0 + doorState: 'DoorLock.Enums.DoorStateEnum' = 0 @dataclass - class GetHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000012 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetHolidayScheduleResponse' + class LockOperation(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000002 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="lockOperationType", Tag=0, Type=DoorLock.Enums.LockOperationTypeEnum), + ClusterObjectFieldDescriptor(Label="operationSource", Tag=1, Type=DoorLock.Enums.OperationSourceEnum), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sourceNode", Tag=4, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="credentials", Tag=5, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), ]) - holidayIndex: 'uint' = 0 + lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 + operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 + userIndex: 'typing.Union[Nullable, uint]' = NullValue + fabricIndex: 'typing.Union[Nullable, uint]' = NullValue + sourceNode: 'typing.Union[Nullable, uint]' = NullValue + credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None @dataclass - class GetHolidayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000012 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class LockOperationError(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000003 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=DoorLock.Enums.DlStatus), - ClusterObjectFieldDescriptor(Label="localStartTime", Tag=2, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="localEndTime", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="operatingMode", Tag=4, Type=typing.Optional[DoorLock.Enums.OperatingModeEnum]), + ClusterObjectFieldDescriptor(Label="lockOperationType", Tag=0, Type=DoorLock.Enums.LockOperationTypeEnum), + ClusterObjectFieldDescriptor(Label="operationSource", Tag=1, Type=DoorLock.Enums.OperationSourceEnum), + ClusterObjectFieldDescriptor(Label="operationError", Tag=2, Type=DoorLock.Enums.OperationErrorEnum), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=4, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sourceNode", Tag=5, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="credentials", Tag=6, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), ]) - holidayIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - localStartTime: 'typing.Optional[uint]' = None - localEndTime: 'typing.Optional[uint]' = None - operatingMode: 'typing.Optional[DoorLock.Enums.OperatingModeEnum]' = None + lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 + operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 + operationError: 'DoorLock.Enums.OperationErrorEnum' = 0 + userIndex: 'typing.Union[Nullable, uint]' = NullValue + fabricIndex: 'typing.Union[Nullable, uint]' = NullValue + sourceNode: 'typing.Union[Nullable, uint]' = NullValue + credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None @dataclass - class ClearHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000013 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class LockUserChange(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000004 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="lockDataType", Tag=0, Type=DoorLock.Enums.LockDataTypeEnum), + ClusterObjectFieldDescriptor(Label="dataOperationType", Tag=1, Type=DoorLock.Enums.DataOperationTypeEnum), + ClusterObjectFieldDescriptor(Label="operationSource", Tag=2, Type=DoorLock.Enums.OperationSourceEnum), + ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=4, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sourceNode", Tag=5, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="dataIndex", Tag=6, Type=typing.Union[Nullable, uint]), ]) - holidayIndex: 'uint' = 0 + lockDataType: 'DoorLock.Enums.LockDataTypeEnum' = 0 + dataOperationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 + operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 + userIndex: 'typing.Union[Nullable, uint]' = NullValue + fabricIndex: 'typing.Union[Nullable, uint]' = NullValue + sourceNode: 'typing.Union[Nullable, uint]' = NullValue + dataIndex: 'typing.Union[Nullable, uint]' = NullValue + + +@dataclass +class WindowCovering(Cluster): + id: typing.ClassVar[int] = 0x00000102 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="type", Tag=0x00000000, Type=WindowCovering.Enums.Type), + ClusterObjectFieldDescriptor(Label="physicalClosedLimitLift", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="physicalClosedLimitTilt", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentPositionLift", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTilt", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="numberOfActuationsLift", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfActuationsTilt", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="configStatus", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="currentPositionLiftPercentage", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTiltPercentage", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="operationalStatus", Tag=0x0000000A, Type=uint), + ClusterObjectFieldDescriptor(Label="targetPositionLiftPercent100ths", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="targetPositionTiltPercent100ths", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="endProductType", Tag=0x0000000D, Type=WindowCovering.Enums.EndProductType), + ClusterObjectFieldDescriptor(Label="currentPositionLiftPercent100ths", Tag=0x0000000E, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentPositionTiltPercent100ths", Tag=0x0000000F, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="installedOpenLimitLift", Tag=0x00000010, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedClosedLimitLift", Tag=0x00000011, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedOpenLimitTilt", Tag=0x00000012, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="installedClosedLimitTilt", Tag=0x00000013, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="mode", Tag=0x00000017, Type=uint), + ClusterObjectFieldDescriptor(Label="safetyStatus", Tag=0x0000001A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + type: 'WindowCovering.Enums.Type' = None + physicalClosedLimitLift: 'typing.Optional[uint]' = None + physicalClosedLimitTilt: 'typing.Optional[uint]' = None + currentPositionLift: 'typing.Union[None, Nullable, uint]' = None + currentPositionTilt: 'typing.Union[None, Nullable, uint]' = None + numberOfActuationsLift: 'typing.Optional[uint]' = None + numberOfActuationsTilt: 'typing.Optional[uint]' = None + configStatus: 'uint' = None + currentPositionLiftPercentage: 'typing.Union[None, Nullable, uint]' = None + currentPositionTiltPercentage: 'typing.Union[None, Nullable, uint]' = None + operationalStatus: 'uint' = None + targetPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None + targetPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None + endProductType: 'WindowCovering.Enums.EndProductType' = None + currentPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None + currentPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None + installedOpenLimitLift: 'typing.Optional[uint]' = None + installedClosedLimitLift: 'typing.Optional[uint]' = None + installedOpenLimitTilt: 'typing.Optional[uint]' = None + installedClosedLimitTilt: 'typing.Optional[uint]' = None + mode: 'uint' = None + safetyStatus: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class EndProductType(MatterIntEnum): + kRollerShade = 0x00 + kRomanShade = 0x01 + kBalloonShade = 0x02 + kWovenWood = 0x03 + kPleatedShade = 0x04 + kCellularShade = 0x05 + kLayeredShade = 0x06 + kLayeredShade2D = 0x07 + kSheerShade = 0x08 + kTiltOnlyInteriorBlind = 0x09 + kInteriorBlind = 0x0A + kVerticalBlindStripCurtain = 0x0B + kInteriorVenetianBlind = 0x0C + kExteriorVenetianBlind = 0x0D + kLateralLeftCurtain = 0x0E + kLateralRightCurtain = 0x0F + kCentralCurtain = 0x10 + kRollerShutter = 0x11 + kExteriorVerticalScreen = 0x12 + kAwningTerracePatio = 0x13 + kAwningVerticalScreen = 0x14 + kTiltOnlyPergola = 0x15 + kSwingingShutter = 0x16 + kSlidingShutter = 0x17 + kUnknown = 0xFF + # 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 = 24, + + class Type(MatterIntEnum): + kRollerShade = 0x00 + kRollerShade2Motor = 0x01 + kRollerShadeExterior = 0x02 + kRollerShadeExterior2Motor = 0x03 + kDrapery = 0x04 + kAwning = 0x05 + kShutter = 0x06 + kTiltBlindTiltOnly = 0x07 + kTiltBlindLiftAndTilt = 0x08 + kProjectorScreen = 0x09 + kUnknown = 0xFF + # 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 = 10, + + class Bitmaps: + class ConfigStatus(IntFlag): + kOperational = 0x1 + kOnlineReserved = 0x2 + kLiftMovementReversed = 0x4 + kLiftPositionAware = 0x8 + kTiltPositionAware = 0x10 + kLiftEncoderControlled = 0x20 + kTiltEncoderControlled = 0x40 + + class Feature(IntFlag): + kLift = 0x1 + kTilt = 0x2 + kPositionAwareLift = 0x4 + kAbsolutePosition = 0x8 + kPositionAwareTilt = 0x10 + + class Mode(IntFlag): + kMotorDirectionReversed = 0x1 + kCalibrationMode = 0x2 + kMaintenanceMode = 0x4 + kLedFeedback = 0x8 + + class OperationalStatus(IntFlag): + kGlobal = 0x3 + kLift = 0xC + kTilt = 0x30 + + class SafetyStatus(IntFlag): + kRemoteLockout = 0x1 + kTamperDetection = 0x2 + kFailedCommunication = 0x4 + kPositionFailure = 0x8 + kThermalProtection = 0x10 + kObstacleDetected = 0x20 + kPower = 0x40 + kStopInput = 0x80 + kMotorJammed = 0x100 + kHardwareFailure = 0x200 + kManualOperation = 0x400 + kProtection = 0x800 + class Commands: @dataclass - class SetUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000001A + class UpOrOpen(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21548,81 +26829,38 @@ class SetUser(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="operationType", Tag=0, Type=DoorLock.Enums.DataOperationTypeEnum), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="userName", Tag=2, Type=typing.Union[Nullable, str]), - ClusterObjectFieldDescriptor(Label="userUniqueID", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="userStatus", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), - ClusterObjectFieldDescriptor(Label="userType", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), - ClusterObjectFieldDescriptor(Label="credentialRule", Tag=6, Type=typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]), ]) - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True - - operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - userIndex: 'uint' = 0 - userName: 'typing.Union[Nullable, str]' = NullValue - userUniqueID: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue - credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue - @dataclass - class GetUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000001B + class DownOrClose(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetUserResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), ]) - userIndex: 'uint' = 0 - @dataclass - class GetUserResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000001C - is_client: typing.ClassVar[bool] = False + class StopMotion(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="userName", Tag=1, Type=typing.Union[Nullable, str]), - ClusterObjectFieldDescriptor(Label="userUniqueID", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="userStatus", Tag=3, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), - ClusterObjectFieldDescriptor(Label="userType", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), - ClusterObjectFieldDescriptor(Label="credentialRule", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]), - ClusterObjectFieldDescriptor(Label="credentials", Tag=6, Type=typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), - ClusterObjectFieldDescriptor(Label="creatorFabricIndex", Tag=7, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lastModifiedFabricIndex", Tag=8, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="nextUserIndex", Tag=9, Type=typing.Union[Nullable, uint]), ]) - userIndex: 'uint' = 0 - userName: 'typing.Union[Nullable, str]' = NullValue - userUniqueID: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue - credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue - credentials: 'typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = NullValue - creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - nextUserIndex: 'typing.Union[Nullable, uint]' = NullValue - @dataclass - class ClearUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x0000001D + class GoToLiftValue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21630,363 +26868,325 @@ class ClearUser(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="liftValue", Tag=0, Type=uint), ]) - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True - - userIndex: 'uint' = 0 + liftValue: 'uint' = 0 @dataclass - class SetCredential(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000022 + class GoToLiftPercentage(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'SetCredentialResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="operationType", Tag=0, Type=DoorLock.Enums.DataOperationTypeEnum), - ClusterObjectFieldDescriptor(Label="credential", Tag=1, Type=DoorLock.Structs.CredentialStruct), - ClusterObjectFieldDescriptor(Label="credentialData", Tag=2, Type=bytes), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="userStatus", Tag=4, Type=typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]), - ClusterObjectFieldDescriptor(Label="userType", Tag=5, Type=typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]), + ClusterObjectFieldDescriptor(Label="liftPercent100thsValue", Tag=0, Type=uint), ]) - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True - - operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) - credentialData: 'bytes' = b"" - userIndex: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue + liftPercent100thsValue: 'uint' = 0 @dataclass - class SetCredentialResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000023 - is_client: typing.ClassVar[bool] = False + class GoToTiltValue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=DoorLock.Enums.DlStatus), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="tiltValue", Tag=0, Type=uint), ]) - status: 'DoorLock.Enums.DlStatus' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue + tiltValue: 'uint' = 0 @dataclass - class GetCredentialStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000024 + class GoToTiltPercentage(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000102 + command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetCredentialStatusResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="credential", Tag=0, Type=DoorLock.Structs.CredentialStruct), + ClusterObjectFieldDescriptor(Label="tiltPercent100thsValue", Tag=0, Type=uint), ]) - credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) + tiltPercent100thsValue: 'uint' = 0 + class Attributes: @dataclass - class GetCredentialStatusResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000025 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class Type(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000102 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="credentialExists", Tag=0, Type=bool), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="creatorFabricIndex", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lastModifiedFabricIndex", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=4, Type=typing.Union[Nullable, uint]), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - credentialExists: 'bool' = False - userIndex: 'typing.Union[Nullable, uint]' = NullValue - creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.Type) + + value: 'WindowCovering.Enums.Type' = 0 @dataclass - class ClearCredential(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000026 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class PhysicalClosedLimitLift(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000102 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="credential", Tag=0, Type=typing.Union[Nullable, DoorLock.Structs.CredentialStruct]), - ]) + def attribute_id(cls) -> int: + return 0x00000001 @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - credential: 'typing.Union[Nullable, DoorLock.Structs.CredentialStruct]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class UnboltDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000101 - command_id: typing.ClassVar[int] = 0x00000027 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class PhysicalClosedLimitTilt(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000102 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[bytes]), - ]) + def attribute_id(cls) -> int: + return 0x00000002 @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - PINCode: 'typing.Optional[bytes]' = None + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class LockState(ClusterAttributeDescriptor): + class CurrentPositionLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, DoorLock.Enums.DlLockState]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = NullValue + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class LockType(ClusterAttributeDescriptor): + class CurrentPositionTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.DlLockType) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'DoorLock.Enums.DlLockType' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class ActuatorEnabled(ClusterAttributeDescriptor): + class NumberOfActuationsLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'bool' = False + value: 'typing.Optional[uint]' = None @dataclass - class DoorState(ClusterAttributeDescriptor): + class NumberOfActuationsTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None + value: 'typing.Optional[uint]' = None @dataclass - class DoorOpenEvents(ClusterAttributeDescriptor): + class ConfigStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class DoorClosedEvents(ClusterAttributeDescriptor): + class CurrentPositionLiftPercentage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class OpenPeriod(ClusterAttributeDescriptor): + class CurrentPositionTiltPercentage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class NumberOfTotalUsersSupported(ClusterAttributeDescriptor): + class OperationalStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class NumberOfPINUsersSupported(ClusterAttributeDescriptor): + class TargetPositionLiftPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x0000000B @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class NumberOfRFIDUsersSupported(ClusterAttributeDescriptor): + class TargetPositionTiltPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x0000000C @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class NumberOfWeekDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): + class EndProductType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x0000000D @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.EndProductType) - value: 'typing.Optional[uint]' = None + value: 'WindowCovering.Enums.EndProductType' = 0 @dataclass - class NumberOfYearDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): + class CurrentPositionLiftPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x0000000E @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class NumberOfHolidaySchedulesSupported(ClusterAttributeDescriptor): + class CurrentPositionTiltPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x0000000F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class MaxPINCodeLength(ClusterAttributeDescriptor): + class InstalledOpenLimitLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000017 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -21995,14 +27195,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class MinPINCodeLength(ClusterAttributeDescriptor): + class InstalledClosedLimitLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000018 + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22011,14 +27211,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class MaxRFIDCodeLength(ClusterAttributeDescriptor): + class InstalledOpenLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000019 + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22027,14 +27227,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class MinRFIDCodeLength(ClusterAttributeDescriptor): + class InstalledClosedLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001A + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22043,30 +27243,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class CredentialRulesSupport(ClusterAttributeDescriptor): + class Mode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001B + return 0x00000017 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class NumberOfCredentialsSupportedPerUser(ClusterAttributeDescriptor): + class SafetyStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001C + return 0x0000001A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22075,94 +27275,94 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class Language(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000021 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[str]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class LEDSettings(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000022 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class AutoRelockTime(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000023 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'uint' = 0 + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class SoundVolume(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000024 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OperatingMode(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000025 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.OperatingModeEnum) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'DoorLock.Enums.OperatingModeEnum' = 0 + value: 'uint' = 0 @dataclass - class SupportedOperatingModes(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000026 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22170,95 +27370,164 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + +@dataclass +class BarrierControl(Cluster): + id: typing.ClassVar[int] = 0x00000103 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="barrierMovingState", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="barrierSafetyStatus", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="barrierCapabilities", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="barrierOpenEvents", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierCloseEvents", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierCommandOpenEvents", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierCommandCloseEvents", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierOpenPeriod", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierClosePeriod", Tag=0x00000009, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="barrierPosition", Tag=0x0000000A, Type=uint), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + barrierMovingState: 'uint' = None + barrierSafetyStatus: 'uint' = None + barrierCapabilities: 'uint' = None + barrierOpenEvents: 'typing.Optional[uint]' = None + barrierCloseEvents: 'typing.Optional[uint]' = None + barrierCommandOpenEvents: 'typing.Optional[uint]' = None + barrierCommandCloseEvents: 'typing.Optional[uint]' = None + barrierOpenPeriod: 'typing.Optional[uint]' = None + barrierClosePeriod: 'typing.Optional[uint]' = None + barrierPosition: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class BarrierControlCapabilities(IntFlag): + kPartialBarrier = 0x1 + + class BarrierControlSafetyStatus(IntFlag): + kRemoteLockout = 0x1 + kTemperDetected = 0x2 + kFailedCommunication = 0x4 + kPositionFailure = 0x8 + + class Commands: @dataclass - class DefaultConfigurationRegister(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 + class BarrierControlGoToPercent(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000103 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000027 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="percentOpen", Tag=0, Type=uint), + ]) - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + percentOpen: 'uint' = 0 - value: 'typing.Optional[uint]' = None + @dataclass + class BarrierControlStop(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000103 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + class Attributes: @dataclass - class EnableLocalProgramming(ClusterAttributeDescriptor): + class BarrierMovingState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000028 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[bool]' = None + value: 'uint' = 0 @dataclass - class EnableOneTouchLocking(ClusterAttributeDescriptor): + class BarrierSafetyStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000029 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[bool]' = None + value: 'uint' = 0 @dataclass - class EnableInsideStatusLED(ClusterAttributeDescriptor): + class BarrierCapabilities(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000002A + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[bool]' = None + value: 'uint' = 0 @dataclass - class EnablePrivacyModeButton(ClusterAttributeDescriptor): + class BarrierOpenEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000002B + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.Optional[uint]' = None @dataclass - class LocalProgrammingFeatures(ClusterAttributeDescriptor): + class BarrierCloseEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000002C + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22267,14 +27536,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class WrongCodeEntryLimit(ClusterAttributeDescriptor): + class BarrierCommandOpenEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000030 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22283,14 +27552,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class UserCodeTemporaryDisableTime(ClusterAttributeDescriptor): + class BarrierCommandCloseEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000031 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -22299,58 +27568,58 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class SendPINOverTheAir(ClusterAttributeDescriptor): + class BarrierOpenPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000032 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.Optional[uint]' = None @dataclass - class RequirePINforRemoteOperation(ClusterAttributeDescriptor): + class BarrierClosePeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000033 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.Optional[uint]' = None @dataclass - class ExpiringUserTimeout(ClusterAttributeDescriptor): + class BarrierPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000035 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22366,7 +27635,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22382,7 +27651,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22398,7 +27667,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22414,7 +27683,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000101 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22429,180 +27698,51 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFD - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - class Events: - @dataclass - class DoorLockAlarm(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="alarmCode", Tag=0, Type=DoorLock.Enums.AlarmCodeEnum), - ]) - - alarmCode: 'DoorLock.Enums.AlarmCodeEnum' = 0 - - @dataclass - class DoorStateChange(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="doorState", Tag=0, Type=DoorLock.Enums.DoorStateEnum), - ]) - - doorState: 'DoorLock.Enums.DoorStateEnum' = 0 - - @dataclass - class LockOperation(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="lockOperationType", Tag=0, Type=DoorLock.Enums.LockOperationTypeEnum), - ClusterObjectFieldDescriptor(Label="operationSource", Tag=1, Type=DoorLock.Enums.OperationSourceEnum), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sourceNode", Tag=4, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="credentials", Tag=5, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), - ]) - - lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None - - @dataclass - class LockOperationError(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="lockOperationType", Tag=0, Type=DoorLock.Enums.LockOperationTypeEnum), - ClusterObjectFieldDescriptor(Label="operationSource", Tag=1, Type=DoorLock.Enums.OperationSourceEnum), - ClusterObjectFieldDescriptor(Label="operationError", Tag=2, Type=DoorLock.Enums.OperationErrorEnum), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=4, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sourceNode", Tag=5, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="credentials", Tag=6, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), - ]) - - lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - operationError: 'DoorLock.Enums.OperationErrorEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None - - @dataclass - class LockUserChange(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="lockDataType", Tag=0, Type=DoorLock.Enums.LockDataTypeEnum), - ClusterObjectFieldDescriptor(Label="dataOperationType", Tag=1, Type=DoorLock.Enums.DataOperationTypeEnum), - ClusterObjectFieldDescriptor(Label="operationSource", Tag=2, Type=DoorLock.Enums.OperationSourceEnum), - ClusterObjectFieldDescriptor(Label="userIndex", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=4, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sourceNode", Tag=5, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="dataIndex", Tag=6, Type=typing.Union[Nullable, uint]), - ]) + def cluster_id(cls) -> int: + return 0x00000103 - lockDataType: 'DoorLock.Enums.LockDataTypeEnum' = 0 - dataOperationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - dataIndex: 'typing.Union[Nullable, uint]' = NullValue + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass -class WindowCovering(Cluster): - id: typing.ClassVar[int] = 0x00000102 +class PumpConfigurationAndControl(Cluster): + id: typing.ClassVar[int] = 0x00000200 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="type", Tag=0x00000000, Type=WindowCovering.Enums.Type), - ClusterObjectFieldDescriptor(Label="physicalClosedLimitLift", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="physicalClosedLimitTilt", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentPositionLift", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="currentPositionTilt", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="numberOfActuationsLift", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfActuationsTilt", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="configStatus", Tag=0x00000007, Type=uint), - ClusterObjectFieldDescriptor(Label="currentPositionLiftPercentage", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="currentPositionTiltPercentage", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationalStatus", Tag=0x0000000A, Type=uint), - ClusterObjectFieldDescriptor(Label="targetPositionLiftPercent100ths", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="targetPositionTiltPercent100ths", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="endProductType", Tag=0x0000000D, Type=WindowCovering.Enums.EndProductType), - ClusterObjectFieldDescriptor(Label="currentPositionLiftPercent100ths", Tag=0x0000000E, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="currentPositionTiltPercent100ths", Tag=0x0000000F, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="installedOpenLimitLift", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="installedClosedLimitLift", Tag=0x00000011, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="installedOpenLimitTilt", Tag=0x00000012, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="installedClosedLimitTilt", Tag=0x00000013, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="mode", Tag=0x00000017, Type=uint), - ClusterObjectFieldDescriptor(Label="safetyStatus", Tag=0x0000001A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxPressure", Tag=0x00000000, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxSpeed", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxFlow", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstPressure", Tag=0x00000003, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxConstPressure", Tag=0x00000004, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="minCompPressure", Tag=0x00000005, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxCompPressure", Tag=0x00000006, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="minConstSpeed", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxConstSpeed", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstFlow", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxConstFlow", Tag=0x0000000A, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="pumpStatus", Tag=0x00000010, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=PumpConfigurationAndControl.Enums.OperationModeEnum), + ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.ControlModeEnum), + ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.OperationModeEnum), + ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -22611,28 +27751,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - type: 'WindowCovering.Enums.Type' = None - physicalClosedLimitLift: 'typing.Optional[uint]' = None - physicalClosedLimitTilt: 'typing.Optional[uint]' = None - currentPositionLift: 'typing.Union[None, Nullable, uint]' = None - currentPositionTilt: 'typing.Union[None, Nullable, uint]' = None - numberOfActuationsLift: 'typing.Optional[uint]' = None - numberOfActuationsTilt: 'typing.Optional[uint]' = None - configStatus: 'uint' = None - currentPositionLiftPercentage: 'typing.Union[None, Nullable, uint]' = None - currentPositionTiltPercentage: 'typing.Union[None, Nullable, uint]' = None - operationalStatus: 'uint' = None - targetPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None - targetPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None - endProductType: 'WindowCovering.Enums.EndProductType' = None - currentPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None - currentPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None - installedOpenLimitLift: 'typing.Optional[uint]' = None - installedClosedLimitLift: 'typing.Optional[uint]' = None - installedOpenLimitTilt: 'typing.Optional[uint]' = None - installedClosedLimitTilt: 'typing.Optional[uint]' = None - mode: 'uint' = None - safetyStatus: 'typing.Optional[uint]' = None + maxPressure: 'typing.Union[Nullable, int]' = None + maxSpeed: 'typing.Union[Nullable, uint]' = None + maxFlow: 'typing.Union[Nullable, uint]' = None + minConstPressure: 'typing.Union[None, Nullable, int]' = None + maxConstPressure: 'typing.Union[None, Nullable, int]' = None + minCompPressure: 'typing.Union[None, Nullable, int]' = None + maxCompPressure: 'typing.Union[None, Nullable, int]' = None + minConstSpeed: 'typing.Union[None, Nullable, uint]' = None + maxConstSpeed: 'typing.Union[None, Nullable, uint]' = None + minConstFlow: 'typing.Union[None, Nullable, uint]' = None + maxConstFlow: 'typing.Union[None, Nullable, uint]' = None + minConstTemp: 'typing.Union[None, Nullable, int]' = None + maxConstTemp: 'typing.Union[None, Nullable, int]' = None + pumpStatus: 'typing.Optional[uint]' = None + effectiveOperationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None + effectiveControlMode: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = None + capacity: 'typing.Union[Nullable, int]' = None + speed: 'typing.Union[None, Nullable, uint]' = None + lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None + power: 'typing.Union[None, Nullable, uint]' = None + lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None + operationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None + controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -22641,208 +27782,57 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class EndProductType(MatterIntEnum): - kRollerShade = 0x00 - kRomanShade = 0x01 - kBalloonShade = 0x02 - kWovenWood = 0x03 - kPleatedShade = 0x04 - kCellularShade = 0x05 - kLayeredShade = 0x06 - kLayeredShade2D = 0x07 - kSheerShade = 0x08 - kTiltOnlyInteriorBlind = 0x09 - kInteriorBlind = 0x0A - kVerticalBlindStripCurtain = 0x0B - kInteriorVenetianBlind = 0x0C - kExteriorVenetianBlind = 0x0D - kLateralLeftCurtain = 0x0E - kLateralRightCurtain = 0x0F - kCentralCurtain = 0x10 - kRollerShutter = 0x11 - kExteriorVerticalScreen = 0x12 - kAwningTerracePatio = 0x13 - kAwningVerticalScreen = 0x14 - kTiltOnlyPergola = 0x15 - kSwingingShutter = 0x16 - kSlidingShutter = 0x17 - kUnknown = 0xFF + class ControlModeEnum(MatterIntEnum): + kConstantSpeed = 0x00 + kConstantPressure = 0x01 + kProportionalPressure = 0x02 + kConstantFlow = 0x03 + kConstantTemperature = 0x05 + kAutomatic = 0x07 # 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 = 24, + kUnknownEnumValue = 4, - class Type(MatterIntEnum): - kRollerShade = 0x00 - kRollerShade2Motor = 0x01 - kRollerShadeExterior = 0x02 - kRollerShadeExterior2Motor = 0x03 - kDrapery = 0x04 - kAwning = 0x05 - kShutter = 0x06 - kTiltBlindTiltOnly = 0x07 - kTiltBlindLiftAndTilt = 0x08 - kProjectorScreen = 0x09 - kUnknown = 0xFF + class OperationModeEnum(MatterIntEnum): + kNormal = 0x00 + kMinimum = 0x01 + kMaximum = 0x02 + kLocal = 0x03 # 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 = 10, + kUnknownEnumValue = 4, class Bitmaps: - class ConfigStatus(IntFlag): - kOperational = 0x1 - kOnlineReserved = 0x2 - kLiftMovementReversed = 0x4 - kLiftPositionAware = 0x8 - kTiltPositionAware = 0x10 - kLiftEncoderControlled = 0x20 - kTiltEncoderControlled = 0x40 - class Feature(IntFlag): - kLift = 0x1 - kTilt = 0x2 - kPositionAwareLift = 0x4 - kAbsolutePosition = 0x8 - kPositionAwareTilt = 0x10 - - class Mode(IntFlag): - kMotorDirectionReversed = 0x1 - kCalibrationMode = 0x2 - kMaintenanceMode = 0x4 - kLedFeedback = 0x8 - - class OperationalStatus(IntFlag): - kGlobal = 0x3 - kLift = 0xC - kTilt = 0x30 - - class SafetyStatus(IntFlag): - kRemoteLockout = 0x1 - kTamperDetection = 0x2 - kFailedCommunication = 0x4 - kPositionFailure = 0x8 - kThermalProtection = 0x10 - kObstacleDetected = 0x20 - kPower = 0x40 - kStopInput = 0x80 - kMotorJammed = 0x100 - kHardwareFailure = 0x200 - kManualOperation = 0x400 - kProtection = 0x800 - - class Commands: - @dataclass - class UpOrOpen(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class DownOrClose(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class StopMotion(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class GoToLiftValue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="liftValue", Tag=0, Type=uint), - ]) - - liftValue: 'uint' = 0 - - @dataclass - class GoToLiftPercentage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="liftPercent100thsValue", Tag=0, Type=uint), - ]) - - liftPercent100thsValue: 'uint' = 0 - - @dataclass - class GoToTiltValue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000007 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="tiltValue", Tag=0, Type=uint), - ]) - - tiltValue: 'uint' = 0 - - @dataclass - class GoToTiltPercentage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000102 - command_id: typing.ClassVar[int] = 0x00000008 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="tiltPercent100thsValue", Tag=0, Type=uint), - ]) + kConstantPressure = 0x1 + kCompensatedPressure = 0x2 + kConstantFlow = 0x4 + kConstantSpeed = 0x8 + kConstantTemperature = 0x10 + kAutomatic = 0x20 + kLocalOperation = 0x40 - tiltPercent100thsValue: 'uint' = 0 + class PumpStatusBitmap(IntFlag): + kDeviceFault = 0x1 + kSupplyFault = 0x2 + kSpeedLow = 0x4 + kSpeedHigh = 0x8 + kLocalOverride = 0x10 + kRunning = 0x20 + kRemotePressure = 0x40 + kRemoteFlow = 0x80 + kRemoteTemperature = 0x100 class Attributes: @dataclass - class Type(ClusterAttributeDescriptor): + class MaxPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22850,15 +27840,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.Type) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'WindowCovering.Enums.Type' = 0 + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class PhysicalClosedLimitLift(ClusterAttributeDescriptor): + class MaxSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22866,15 +27856,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class PhysicalClosedLimitTilt(ClusterAttributeDescriptor): + class MaxFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22882,15 +27872,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class CurrentPositionLift(ClusterAttributeDescriptor): + class MinConstPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22898,15 +27888,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class CurrentPositionTilt(ClusterAttributeDescriptor): + class MaxConstPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22914,15 +27904,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class NumberOfActuationsLift(ClusterAttributeDescriptor): + class MinCompPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22930,15 +27920,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class NumberOfActuationsTilt(ClusterAttributeDescriptor): + class MaxCompPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22946,15 +27936,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class ConfigStatus(ClusterAttributeDescriptor): + class MinConstSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22962,15 +27952,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class CurrentPositionLiftPercentage(ClusterAttributeDescriptor): + class MaxConstSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22983,10 +27973,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class CurrentPositionTiltPercentage(ClusterAttributeDescriptor): + class MinConstFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22999,10 +27989,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class OperationalStatus(ClusterAttributeDescriptor): + class MaxConstFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23010,15 +28000,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class TargetPositionLiftPercent100ths(ClusterAttributeDescriptor): + class MinConstTemp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23026,15 +28016,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class TargetPositionTiltPercent100ths(ClusterAttributeDescriptor): + class MaxConstTemp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23042,127 +28032,127 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class EndProductType(ClusterAttributeDescriptor): + class PumpStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000D + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.EndProductType) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'WindowCovering.Enums.EndProductType' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class CurrentPositionLiftPercent100ths(ClusterAttributeDescriptor): + class EffectiveOperationMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000E + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 @dataclass - class CurrentPositionTiltPercent100ths(ClusterAttributeDescriptor): + class EffectiveControlMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000F + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.ControlModeEnum) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = 0 @dataclass - class InstalledOpenLimitLift(ClusterAttributeDescriptor): + class Capacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class InstalledClosedLimitLift(ClusterAttributeDescriptor): + class Speed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class InstalledOpenLimitTilt(ClusterAttributeDescriptor): + class LifetimeRunningHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x00000015 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class InstalledClosedLimitTilt(ClusterAttributeDescriptor): + class Power(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x00000016 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Mode(ClusterAttributeDescriptor): + class LifetimeEnergyConsumed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23170,31 +28160,47 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OperationMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000200 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000020 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 @dataclass - class SafetyStatus(ClusterAttributeDescriptor): + class ControlMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001A + return 0x00000021 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23210,7 +28216,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23226,7 +28232,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23242,7 +28248,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23258,7 +28264,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23274,7 +28280,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000102 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23286,83 +28292,16 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - -@dataclass -class BarrierControl(Cluster): - id: typing.ClassVar[int] = 0x00000103 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="barrierMovingState", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierSafetyStatus", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierCapabilities", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierOpenEvents", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCloseEvents", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCommandOpenEvents", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCommandCloseEvents", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierOpenPeriod", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierClosePeriod", Tag=0x00000009, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierPosition", Tag=0x0000000A, Type=uint), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - barrierMovingState: 'uint' = None - barrierSafetyStatus: 'uint' = None - barrierCapabilities: 'uint' = None - barrierOpenEvents: 'typing.Optional[uint]' = None - barrierCloseEvents: 'typing.Optional[uint]' = None - barrierCommandOpenEvents: 'typing.Optional[uint]' = None - barrierCommandCloseEvents: 'typing.Optional[uint]' = None - barrierOpenPeriod: 'typing.Optional[uint]' = None - barrierClosePeriod: 'typing.Optional[uint]' = None - barrierPosition: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Bitmaps: - class BarrierControlCapabilities(IntFlag): - kPartialBarrier = 0x1 - - class BarrierControlSafetyStatus(IntFlag): - kRemoteLockout = 0x1 - kTemperDetected = 0x2 - kFailedCommunication = 0x4 - kPositionFailure = 0x8 - - class Commands: + class Events: @dataclass - class BarrierControlGoToPercent(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000103 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class SupplyVoltageLow(ClusterEvent): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="percentOpen", Tag=0, Type=uint), - ]) - - percentOpen: 'uint' = 0 + def cluster_id(cls) -> int: + return 0x00000200 - @dataclass - class BarrierControlStop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000103 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23370,295 +28309,320 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) - class Attributes: @dataclass - class BarrierMovingState(ClusterAttributeDescriptor): + class SupplyVoltageHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000001 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierSafetyStatus(ClusterAttributeDescriptor): + class PowerMissingPhase(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000002 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierCapabilities(ClusterAttributeDescriptor): + class SystemPressureLow(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000003 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierOpenEvents(ClusterAttributeDescriptor): + class SystemPressureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000004 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierCloseEvents(ClusterAttributeDescriptor): + class DryRunning(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000005 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierCommandOpenEvents(ClusterAttributeDescriptor): + class MotorTemperatureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000006 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierCommandCloseEvents(ClusterAttributeDescriptor): + class PumpMotorFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000007 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierOpenPeriod(ClusterAttributeDescriptor): + class ElectronicTemperatureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000008 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierClosePeriod(ClusterAttributeDescriptor): + class PumpBlocked(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x00000009 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class BarrierPosition(ClusterAttributeDescriptor): + class SensorFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: + def event_id(cls) -> int: return 0x0000000A @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class ElectronicNonFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 + def event_id(cls) -> int: + return 0x0000000B @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class ElectronicFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 + def event_id(cls) -> int: + return 0x0000000C @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class EventList(ClusterAttributeDescriptor): + class GeneralFault(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA + def event_id(cls) -> int: + return 0x0000000D @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class AttributeList(ClusterAttributeDescriptor): + class Leakage(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFB + def event_id(cls) -> int: + return 0x0000000E @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AirDetection(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFC + def event_id(cls) -> int: + return 0x0000000F @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class TurbineOperation(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000103 + return 0x00000200 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFD + def event_id(cls) -> int: + return 0x00000010 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass -class PumpConfigurationAndControl(Cluster): - id: typing.ClassVar[int] = 0x00000200 +class Thermostat(Cluster): + id: typing.ClassVar[int] = 0x00000201 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="maxPressure", Tag=0x00000000, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxSpeed", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxFlow", Tag=0x00000002, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minConstPressure", Tag=0x00000003, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxConstPressure", Tag=0x00000004, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="minCompPressure", Tag=0x00000005, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxCompPressure", Tag=0x00000006, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="minConstSpeed", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxConstSpeed", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minConstFlow", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxConstFlow", Tag=0x0000000A, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="pumpStatus", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=PumpConfigurationAndControl.Enums.OperationModeEnum), - ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.ControlModeEnum), - ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.OperationModeEnum), - ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]), + ClusterObjectFieldDescriptor(Label="localTemperature", Tag=0x00000000, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="outdoorTemperature", Tag=0x00000001, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="occupancy", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="absMinHeatSetpointLimit", Tag=0x00000003, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="absMaxHeatSetpointLimit", Tag=0x00000004, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="absMinCoolSetpointLimit", Tag=0x00000005, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="absMaxCoolSetpointLimit", Tag=0x00000006, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="PICoolingDemand", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="PIHeatingDemand", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="HVACSystemTypeConfiguration", Tag=0x00000009, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="localTemperatureCalibration", Tag=0x00000010, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="occupiedCoolingSetpoint", Tag=0x00000011, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="occupiedHeatingSetpoint", Tag=0x00000012, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="unoccupiedCoolingSetpoint", Tag=0x00000013, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="unoccupiedHeatingSetpoint", Tag=0x00000014, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minHeatSetpointLimit", Tag=0x00000015, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxHeatSetpointLimit", Tag=0x00000016, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minCoolSetpointLimit", Tag=0x00000017, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxCoolSetpointLimit", Tag=0x00000018, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="minSetpointDeadBand", Tag=0x00000019, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="remoteSensing", Tag=0x0000001A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ControlSequenceOfOperationEnum), + ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=Thermostat.Enums.SystemModeEnum), + ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]), + ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]), + ClusterObjectFieldDescriptor(Label="numberOfWeeklyTransitions", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfDailyTransitions", Tag=0x00000022, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]), + ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldDuration", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="thermostatProgrammingOperationMode", Tag=0x00000025, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="thermostatRunningState", Tag=0x00000029, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]), + ClusterObjectFieldDescriptor(Label="setpointChangeAmount", Tag=0x00000031, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="setpointChangeSourceTimestamp", Tag=0x00000032, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="occupiedSetback", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="occupiedSetbackMin", Tag=0x00000035, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="occupiedSetbackMax", Tag=0x00000036, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="unoccupiedSetback", Tag=0x00000037, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMin", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMax", Tag=0x00000039, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="emergencyHeatDelta", Tag=0x0000003A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[Thermostat.Enums.ACTypeEnum]), + ClusterObjectFieldDescriptor(Label="ACCapacity", Tag=0x00000041, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]), + ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]), + ClusterObjectFieldDescriptor(Label="ACErrorCode", Tag=0x00000044, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]), + ClusterObjectFieldDescriptor(Label="ACCoilTemperature", Tag=0x00000046, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -23667,29 +28631,55 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - maxPressure: 'typing.Union[Nullable, int]' = None - maxSpeed: 'typing.Union[Nullable, uint]' = None - maxFlow: 'typing.Union[Nullable, uint]' = None - minConstPressure: 'typing.Union[None, Nullable, int]' = None - maxConstPressure: 'typing.Union[None, Nullable, int]' = None - minCompPressure: 'typing.Union[None, Nullable, int]' = None - maxCompPressure: 'typing.Union[None, Nullable, int]' = None - minConstSpeed: 'typing.Union[None, Nullable, uint]' = None - maxConstSpeed: 'typing.Union[None, Nullable, uint]' = None - minConstFlow: 'typing.Union[None, Nullable, uint]' = None - maxConstFlow: 'typing.Union[None, Nullable, uint]' = None - minConstTemp: 'typing.Union[None, Nullable, int]' = None - maxConstTemp: 'typing.Union[None, Nullable, int]' = None - pumpStatus: 'typing.Optional[uint]' = None - effectiveOperationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None - effectiveControlMode: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = None - capacity: 'typing.Union[Nullable, int]' = None - speed: 'typing.Union[None, Nullable, uint]' = None - lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None - power: 'typing.Union[None, Nullable, uint]' = None - lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None - operationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None - controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None + localTemperature: 'typing.Union[Nullable, int]' = None + outdoorTemperature: 'typing.Union[None, Nullable, int]' = None + occupancy: 'typing.Optional[uint]' = None + absMinHeatSetpointLimit: 'typing.Optional[int]' = None + absMaxHeatSetpointLimit: 'typing.Optional[int]' = None + absMinCoolSetpointLimit: 'typing.Optional[int]' = None + absMaxCoolSetpointLimit: 'typing.Optional[int]' = None + PICoolingDemand: 'typing.Optional[uint]' = None + PIHeatingDemand: 'typing.Optional[uint]' = None + HVACSystemTypeConfiguration: 'typing.Optional[uint]' = None + localTemperatureCalibration: 'typing.Optional[int]' = None + occupiedCoolingSetpoint: 'typing.Optional[int]' = None + occupiedHeatingSetpoint: 'typing.Optional[int]' = None + unoccupiedCoolingSetpoint: 'typing.Optional[int]' = None + unoccupiedHeatingSetpoint: 'typing.Optional[int]' = None + minHeatSetpointLimit: 'typing.Optional[int]' = None + maxHeatSetpointLimit: 'typing.Optional[int]' = None + minCoolSetpointLimit: 'typing.Optional[int]' = None + maxCoolSetpointLimit: 'typing.Optional[int]' = None + minSetpointDeadBand: 'typing.Optional[int]' = None + remoteSensing: 'typing.Optional[uint]' = None + controlSequenceOfOperation: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = None + systemMode: 'Thermostat.Enums.SystemModeEnum' = None + thermostatRunningMode: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None + startOfWeek: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None + numberOfWeeklyTransitions: 'typing.Optional[uint]' = None + numberOfDailyTransitions: 'typing.Optional[uint]' = None + temperatureSetpointHold: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None + temperatureSetpointHoldDuration: 'typing.Union[None, Nullable, uint]' = None + thermostatProgrammingOperationMode: 'typing.Optional[uint]' = None + thermostatRunningState: 'typing.Optional[uint]' = None + setpointChangeSource: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None + setpointChangeAmount: 'typing.Union[None, Nullable, int]' = None + setpointChangeSourceTimestamp: 'typing.Optional[uint]' = None + occupiedSetback: 'typing.Union[None, Nullable, uint]' = None + occupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None + occupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None + unoccupiedSetback: 'typing.Union[None, Nullable, uint]' = None + unoccupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None + unoccupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None + emergencyHeatDelta: 'typing.Optional[uint]' = None + ACType: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None + ACCapacity: 'typing.Optional[uint]' = None + ACRefrigerantType: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None + ACCompressorType: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None + ACErrorCode: 'typing.Optional[uint]' = None + ACLouverPosition: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None + ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None + ACCapacityformat: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -23698,253 +28688,334 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class ControlModeEnum(MatterIntEnum): - kConstantSpeed = 0x00 - kConstantPressure = 0x01 - kProportionalPressure = 0x02 - kConstantFlow = 0x03 - kConstantTemperature = 0x05 - kAutomatic = 0x07 + class ACCapacityFormatEnum(MatterIntEnum): + kBTUh = 0x00 + # 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 = 1, + + class ACCompressorTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kT1 = 0x01 + kT2 = 0x02 + kT3 = 0x03 + # 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 = 4, + + class ACLouverPositionEnum(MatterIntEnum): + kClosed = 0x01 + kOpen = 0x02 + kQuarter = 0x03 + kHalf = 0x04 + kThreeQuarters = 0x05 + # 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 = 0, + + class ACRefrigerantTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kR22 = 0x01 + kR410a = 0x02 + kR407c = 0x03 + # 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 = 4, + + class ACTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kCoolingFixed = 0x01 + kHeatPumpFixed = 0x02 + kCoolingInverter = 0x03 + kHeatPumpInverter = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class ControlSequenceOfOperationEnum(MatterIntEnum): + kCoolingOnly = 0x00 + kCoolingWithReheat = 0x01 + kHeatingOnly = 0x02 + kHeatingWithReheat = 0x03 + kCoolingAndHeating = 0x04 + kCoolingAndHeatingWithReheat = 0x05 # 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 = 4, + kUnknownEnumValue = 6, - class OperationModeEnum(MatterIntEnum): - kNormal = 0x00 - kMinimum = 0x01 - kMaximum = 0x02 - kLocal = 0x03 + class SetpointChangeSourceEnum(MatterIntEnum): + kManual = 0x00 + kSchedule = 0x01 + kExternal = 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 = 4, - - class Bitmaps: - class Feature(IntFlag): - kConstantPressure = 0x1 - kCompensatedPressure = 0x2 - kConstantFlow = 0x4 - kConstantSpeed = 0x8 - kConstantTemperature = 0x10 - kAutomatic = 0x20 - kLocalOperation = 0x40 - - class PumpStatusBitmap(IntFlag): - kDeviceFault = 0x1 - kSupplyFault = 0x2 - kSpeedLow = 0x4 - kSpeedHigh = 0x8 - kLocalOverride = 0x10 - kRunning = 0x20 - kRemotePressure = 0x40 - kRemoteFlow = 0x80 - kRemoteTemperature = 0x100 - - class Attributes: - @dataclass - class MaxPressure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - - value: 'typing.Union[Nullable, int]' = NullValue - - @dataclass - class MaxSpeed(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - - value: 'typing.Union[Nullable, uint]' = NullValue - - @dataclass - class MaxFlow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 + kUnknownEnumValue = 3, - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + class SetpointRaiseLowerModeEnum(MatterIntEnum): + kHeat = 0x00 + kCool = 0x01 + kBoth = 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, - value: 'typing.Union[Nullable, uint]' = NullValue + class StartOfWeekEnum(MatterIntEnum): + kSunday = 0x00 + kMonday = 0x01 + kTuesday = 0x02 + kWednesday = 0x03 + kThursday = 0x04 + kFriday = 0x05 + kSaturday = 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, - @dataclass - class MinConstPressure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 + class SystemModeEnum(MatterIntEnum): + kOff = 0x00 + kAuto = 0x01 + kCool = 0x03 + kHeat = 0x04 + kEmergencyHeat = 0x05 + kPrecooling = 0x06 + kFanOnly = 0x07 + kDry = 0x08 + kSleep = 0x09 + # 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 = 2, - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 + class TemperatureSetpointHoldEnum(MatterIntEnum): + kSetpointHoldOff = 0x00 + kSetpointHoldOn = 0x01 + # 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 = 2, - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + class ThermostatRunningModeEnum(MatterIntEnum): + kOff = 0x00 + kCool = 0x03 + kHeat = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, - value: 'typing.Union[None, Nullable, int]' = None + class Bitmaps: + class ACErrorCodeBitmap(IntFlag): + kCompressorFail = 0x1 + kRoomSensorFail = 0x2 + kOutdoorSensorFail = 0x4 + kCoilSensorFail = 0x8 + kFanFail = 0x10 - @dataclass - class MaxConstPressure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 + class Feature(IntFlag): + kHeating = 0x1 + kCooling = 0x2 + kOccupancy = 0x4 + kScheduleConfiguration = 0x8 + kSetback = 0x10 + kAutoMode = 0x20 + kLocalTemperatureNotExposed = 0x40 - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 + class HVACSystemTypeBitmap(IntFlag): + kCoolingStage = 0x3 + kHeatingStage = 0xC + kHeatingIsHeatPump = 0x10 + kHeatingUsesFuel = 0x20 + + class ProgrammingOperationModeBitmap(IntFlag): + kScheduleActive = 0x1 + kAutoRecovery = 0x2 + kEconomy = 0x4 + + class RelayStateBitmap(IntFlag): + kHeat = 0x1 + kCool = 0x2 + kFan = 0x4 + kHeatStage2 = 0x8 + kCoolStage2 = 0x10 + kFanStage2 = 0x20 + kFanStage3 = 0x40 + + class RemoteSensingBitmap(IntFlag): + kLocalTemperature = 0x1 + kOutdoorTemperature = 0x2 + kOccupancy = 0x4 - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + class ScheduleDayOfWeekBitmap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + kAway = 0x80 - value: 'typing.Union[None, Nullable, int]' = None + class ScheduleModeBitmap(IntFlag): + kHeatSetpointPresent = 0x1 + kCoolSetpointPresent = 0x2 + class Structs: @dataclass - class MinCompPressure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000005 - + class WeeklyScheduleTransitionStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), + ]) - value: 'typing.Union[None, Nullable, int]' = None + transitionTime: 'uint' = 0 + heatSetpoint: 'typing.Union[Nullable, int]' = NullValue + coolSetpoint: 'typing.Union[Nullable, int]' = NullValue + class Commands: @dataclass - class MaxCompPressure(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000006 + class SetpointRaiseLower(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointRaiseLowerModeEnum), + ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), + ]) - value: 'typing.Union[None, Nullable, int]' = None + mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 + amount: 'int' = 0 @dataclass - class MinConstSpeed(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 + class GetWeeklyScheduleResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + numberOfTransitionsForSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 + modeForSequence: 'uint' = 0 + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass - class MaxConstSpeed(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000008 + class SetWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + numberOfTransitionsForSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 + modeForSequence: 'uint' = 0 + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass - class MinConstFlow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 + class GetWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="modeToReturn", Tag=1, Type=uint), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + daysToReturn: 'uint' = 0 + modeToReturn: 'uint' = 0 @dataclass - class MaxConstFlow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000A + class ClearWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + class Attributes: @dataclass - class MinConstTemp(ClusterAttributeDescriptor): + class LocalTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000B + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class MaxConstTemp(ClusterAttributeDescriptor): + class OutdoorTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000C + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -23953,14 +29024,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, int]' = None @dataclass - class PumpStatus(ClusterAttributeDescriptor): + class Occupancy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -23969,866 +29040,606 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class EffectiveOperationMode(ClusterAttributeDescriptor): + class AbsMinHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 + value: 'typing.Optional[int]' = None @dataclass - class EffectiveControlMode(ClusterAttributeDescriptor): + class AbsMaxHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.ControlModeEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = 0 + value: 'typing.Optional[int]' = None @dataclass - class Capacity(ClusterAttributeDescriptor): + class AbsMinCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Optional[int]' = None @dataclass - class Speed(ClusterAttributeDescriptor): + class AbsMaxCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[int]' = None @dataclass - class LifetimeRunningHours(ClusterAttributeDescriptor): + class PICoolingDemand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass - class Power(ClusterAttributeDescriptor): + class PIHeatingDemand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass - class LifetimeEnergyConsumed(ClusterAttributeDescriptor): + class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000017 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass - class OperationMode(ClusterAttributeDescriptor): + class LocalTemperatureCalibration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000020 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 + value: 'typing.Optional[int]' = None @dataclass - class ControlMode(ClusterAttributeDescriptor): + class OccupiedCoolingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000021 + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None + value: 'typing.Optional[int]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class OccupiedHeatingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[int]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class UnoccupiedCoolingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[int]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class UnoccupiedHeatingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[int]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class MinHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000015 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[int]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class MaxHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000016 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'uint' = 0 + value: 'typing.Optional[int]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class MinCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000017 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - class Events: - @dataclass - class SupplyVoltageLow(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class SupplyVoltageHigh(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + value: 'typing.Optional[int]' = None @dataclass - class PowerMissingPhase(ClusterEvent): + class MaxCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000002 + def attribute_id(cls) -> int: + return 0x00000018 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None @dataclass - class SystemPressureLow(ClusterEvent): + class MinSetpointDeadBand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000003 + def attribute_id(cls) -> int: + return 0x00000019 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + + value: 'typing.Optional[int]' = None @dataclass - class SystemPressureHigh(ClusterEvent): + class RemoteSensing(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000004 + def attribute_id(cls) -> int: + return 0x0000001A @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class DryRunning(ClusterEvent): + class ControlSequenceOfOperation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000005 + def attribute_id(cls) -> int: + return 0x0000001B @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ControlSequenceOfOperationEnum) + + value: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = 0 @dataclass - class MotorTemperatureHigh(ClusterEvent): + class SystemMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000006 + def attribute_id(cls) -> int: + return 0x0000001C @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.SystemModeEnum) + + value: 'Thermostat.Enums.SystemModeEnum' = 0 @dataclass - class PumpMotorFatalFailure(ClusterEvent): + class ThermostatRunningMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000007 + def attribute_id(cls) -> int: + return 0x0000001E @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]) + + value: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None @dataclass - class ElectronicTemperatureHigh(ClusterEvent): + class StartOfWeek(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000008 + def attribute_id(cls) -> int: + return 0x00000020 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]) + + value: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None @dataclass - class PumpBlocked(ClusterEvent): + class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000009 + def attribute_id(cls) -> int: + return 0x00000021 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class SensorFailure(ClusterEvent): + class NumberOfDailyTransitions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000A + def attribute_id(cls) -> int: + return 0x00000022 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class ElectronicNonFatalFailure(ClusterEvent): + class TemperatureSetpointHold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000B + def attribute_id(cls) -> int: + return 0x00000023 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]) + + value: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None @dataclass - class ElectronicFatalFailure(ClusterEvent): + class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000C + def attribute_id(cls) -> int: + return 0x00000024 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class GeneralFault(ClusterEvent): + class ThermostatProgrammingOperationMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000D + def attribute_id(cls) -> int: + return 0x00000025 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class Leakage(ClusterEvent): + class ThermostatRunningState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000E + def attribute_id(cls) -> int: + return 0x00000029 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class AirDetection(ClusterEvent): + class SetpointChangeSource(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x0000000F + def attribute_id(cls) -> int: + return 0x00000030 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]) + + value: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None @dataclass - class TurbineOperation(ClusterEvent): + class SetpointChangeAmount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000200 + return 0x00000201 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000010 + def attribute_id(cls) -> int: + return 0x00000031 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - -@dataclass -class Thermostat(Cluster): - id: typing.ClassVar[int] = 0x00000201 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="localTemperature", Tag=0x00000000, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="outdoorTemperature", Tag=0x00000001, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="occupancy", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="absMinHeatSetpointLimit", Tag=0x00000003, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="absMaxHeatSetpointLimit", Tag=0x00000004, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="absMinCoolSetpointLimit", Tag=0x00000005, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="absMaxCoolSetpointLimit", Tag=0x00000006, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="PICoolingDemand", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="PIHeatingDemand", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="HVACSystemTypeConfiguration", Tag=0x00000009, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="localTemperatureCalibration", Tag=0x00000010, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="occupiedCoolingSetpoint", Tag=0x00000011, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="occupiedHeatingSetpoint", Tag=0x00000012, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="unoccupiedCoolingSetpoint", Tag=0x00000013, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="unoccupiedHeatingSetpoint", Tag=0x00000014, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minHeatSetpointLimit", Tag=0x00000015, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxHeatSetpointLimit", Tag=0x00000016, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minCoolSetpointLimit", Tag=0x00000017, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxCoolSetpointLimit", Tag=0x00000018, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minSetpointDeadBand", Tag=0x00000019, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="remoteSensing", Tag=0x0000001A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ThermostatControlSequence), - ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=uint), - ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfWeeklyTransitions", Tag=0x00000021, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="numberOfDailyTransitions", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldDuration", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="thermostatProgrammingOperationMode", Tag=0x00000025, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="thermostatRunningState", Tag=0x00000029, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="setpointChangeAmount", Tag=0x00000031, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="setpointChangeSourceTimestamp", Tag=0x00000032, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="occupiedSetback", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="occupiedSetbackMin", Tag=0x00000035, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="occupiedSetbackMax", Tag=0x00000036, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="unoccupiedSetback", Tag=0x00000037, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMin", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMax", Tag=0x00000039, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="emergencyHeatDelta", Tag=0x0000003A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACCapacity", Tag=0x00000041, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACErrorCode", Tag=0x00000044, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACCoilTemperature", Tag=0x00000046, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - localTemperature: 'typing.Union[Nullable, int]' = None - outdoorTemperature: 'typing.Union[None, Nullable, int]' = None - occupancy: 'typing.Optional[uint]' = None - absMinHeatSetpointLimit: 'typing.Optional[int]' = None - absMaxHeatSetpointLimit: 'typing.Optional[int]' = None - absMinCoolSetpointLimit: 'typing.Optional[int]' = None - absMaxCoolSetpointLimit: 'typing.Optional[int]' = None - PICoolingDemand: 'typing.Optional[uint]' = None - PIHeatingDemand: 'typing.Optional[uint]' = None - HVACSystemTypeConfiguration: 'typing.Optional[uint]' = None - localTemperatureCalibration: 'typing.Optional[int]' = None - occupiedCoolingSetpoint: 'typing.Optional[int]' = None - occupiedHeatingSetpoint: 'typing.Optional[int]' = None - unoccupiedCoolingSetpoint: 'typing.Optional[int]' = None - unoccupiedHeatingSetpoint: 'typing.Optional[int]' = None - minHeatSetpointLimit: 'typing.Optional[int]' = None - maxHeatSetpointLimit: 'typing.Optional[int]' = None - minCoolSetpointLimit: 'typing.Optional[int]' = None - maxCoolSetpointLimit: 'typing.Optional[int]' = None - minSetpointDeadBand: 'typing.Optional[int]' = None - remoteSensing: 'typing.Optional[uint]' = None - controlSequenceOfOperation: 'Thermostat.Enums.ThermostatControlSequence' = None - systemMode: 'uint' = None - thermostatRunningMode: 'typing.Optional[uint]' = None - startOfWeek: 'typing.Optional[uint]' = None - numberOfWeeklyTransitions: 'typing.Optional[uint]' = None - numberOfDailyTransitions: 'typing.Optional[uint]' = None - temperatureSetpointHold: 'typing.Optional[uint]' = None - temperatureSetpointHoldDuration: 'typing.Union[None, Nullable, uint]' = None - thermostatProgrammingOperationMode: 'typing.Optional[uint]' = None - thermostatRunningState: 'typing.Optional[uint]' = None - setpointChangeSource: 'typing.Optional[uint]' = None - setpointChangeAmount: 'typing.Union[None, Nullable, int]' = None - setpointChangeSourceTimestamp: 'typing.Optional[uint]' = None - occupiedSetback: 'typing.Union[None, Nullable, uint]' = None - occupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None - occupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetback: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None - emergencyHeatDelta: 'typing.Optional[uint]' = None - ACType: 'typing.Optional[uint]' = None - ACCapacity: 'typing.Optional[uint]' = None - ACRefrigerantType: 'typing.Optional[uint]' = None - ACCompressorType: 'typing.Optional[uint]' = None - ACErrorCode: 'typing.Optional[uint]' = None - ACLouverPosition: 'typing.Optional[uint]' = None - ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None - ACCapacityformat: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class SetpointAdjustMode(MatterIntEnum): - kHeat = 0x00 - kCool = 0x01 - kBoth = 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, - - class ThermostatControlSequence(MatterIntEnum): - kCoolingOnly = 0x00 - kCoolingWithReheat = 0x01 - kHeatingOnly = 0x02 - kHeatingWithReheat = 0x03 - kCoolingAndHeating = 0x04 - kCoolingAndHeatingWithReheat = 0x05 - # 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 = 6, + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - class ThermostatRunningMode(MatterIntEnum): - kOff = 0x00 - kCool = 0x03 - kHeat = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, + value: 'typing.Union[None, Nullable, int]' = None - class ThermostatSystemMode(MatterIntEnum): - kOff = 0x00 - kAuto = 0x01 - kCool = 0x03 - kHeat = 0x04 - kEmergencyHeat = 0x05 - kPrecooling = 0x06 - kFanOnly = 0x07 - kDry = 0x08 - kSleep = 0x09 - # 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 = 2, + @dataclass + class SetpointChangeSourceTimestamp(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 - class Bitmaps: - class DayOfWeek(IntFlag): - kSunday = 0x1 - kMonday = 0x2 - kTuesday = 0x4 - kWednesday = 0x8 - kThursday = 0x10 - kFriday = 0x20 - kSaturday = 0x40 - kAway = 0x80 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000032 - class Feature(IntFlag): - kHeating = 0x1 - kCooling = 0x2 - kOccupancy = 0x4 - kScheduleConfiguration = 0x8 - kSetback = 0x10 - kAutoMode = 0x20 - kLocalTemperatureNotExposed = 0x40 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - class ModeForSequence(IntFlag): - kHeatSetpointPresent = 0x1 - kCoolSetpointPresent = 0x2 + value: 'typing.Optional[uint]' = None - class Structs: @dataclass - class ThermostatScheduleTransition(ClusterObject): + class OccupiedSetback(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), - ]) - - transitionTime: 'uint' = 0 - heatSetpoint: 'typing.Union[Nullable, int]' = NullValue - coolSetpoint: 'typing.Union[Nullable, int]' = NullValue + def cluster_id(cls) -> int: + return 0x00000201 - class Commands: - @dataclass - class SetpointRaiseLower(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000034 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointAdjustMode), - ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - mode: 'Thermostat.Enums.SetpointAdjustMode' = 0 - amount: 'int' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class GetWeeklyScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - + class OccupiedSetbackMin(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), - ]) - - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + def cluster_id(cls) -> int: + return 0x00000201 - @dataclass - class SetWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000035 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class GetWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' + class OccupiedSetbackMax(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="modeToReturn", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000036 - daysToReturn: 'uint' = 0 - modeToReturn: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class ClearWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class UnoccupiedSetback(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + def attribute_id(cls) -> int: + return 0x00000037 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None - class Attributes: @dataclass - class LocalTemperature(ClusterAttributeDescriptor): + class UnoccupiedSetbackMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000038 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class OutdoorTemperature(ClusterAttributeDescriptor): + class UnoccupiedSetbackMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000039 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Occupancy(ClusterAttributeDescriptor): + class EmergencyHeatDelta(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x0000003A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -24837,78 +29648,78 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class AbsMinHeatSetpointLimit(ClusterAttributeDescriptor): + class ACType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000040 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACTypeEnum]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None @dataclass - class AbsMaxHeatSetpointLimit(ClusterAttributeDescriptor): + class ACCapacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000041 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[uint]' = None @dataclass - class AbsMinCoolSetpointLimit(ClusterAttributeDescriptor): + class ACRefrigerantType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000042 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None @dataclass - class AbsMaxCoolSetpointLimit(ClusterAttributeDescriptor): + class ACCompressorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000043 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None @dataclass - class PICoolingDemand(ClusterAttributeDescriptor): + class ACErrorCode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000044 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -24917,254 +29728,388 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class PIHeatingDemand(ClusterAttributeDescriptor): + class ACLouverPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000045 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None @dataclass - class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): + class ACCoilTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000009 + return 0x00000046 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class LocalTemperatureCalibration(ClusterAttributeDescriptor): + class ACCapacityformat(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000047 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None @dataclass - class OccupiedCoolingSetpoint(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[int]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OccupiedHeatingSetpoint(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[int]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class UnoccupiedCoolingSetpoint(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[int]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class UnoccupiedHeatingSetpoint(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[int]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class MinHeatSetpointLimit(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[int]' = None + value: 'uint' = 0 @dataclass - class MaxHeatSetpointLimit(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[int]' = None + value: 'uint' = 0 + + +@dataclass +class FanControl(Cluster): + id: typing.ClassVar[int] = 0x00000202 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=FanControl.Enums.FanModeEnum), + ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=FanControl.Enums.FanModeSequenceEnum), + ClusterObjectFieldDescriptor(Label="percentSetting", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="percentCurrent", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="speedMax", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="speedSetting", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="speedCurrent", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="rockSupport", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="rockSetting", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="windSupport", Tag=0x00000009, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="windSetting", Tag=0x0000000A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="airflowDirection", Tag=0x0000000B, Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + fanMode: 'FanControl.Enums.FanModeEnum' = None + fanModeSequence: 'FanControl.Enums.FanModeSequenceEnum' = None + percentSetting: 'typing.Union[Nullable, uint]' = None + percentCurrent: 'uint' = None + speedMax: 'typing.Optional[uint]' = None + speedSetting: 'typing.Union[None, Nullable, uint]' = None + speedCurrent: 'typing.Optional[uint]' = None + rockSupport: 'typing.Optional[uint]' = None + rockSetting: 'typing.Optional[uint]' = None + windSupport: 'typing.Optional[uint]' = None + windSetting: 'typing.Optional[uint]' = None + airflowDirection: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class AirflowDirectionEnum(MatterIntEnum): + kForward = 0x00 + kReverse = 0x01 + # 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 = 2, + + class FanModeEnum(MatterIntEnum): + kOff = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 + kOn = 0x04 + kAuto = 0x05 + kSmart = 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, + + class FanModeSequenceEnum(MatterIntEnum): + kOffLowMedHigh = 0x00 + kOffLowHigh = 0x01 + kOffLowMedHighAuto = 0x02 + kOffLowHighAuto = 0x03 + kOffHighAuto = 0x04 + kOffHigh = 0x05 + # 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 = 6, + + class StepDirectionEnum(MatterIntEnum): + kIncrease = 0x00 + kDecrease = 0x01 + # 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 = 2, + + class Bitmaps: + class Feature(IntFlag): + kMultiSpeed = 0x1 + kAuto = 0x2 + kRocking = 0x4 + kWind = 0x8 + kStep = 0x10 + kAirflowDirection = 0x20 + + class RockBitmap(IntFlag): + kRockLeftRight = 0x1 + kRockUpDown = 0x2 + kRockRound = 0x4 + + class WindBitmap(IntFlag): + kSleepWind = 0x1 + kNaturalWind = 0x2 + class Commands: @dataclass - class MinCoolSetpointLimit(ClusterAttributeDescriptor): + class Step(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000202 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="direction", Tag=0, Type=FanControl.Enums.StepDirectionEnum), + ClusterObjectFieldDescriptor(Label="wrap", Tag=1, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="lowestOff", Tag=2, Type=typing.Optional[bool]), + ]) + + direction: 'FanControl.Enums.StepDirectionEnum' = 0 + wrap: 'typing.Optional[bool]' = None + lowestOff: 'typing.Optional[bool]' = None + + class Attributes: + @dataclass + class FanMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000017 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeEnum) - value: 'typing.Optional[int]' = None + value: 'FanControl.Enums.FanModeEnum' = 0 @dataclass - class MaxCoolSetpointLimit(ClusterAttributeDescriptor): + class FanModeSequence(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000018 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceEnum) - value: 'typing.Optional[int]' = None + value: 'FanControl.Enums.FanModeSequenceEnum' = 0 @dataclass - class MinSetpointDeadBand(ClusterAttributeDescriptor): + class PercentSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000019 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class RemoteSensing(ClusterAttributeDescriptor): + class PercentCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001A + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class ControlSequenceOfOperation(ClusterAttributeDescriptor): + class SpeedMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001B + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ThermostatControlSequence) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'Thermostat.Enums.ThermostatControlSequence' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class SystemMode(ClusterAttributeDescriptor): + class SpeedSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001C + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class ThermostatRunningMode(ClusterAttributeDescriptor): + class SpeedCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001E + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25173,14 +30118,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class StartOfWeek(ClusterAttributeDescriptor): + class RockSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000020 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25189,14 +30134,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): + class RockSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000021 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25205,14 +30150,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class NumberOfDailyTransitions(ClusterAttributeDescriptor): + class WindSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000022 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25221,14 +30166,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class TemperatureSetpointHold(ClusterAttributeDescriptor): + class WindSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000023 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25237,692 +30182,1187 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): + class AirflowDirection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000024 + return 0x0000000B @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None @dataclass - class ThermostatProgrammingOperationMode(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000025 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ThermostatRunningState(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class ThermostatUserInterfaceConfiguration(Cluster): + id: typing.ClassVar[int] = 0x00000204 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="temperatureDisplayMode", Tag=0x00000000, Type=ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum), + ClusterObjectFieldDescriptor(Label="keypadLockout", Tag=0x00000001, Type=ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum), + ClusterObjectFieldDescriptor(Label="scheduleProgrammingVisibility", Tag=0x00000002, Type=typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + temperatureDisplayMode: 'ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum' = None + keypadLockout: 'ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum' = None + scheduleProgrammingVisibility: 'typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class KeypadLockoutEnum(MatterIntEnum): + kNoLockout = 0x00 + kLockout1 = 0x01 + kLockout2 = 0x02 + kLockout3 = 0x03 + kLockout4 = 0x04 + kLockout5 = 0x05 + # 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 = 6, + + class ScheduleProgrammingVisibilityEnum(MatterIntEnum): + kScheduleProgrammingPermitted = 0x00 + kScheduleProgrammingDenied = 0x01 + # 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 = 2, + + class TemperatureDisplayModeEnum(MatterIntEnum): + kCelsius = 0x00 + kFahrenheit = 0x01 + # 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 = 2, + + class Attributes: + @dataclass + class TemperatureDisplayMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000204 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum) + + value: 'ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum' = 0 + + @dataclass + class KeypadLockout(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000029 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum) - value: 'typing.Optional[uint]' = None + value: 'ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum' = 0 @dataclass - class SetpointChangeSource(ClusterAttributeDescriptor): + class ScheduleProgrammingVisibility(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000030 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]' = None @dataclass - class SetpointChangeAmount(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000031 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class SetpointChangeSourceTimestamp(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000032 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OccupiedSetback(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000034 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OccupiedSetbackMin(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000035 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OccupiedSetbackMax(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000036 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 @dataclass - class UnoccupiedSetback(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000037 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 + + +@dataclass +class ColorControl(Cluster): + id: typing.ClassVar[int] = 0x00000300 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="currentHue", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentSaturation", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="remainingTime", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentX", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentY", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="driftCompensation", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="compensationText", Tag=0x00000006, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorMode", Tag=0x00000008, Type=uint), + ClusterObjectFieldDescriptor(Label="options", Tag=0x0000000F, Type=uint), + ClusterObjectFieldDescriptor(Label="numberOfPrimaries", Tag=0x00000010, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary1X", Tag=0x00000011, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary1Y", Tag=0x00000012, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary1Intensity", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary2X", Tag=0x00000015, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary2Y", Tag=0x00000016, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary2Intensity", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary3X", Tag=0x00000019, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary3Y", Tag=0x0000001A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary3Intensity", Tag=0x0000001B, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary4X", Tag=0x00000020, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary4Y", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary4Intensity", Tag=0x00000022, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary5X", Tag=0x00000024, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary5Y", Tag=0x00000025, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary5Intensity", Tag=0x00000026, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="primary6X", Tag=0x00000028, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary6Y", Tag=0x00000029, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="primary6Intensity", Tag=0x0000002A, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="whitePointX", Tag=0x00000030, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="whitePointY", Tag=0x00000031, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointRX", Tag=0x00000032, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointRY", Tag=0x00000033, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointRIntensity", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="colorPointGX", Tag=0x00000036, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointGY", Tag=0x00000037, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointGIntensity", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="colorPointBX", Tag=0x0000003A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointBY", Tag=0x0000003B, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorPointBIntensity", Tag=0x0000003C, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="enhancedCurrentHue", Tag=0x00004000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="enhancedColorMode", Tag=0x00004001, Type=uint), + ClusterObjectFieldDescriptor(Label="colorLoopActive", Tag=0x00004002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorLoopDirection", Tag=0x00004003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorLoopTime", Tag=0x00004004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorLoopStartEnhancedHue", Tag=0x00004005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorLoopStoredEnhancedHue", Tag=0x00004006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorCapabilities", Tag=0x0000400A, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTempPhysicalMinMireds", Tag=0x0000400B, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorTempPhysicalMaxMireds", Tag=0x0000400C, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="coupleColorTempToLevelMinMireds", Tag=0x0000400D, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startUpColorTemperatureMireds", Tag=0x00004010, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + currentHue: 'typing.Optional[uint]' = None + currentSaturation: 'typing.Optional[uint]' = None + remainingTime: 'typing.Optional[uint]' = None + currentX: 'typing.Optional[uint]' = None + currentY: 'typing.Optional[uint]' = None + driftCompensation: 'typing.Optional[uint]' = None + compensationText: 'typing.Optional[str]' = None + colorTemperatureMireds: 'typing.Optional[uint]' = None + colorMode: 'uint' = None + options: 'uint' = None + numberOfPrimaries: 'typing.Union[Nullable, uint]' = None + primary1X: 'typing.Optional[uint]' = None + primary1Y: 'typing.Optional[uint]' = None + primary1Intensity: 'typing.Union[None, Nullable, uint]' = None + primary2X: 'typing.Optional[uint]' = None + primary2Y: 'typing.Optional[uint]' = None + primary2Intensity: 'typing.Union[None, Nullable, uint]' = None + primary3X: 'typing.Optional[uint]' = None + primary3Y: 'typing.Optional[uint]' = None + primary3Intensity: 'typing.Union[None, Nullable, uint]' = None + primary4X: 'typing.Optional[uint]' = None + primary4Y: 'typing.Optional[uint]' = None + primary4Intensity: 'typing.Union[None, Nullable, uint]' = None + primary5X: 'typing.Optional[uint]' = None + primary5Y: 'typing.Optional[uint]' = None + primary5Intensity: 'typing.Union[None, Nullable, uint]' = None + primary6X: 'typing.Optional[uint]' = None + primary6Y: 'typing.Optional[uint]' = None + primary6Intensity: 'typing.Union[None, Nullable, uint]' = None + whitePointX: 'typing.Optional[uint]' = None + whitePointY: 'typing.Optional[uint]' = None + colorPointRX: 'typing.Optional[uint]' = None + colorPointRY: 'typing.Optional[uint]' = None + colorPointRIntensity: 'typing.Union[None, Nullable, uint]' = None + colorPointGX: 'typing.Optional[uint]' = None + colorPointGY: 'typing.Optional[uint]' = None + colorPointGIntensity: 'typing.Union[None, Nullable, uint]' = None + colorPointBX: 'typing.Optional[uint]' = None + colorPointBY: 'typing.Optional[uint]' = None + colorPointBIntensity: 'typing.Union[None, Nullable, uint]' = None + enhancedCurrentHue: 'typing.Optional[uint]' = None + enhancedColorMode: 'uint' = None + colorLoopActive: 'typing.Optional[uint]' = None + colorLoopDirection: 'typing.Optional[uint]' = None + colorLoopTime: 'typing.Optional[uint]' = None + colorLoopStartEnhancedHue: 'typing.Optional[uint]' = None + colorLoopStoredEnhancedHue: 'typing.Optional[uint]' = None + colorCapabilities: 'uint' = None + colorTempPhysicalMinMireds: 'typing.Optional[uint]' = None + colorTempPhysicalMaxMireds: 'typing.Optional[uint]' = None + coupleColorTempToLevelMinMireds: 'typing.Optional[uint]' = None + startUpColorTemperatureMireds: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ColorLoopAction(MatterIntEnum): + kDeactivate = 0x00 + kActivateFromColorLoopStartEnhancedHue = 0x01 + kActivateFromEnhancedCurrentHue = 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, + + class ColorLoopDirection(MatterIntEnum): + kDecrementHue = 0x00 + kIncrementHue = 0x01 + # 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 = 2, + + class ColorMode(MatterIntEnum): + kCurrentHueAndCurrentSaturation = 0x00 + kCurrentXAndCurrentY = 0x01 + kColorTemperature = 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, + + class HueDirection(MatterIntEnum): + kShortestDistance = 0x00 + kLongestDistance = 0x01 + kUp = 0x02 + kDown = 0x03 + # 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 = 4, + + class HueMoveMode(MatterIntEnum): + kStop = 0x00 + kUp = 0x01 + kDown = 0x03 + # 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 = 2, + + class HueStepMode(MatterIntEnum): + kUp = 0x01 + kDown = 0x03 + # 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 = 0, + + class SaturationMoveMode(MatterIntEnum): + kStop = 0x00 + kUp = 0x01 + kDown = 0x03 + # 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 = 2, + + class SaturationStepMode(MatterIntEnum): + kUp = 0x01 + kDown = 0x03 + # 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 = 0, + + class Bitmaps: + class ColorCapabilities(IntFlag): + kHueSaturationSupported = 0x1 + kEnhancedHueSupported = 0x2 + kColorLoopSupported = 0x4 + kXYAttributesSupported = 0x8 + kColorTemperatureSupported = 0x10 + + class ColorLoopUpdateFlags(IntFlag): + kUpdateAction = 0x1 + kUpdateDirection = 0x2 + kUpdateTime = 0x4 + kUpdateStartHue = 0x8 + class Feature(IntFlag): + kHueAndSaturation = 0x1 + kEnhancedHue = 0x2 + kColorLoop = 0x4 + kXy = 0x8 + kColorTemperature = 0x10 + + class Commands: @dataclass - class UnoccupiedSetbackMin(ClusterAttributeDescriptor): + class MoveToHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="hue", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) + + hue: 'uint' = 0 + direction: 'ColorControl.Enums.HueDirection' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class MoveHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000038 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) + + moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + rate: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class StepHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepSize: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class UnoccupiedSetbackMax(ClusterAttributeDescriptor): + class MoveToSaturation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="saturation", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) + + saturation: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class MoveSaturation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000039 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.SaturationMoveMode), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) + + moveMode: 'ColorControl.Enums.SaturationMoveMode' = 0 + rate: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class StepSaturation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.SaturationStepMode), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + stepMode: 'ColorControl.Enums.SaturationStepMode' = 0 + stepSize: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class EmergencyHeatDelta(ClusterAttributeDescriptor): + class MoveToHueAndSaturation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="hue", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="saturation", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) + + hue: 'uint' = 0 + saturation: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class MoveToColor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000003A + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="colorX", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="colorY", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) + + colorX: 'uint' = 0 + colorY: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class MoveColor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="rateX", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="rateY", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + rateX: 'int' = 0 + rateY: 'int' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000040 + class StepColor(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepX", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="stepY", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + stepX: 'int' = 0 + stepY: 'int' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACCapacity(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000041 + class MoveToColorTemperature(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + colorTemperatureMireds: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACRefrigerantType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000042 + class EnhancedMoveToHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000040 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="enhancedHue", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + enhancedHue: 'uint' = 0 + direction: 'ColorControl.Enums.HueDirection' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACCompressorType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000043 + class EnhancedMoveHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000041 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + rate: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACErrorCode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000044 + class EnhancedStepHue(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000042 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepSize: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACLouverPosition(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000045 + class EnhancedMoveToHueAndSaturation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000043 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="enhancedHue", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="saturation", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + enhancedHue: 'uint' = 0 + saturation: 'uint' = 0 + transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACCoilTemperature(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000046 + class ColorLoopSet(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000044 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="updateFlags", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="action", Tag=1, Type=ColorControl.Enums.ColorLoopAction), + ClusterObjectFieldDescriptor(Label="direction", Tag=2, Type=ColorControl.Enums.ColorLoopDirection), + ClusterObjectFieldDescriptor(Label="time", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="startHue", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), + ]) - value: 'typing.Union[None, Nullable, int]' = None + updateFlags: 'uint' = 0 + action: 'ColorControl.Enums.ColorLoopAction' = 0 + direction: 'ColorControl.Enums.ColorLoopDirection' = 0 + time: 'uint' = 0 + startHue: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class ACCapacityformat(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000047 + class StopMoveStep(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x00000047 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 + class MoveColorTemperature(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x0000004B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTemperatureMaximumMireds", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=5, Type=uint), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + rate: 'uint' = 0 + colorTemperatureMinimumMireds: 'uint' = 0 + colorTemperatureMaximumMireds: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 + class StepColorTemperature(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000300 + command_id: typing.ClassVar[int] = 0x0000004C + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTemperatureMaximumMireds", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepSize: 'uint' = 0 + transitionTime: 'uint' = 0 + colorTemperatureMinimumMireds: 'uint' = 0 + colorTemperatureMaximumMireds: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + class Attributes: @dataclass - class EventList(ClusterAttributeDescriptor): + class CurrentHue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class CurrentSaturation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class RemainingTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class CurrentX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000201 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class FanControl(Cluster): - id: typing.ClassVar[int] = 0x00000202 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=FanControl.Enums.FanModeEnum), - ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=FanControl.Enums.FanModeSequenceEnum), - ClusterObjectFieldDescriptor(Label="percentSetting", Tag=0x00000002, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="percentCurrent", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="speedMax", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="speedSetting", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="speedCurrent", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rockSupport", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rockSetting", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="windSupport", Tag=0x00000009, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="windSetting", Tag=0x0000000A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="airflowDirection", Tag=0x0000000B, Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - fanMode: 'FanControl.Enums.FanModeEnum' = None - fanModeSequence: 'FanControl.Enums.FanModeSequenceEnum' = None - percentSetting: 'typing.Union[Nullable, uint]' = None - percentCurrent: 'uint' = None - speedMax: 'typing.Optional[uint]' = None - speedSetting: 'typing.Union[None, Nullable, uint]' = None - speedCurrent: 'typing.Optional[uint]' = None - rockSupport: 'typing.Optional[uint]' = None - rockSetting: 'typing.Optional[uint]' = None - windSupport: 'typing.Optional[uint]' = None - windSetting: 'typing.Optional[uint]' = None - airflowDirection: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class AirflowDirectionEnum(MatterIntEnum): - kForward = 0x00 - kReverse = 0x01 - # 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 = 2, - - class FanModeEnum(MatterIntEnum): - kOff = 0x00 - kLow = 0x01 - kMedium = 0x02 - kHigh = 0x03 - kOn = 0x04 - kAuto = 0x05 - kSmart = 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, - - class FanModeSequenceEnum(MatterIntEnum): - kOffLowMedHigh = 0x00 - kOffLowHigh = 0x01 - kOffLowMedHighAuto = 0x02 - kOffLowHighAuto = 0x03 - kOffHighAuto = 0x04 - kOffHigh = 0x05 - # 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 = 6, - - class StepDirectionEnum(MatterIntEnum): - kIncrease = 0x00 - kDecrease = 0x01 - # 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 = 2, - - class Bitmaps: - class Feature(IntFlag): - kMultiSpeed = 0x1 - kAuto = 0x2 - kRocking = 0x4 - kWind = 0x8 - kStep = 0x10 - kAirflowDirection = 0x20 - - class RockBitmap(IntFlag): - kRockLeftRight = 0x1 - kRockUpDown = 0x2 - kRockRound = 0x4 - - class WindBitmap(IntFlag): - kSleepWind = 0x1 - kNaturalWind = 0x2 - - class Commands: - @dataclass - class Step(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000202 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="direction", Tag=0, Type=FanControl.Enums.StepDirectionEnum), - ClusterObjectFieldDescriptor(Label="wrap", Tag=1, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="lowestOff", Tag=2, Type=typing.Optional[bool]), - ]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - direction: 'FanControl.Enums.StepDirectionEnum' = 0 - wrap: 'typing.Optional[bool]' = None - lowestOff: 'typing.Optional[bool]' = None + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class FanMode(ClusterAttributeDescriptor): + class CurrentY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'FanControl.Enums.FanModeEnum' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class FanModeSequence(ClusterAttributeDescriptor): + class DriftCompensation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'FanControl.Enums.FanModeSequenceEnum' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class PercentSetting(ClusterAttributeDescriptor): + class CompensationText(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[str]' = None @dataclass - class PercentCurrent(ClusterAttributeDescriptor): + class ColorTemperatureMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class SpeedMax(ClusterAttributeDescriptor): + class ColorMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class SpeedSetting(ClusterAttributeDescriptor): + class Options(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x0000000F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 @dataclass - class SpeedCurrent(ClusterAttributeDescriptor): + class NumberOfPrimaries(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class RockSupport(ClusterAttributeDescriptor): + class Primary1X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25931,14 +31371,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class RockSetting(ClusterAttributeDescriptor): + class Primary1Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25947,30 +31387,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class WindSupport(ClusterAttributeDescriptor): + class Primary1Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000009 + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class WindSetting(ClusterAttributeDescriptor): + class Primary2X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000A + return 0x00000015 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -25979,189 +31419,158 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class AirflowDirection(ClusterAttributeDescriptor): + class Primary2Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000B + return 0x00000016 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None + value: 'typing.Optional[uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class Primary2Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000017 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class Primary3X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000019 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class Primary3Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x0000001A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class Primary3Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x0000001B @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class Primary4X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000020 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class Primary4Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000202 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000021 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class ThermostatUserInterfaceConfiguration(Cluster): - id: typing.ClassVar[int] = 0x00000204 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="temperatureDisplayMode", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="keypadLockout", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="scheduleProgrammingVisibility", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - temperatureDisplayMode: 'uint' = None - keypadLockout: 'uint' = None - scheduleProgrammingVisibility: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class TemperatureDisplayMode(ClusterAttributeDescriptor): + class Primary4Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000022 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class KeypadLockout(ClusterAttributeDescriptor): + class Primary5X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000024 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ScheduleProgrammingVisibility(ClusterAttributeDescriptor): + class Primary5Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000025 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -26170,788 +31579,398 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class Primary5Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000026 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class Primary6X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000028 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class Primary6Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000029 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class Primary6Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x0000002A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class WhitePointX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000030 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class WhitePointY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000204 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000031 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class ColorControl(Cluster): - id: typing.ClassVar[int] = 0x00000300 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="currentHue", Tag=0x00000000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentSaturation", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="remainingTime", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentX", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentY", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="driftCompensation", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="compensationText", Tag=0x00000006, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorMode", Tag=0x00000008, Type=uint), - ClusterObjectFieldDescriptor(Label="options", Tag=0x0000000F, Type=uint), - ClusterObjectFieldDescriptor(Label="numberOfPrimaries", Tag=0x00000010, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary1X", Tag=0x00000011, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary1Y", Tag=0x00000012, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary1Intensity", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary2X", Tag=0x00000015, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary2Y", Tag=0x00000016, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary2Intensity", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary3X", Tag=0x00000019, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary3Y", Tag=0x0000001A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary3Intensity", Tag=0x0000001B, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary4X", Tag=0x00000020, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary4Y", Tag=0x00000021, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary4Intensity", Tag=0x00000022, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary5X", Tag=0x00000024, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary5Y", Tag=0x00000025, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary5Intensity", Tag=0x00000026, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="primary6X", Tag=0x00000028, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary6Y", Tag=0x00000029, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="primary6Intensity", Tag=0x0000002A, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="whitePointX", Tag=0x00000030, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="whitePointY", Tag=0x00000031, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointRX", Tag=0x00000032, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointRY", Tag=0x00000033, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointRIntensity", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="colorPointGX", Tag=0x00000036, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointGY", Tag=0x00000037, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointGIntensity", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="colorPointBX", Tag=0x0000003A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointBY", Tag=0x0000003B, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorPointBIntensity", Tag=0x0000003C, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="enhancedCurrentHue", Tag=0x00004000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="enhancedColorMode", Tag=0x00004001, Type=uint), - ClusterObjectFieldDescriptor(Label="colorLoopActive", Tag=0x00004002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorLoopDirection", Tag=0x00004003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorLoopTime", Tag=0x00004004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorLoopStartEnhancedHue", Tag=0x00004005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorLoopStoredEnhancedHue", Tag=0x00004006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorCapabilities", Tag=0x0000400A, Type=uint), - ClusterObjectFieldDescriptor(Label="colorTempPhysicalMinMireds", Tag=0x0000400B, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorTempPhysicalMaxMireds", Tag=0x0000400C, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="coupleColorTempToLevelMinMireds", Tag=0x0000400D, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startUpColorTemperatureMireds", Tag=0x00004010, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - currentHue: 'typing.Optional[uint]' = None - currentSaturation: 'typing.Optional[uint]' = None - remainingTime: 'typing.Optional[uint]' = None - currentX: 'typing.Optional[uint]' = None - currentY: 'typing.Optional[uint]' = None - driftCompensation: 'typing.Optional[uint]' = None - compensationText: 'typing.Optional[str]' = None - colorTemperatureMireds: 'typing.Optional[uint]' = None - colorMode: 'uint' = None - options: 'uint' = None - numberOfPrimaries: 'typing.Union[Nullable, uint]' = None - primary1X: 'typing.Optional[uint]' = None - primary1Y: 'typing.Optional[uint]' = None - primary1Intensity: 'typing.Union[None, Nullable, uint]' = None - primary2X: 'typing.Optional[uint]' = None - primary2Y: 'typing.Optional[uint]' = None - primary2Intensity: 'typing.Union[None, Nullable, uint]' = None - primary3X: 'typing.Optional[uint]' = None - primary3Y: 'typing.Optional[uint]' = None - primary3Intensity: 'typing.Union[None, Nullable, uint]' = None - primary4X: 'typing.Optional[uint]' = None - primary4Y: 'typing.Optional[uint]' = None - primary4Intensity: 'typing.Union[None, Nullable, uint]' = None - primary5X: 'typing.Optional[uint]' = None - primary5Y: 'typing.Optional[uint]' = None - primary5Intensity: 'typing.Union[None, Nullable, uint]' = None - primary6X: 'typing.Optional[uint]' = None - primary6Y: 'typing.Optional[uint]' = None - primary6Intensity: 'typing.Union[None, Nullable, uint]' = None - whitePointX: 'typing.Optional[uint]' = None - whitePointY: 'typing.Optional[uint]' = None - colorPointRX: 'typing.Optional[uint]' = None - colorPointRY: 'typing.Optional[uint]' = None - colorPointRIntensity: 'typing.Union[None, Nullable, uint]' = None - colorPointGX: 'typing.Optional[uint]' = None - colorPointGY: 'typing.Optional[uint]' = None - colorPointGIntensity: 'typing.Union[None, Nullable, uint]' = None - colorPointBX: 'typing.Optional[uint]' = None - colorPointBY: 'typing.Optional[uint]' = None - colorPointBIntensity: 'typing.Union[None, Nullable, uint]' = None - enhancedCurrentHue: 'typing.Optional[uint]' = None - enhancedColorMode: 'uint' = None - colorLoopActive: 'typing.Optional[uint]' = None - colorLoopDirection: 'typing.Optional[uint]' = None - colorLoopTime: 'typing.Optional[uint]' = None - colorLoopStartEnhancedHue: 'typing.Optional[uint]' = None - colorLoopStoredEnhancedHue: 'typing.Optional[uint]' = None - colorCapabilities: 'uint' = None - colorTempPhysicalMinMireds: 'typing.Optional[uint]' = None - colorTempPhysicalMaxMireds: 'typing.Optional[uint]' = None - coupleColorTempToLevelMinMireds: 'typing.Optional[uint]' = None - startUpColorTemperatureMireds: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class ColorLoopAction(MatterIntEnum): - kDeactivate = 0x00 - kActivateFromColorLoopStartEnhancedHue = 0x01 - kActivateFromEnhancedCurrentHue = 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, - - class ColorLoopDirection(MatterIntEnum): - kDecrementHue = 0x00 - kIncrementHue = 0x01 - # 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 = 2, - - class ColorMode(MatterIntEnum): - kCurrentHueAndCurrentSaturation = 0x00 - kCurrentXAndCurrentY = 0x01 - kColorTemperature = 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, - - class HueDirection(MatterIntEnum): - kShortestDistance = 0x00 - kLongestDistance = 0x01 - kUp = 0x02 - kDown = 0x03 - # 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 = 4, - - class HueMoveMode(MatterIntEnum): - kStop = 0x00 - kUp = 0x01 - kDown = 0x03 - # 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 = 2, - - class HueStepMode(MatterIntEnum): - kUp = 0x01 - kDown = 0x03 - # 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 = 0, - - class SaturationMoveMode(MatterIntEnum): - kStop = 0x00 - kUp = 0x01 - kDown = 0x03 - # 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 = 2, - - class SaturationStepMode(MatterIntEnum): - kUp = 0x01 - kDown = 0x03 - # 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 = 0, - - class Bitmaps: - class ColorCapabilities(IntFlag): - kHueSaturationSupported = 0x1 - kEnhancedHueSupported = 0x2 - kColorLoopSupported = 0x4 - kXYAttributesSupported = 0x8 - kColorTemperatureSupported = 0x10 - - class ColorLoopUpdateFlags(IntFlag): - kUpdateAction = 0x1 - kUpdateDirection = 0x2 - kUpdateTime = 0x4 - kUpdateStartHue = 0x8 + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - class Feature(IntFlag): - kHueAndSaturation = 0x1 - kEnhancedHue = 0x2 - kColorLoop = 0x4 - kXy = 0x8 - kColorTemperature = 0x10 + value: 'typing.Optional[uint]' = None - class Commands: @dataclass - class MoveToHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class ColorPointRX(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="hue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) - - hue: 'uint' = 0 - direction: 'ColorControl.Enums.HueDirection' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + def cluster_id(cls) -> int: + return 0x00000300 - @dataclass - class MoveHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000032 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class StepHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointRY(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000033 - stepMode: 'ColorControl.Enums.HueStepMode' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class MoveToSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointRIntensity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="saturation", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000034 - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class MoveSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointGX(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.SaturationMoveMode), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000036 - moveMode: 'ColorControl.Enums.SaturationMoveMode' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class StepSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointGY(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.SaturationStepMode), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000037 - stepMode: 'ColorControl.Enums.SaturationStepMode' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class MoveToHueAndSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointGIntensity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="hue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="saturation", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000038 - hue: 'uint' = 0 - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class MoveToColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000007 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointBX(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="colorX", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="colorY", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000003A - colorX: 'uint' = 0 - colorY: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class MoveColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000008 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointBY(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="rateX", Tag=0, Type=int), - ClusterObjectFieldDescriptor(Label="rateY", Tag=1, Type=int), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000003B - rateX: 'int' = 0 - rateY: 'int' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class StepColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000009 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorPointBIntensity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepX", Tag=0, Type=int), - ClusterObjectFieldDescriptor(Label="stepY", Tag=1, Type=int), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000003C - stepX: 'int' = 0 - stepY: 'int' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class MoveToColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x0000000A - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class EnhancedCurrentHue(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004000 - colorTemperatureMireds: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class EnhancedMoveToHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000040 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class EnhancedColorMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="enhancedHue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004001 - enhancedHue: 'uint' = 0 - direction: 'ColorControl.Enums.HueDirection' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class EnhancedMoveHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000041 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorLoopActive(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004002 - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class EnhancedStepHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000042 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorLoopDirection(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004003 - stepMode: 'ColorControl.Enums.HueStepMode' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class EnhancedMoveToHueAndSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000043 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorLoopTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="enhancedHue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="saturation", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004004 - enhancedHue: 'uint' = 0 - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class ColorLoopSet(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000044 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorLoopStartEnhancedHue(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="updateFlags", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="action", Tag=1, Type=ColorControl.Enums.ColorLoopAction), - ClusterObjectFieldDescriptor(Label="direction", Tag=2, Type=ColorControl.Enums.ColorLoopDirection), - ClusterObjectFieldDescriptor(Label="time", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="startHue", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004005 - updateFlags: 'uint' = 0 - action: 'ColorControl.Enums.ColorLoopAction' = 0 - direction: 'ColorControl.Enums.ColorLoopDirection' = 0 - time: 'uint' = 0 - startHue: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class StopMoveStep(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x00000047 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorLoopStoredEnhancedHue(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00004006 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None @dataclass - class MoveColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x0000004B - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorCapabilities(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="colorTemperatureMaximumMireds", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=5, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000400A - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 - rate: 'uint' = 0 - colorTemperatureMinimumMireds: 'uint' = 0 - colorTemperatureMaximumMireds: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class StepColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000300 - command_id: typing.ClassVar[int] = 0x0000004C - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ColorTempPhysicalMinMireds(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000300 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="colorTemperatureMaximumMireds", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x0000400B - stepMode: 'ColorControl.Enums.HueStepMode' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - colorTemperatureMinimumMireds: 'uint' = 0 - colorTemperatureMaximumMireds: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class CurrentHue(ClusterAttributeDescriptor): + class ColorTempPhysicalMaxMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x0000400C @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -26960,14 +31979,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class CurrentSaturation(ClusterAttributeDescriptor): + class CoupleColorTempToLevelMinMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000400D @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -26976,110 +31995,110 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class RemainingTime(ClusterAttributeDescriptor): + class StartUpColorTemperatureMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00004010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class CurrentX(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class CurrentY(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class DriftCompensation(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class CompensationText(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[str]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ColorTemperatureMireds(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class ColorMode(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27087,15 +32106,76 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + +@dataclass +class BallastConfiguration(Cluster): + id: typing.ClassVar[int] = 0x00000301 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="physicalMinLevel", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="physicalMaxLevel", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="ballastStatus", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minLevel", Tag=0x00000010, Type=uint), + ClusterObjectFieldDescriptor(Label="maxLevel", Tag=0x00000011, Type=uint), + ClusterObjectFieldDescriptor(Label="intrinsicBallastFactor", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="ballastFactorAdjustment", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lampQuantity", Tag=0x00000020, Type=uint), + ClusterObjectFieldDescriptor(Label="lampType", Tag=0x00000030, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="lampManufacturer", Tag=0x00000031, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="lampRatedHours", Tag=0x00000032, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lampBurnHours", Tag=0x00000033, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lampAlarmMode", Tag=0x00000034, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="lampBurnHoursTripPoint", Tag=0x00000035, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + physicalMinLevel: 'uint' = None + physicalMaxLevel: 'uint' = None + ballastStatus: 'typing.Optional[uint]' = None + minLevel: 'uint' = None + maxLevel: 'uint' = None + intrinsicBallastFactor: 'typing.Union[None, Nullable, uint]' = None + ballastFactorAdjustment: 'typing.Union[None, Nullable, uint]' = None + lampQuantity: 'uint' = None + lampType: 'typing.Optional[str]' = None + lampManufacturer: 'typing.Optional[str]' = None + lampRatedHours: 'typing.Union[None, Nullable, uint]' = None + lampBurnHours: 'typing.Union[None, Nullable, uint]' = None + lampAlarmMode: 'typing.Optional[uint]' = None + lampBurnHoursTripPoint: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class BallastStatusBitmap(IntFlag): + kBallastNonOperational = 0x1 + kLampFailure = 0x2 + + class LampAlarmModeBitmap(IntFlag): + kLampBurnHours = 0x1 + + class Attributes: @dataclass - class Options(ClusterAttributeDescriptor): + class PhysicalMinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000F + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27104,30 +32184,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class NumberOfPrimaries(ClusterAttributeDescriptor): + class PhysicalMaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'uint' = 0 @dataclass - class Primary1X(ClusterAttributeDescriptor): + class BallastStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27136,30 +32216,46 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class Primary1Y(ClusterAttributeDescriptor): + class MinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class Primary1Intensity(ClusterAttributeDescriptor): + class MaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x00000011 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class IntrinsicBallastFactor(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000301 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27168,10 +32264,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Primary2X(ClusterAttributeDescriptor): + class BallastFactorAdjustment(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27179,35 +32275,67 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Primary2Y(ClusterAttributeDescriptor): + class LampQuantity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x00000020 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class Primary2Intensity(ClusterAttributeDescriptor): + class LampType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000017 + return 0x00000030 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None + + @dataclass + class LampManufacturer(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000301 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000031 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None + + @dataclass + class LampRatedHours(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000301 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000032 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27216,30 +32344,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Primary3X(ClusterAttributeDescriptor): + class LampBurnHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000019 + return 0x00000033 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Primary3Y(ClusterAttributeDescriptor): + class LampAlarmMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001A + return 0x00000034 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27248,14 +32376,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class Primary3Intensity(ClusterAttributeDescriptor): + class LampBurnHoursTripPoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001B + return 0x00000035 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27264,158 +32392,203 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Primary4X(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000020 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Primary4Y(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000021 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Primary4Intensity(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000022 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Primary5X(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000024 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Primary5Y(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000025 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class Primary5Intensity(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000026 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 + + +@dataclass +class IlluminanceMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000400 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="lightSensorType", Tag=0x00000004, Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + measuredValue: 'typing.Union[Nullable, uint]' = None + minMeasuredValue: 'typing.Union[Nullable, uint]' = None + maxMeasuredValue: 'typing.Union[Nullable, uint]' = None + tolerance: 'typing.Optional[uint]' = None + lightSensorType: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class LightSensorTypeEnum(MatterIntEnum): + kPhotodiode = 0x00 + kCmos = 0x01 + # 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 = 2, + class Attributes: @dataclass - class Primary6X(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000028 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class Primary6Y(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000029 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class Primary6Intensity(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000002A + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class WhitePointX(ClusterAttributeDescriptor): + class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000030 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27424,94 +32597,207 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class WhitePointY(ClusterAttributeDescriptor): + class LightSensorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000031 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None @dataclass - class ColorPointRX(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000032 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class TemperatureMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000402 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + measuredValue: 'typing.Union[Nullable, int]' = None + minMeasuredValue: 'typing.Union[Nullable, int]' = None + maxMeasuredValue: 'typing.Union[Nullable, int]' = None + tolerance: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + class Attributes: @dataclass - class ColorPointRY(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000033 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorPointRIntensity(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000034 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorPointGX(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000036 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorPointGY(ClusterAttributeDescriptor): + class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000037 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27520,94 +32806,94 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class ColorPointGIntensity(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000038 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ColorPointBX(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000003A + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ColorPointBY(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000003B + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ColorPointBIntensity(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000003C + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class EnhancedCurrentHue(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004000 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class EnhancedColorMode(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004001 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27615,79 +32901,110 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class ColorLoopActive(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000300 - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00004002 +@dataclass +class PressureMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000403 - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="scaledValue", Tag=0x00000010, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="minScaledValue", Tag=0x00000011, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxScaledValue", Tag=0x00000012, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="scaledTolerance", Tag=0x00000013, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="scale", Tag=0x00000014, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + measuredValue: 'typing.Union[Nullable, int]' = None + minMeasuredValue: 'typing.Union[Nullable, int]' = None + maxMeasuredValue: 'typing.Union[Nullable, int]' = None + tolerance: 'typing.Optional[uint]' = None + scaledValue: 'typing.Union[None, Nullable, int]' = None + minScaledValue: 'typing.Union[None, Nullable, int]' = None + maxScaledValue: 'typing.Union[None, Nullable, int]' = None + scaledTolerance: 'typing.Optional[uint]' = None + scale: 'typing.Optional[int]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class Feature(IntFlag): + kExtended = 0x1 + class Attributes: @dataclass - class ColorLoopDirection(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004003 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorLoopTime(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004004 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorLoopStartEnhancedHue(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004005 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, int]' = NullValue @dataclass - class ColorLoopStoredEnhancedHue(ClusterAttributeDescriptor): + class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004006 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27696,62 +33013,62 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class ColorCapabilities(ClusterAttributeDescriptor): + class ScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000400A + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class ColorTempPhysicalMinMireds(ClusterAttributeDescriptor): + class MinScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000400B + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class ColorTempPhysicalMaxMireds(ClusterAttributeDescriptor): + class MaxScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000400C + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass - class CoupleColorTempToLevelMinMireds(ClusterAttributeDescriptor): + class ScaledTolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000400D + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -27760,26 +33077,26 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class StartUpColorTemperatureMireds(ClusterAttributeDescriptor): + class Scale(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004010 + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[int]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27795,7 +33112,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27811,7 +33128,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27827,7 +33144,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27843,7 +33160,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27859,7 +33176,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000300 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27873,27 +33190,17 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class BallastConfiguration(Cluster): - id: typing.ClassVar[int] = 0x00000301 +class FlowMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000404 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="physicalMinLevel", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="physicalMaxLevel", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="ballastStatus", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minLevel", Tag=0x00000010, Type=uint), - ClusterObjectFieldDescriptor(Label="maxLevel", Tag=0x00000011, Type=uint), - ClusterObjectFieldDescriptor(Label="intrinsicBallastFactor", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="ballastFactorAdjustment", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lampQuantity", Tag=0x00000020, Type=uint), - ClusterObjectFieldDescriptor(Label="lampType", Tag=0x00000030, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="lampManufacturer", Tag=0x00000031, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="lampRatedHours", Tag=0x00000032, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lampBurnHours", Tag=0x00000033, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lampAlarmMode", Tag=0x00000034, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="lampBurnHoursTripPoint", Tag=0x00000035, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -27902,20 +33209,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - physicalMinLevel: 'uint' = None - physicalMaxLevel: 'uint' = None - ballastStatus: 'typing.Optional[uint]' = None - minLevel: 'uint' = None - maxLevel: 'uint' = None - intrinsicBallastFactor: 'typing.Union[None, Nullable, uint]' = None - ballastFactorAdjustment: 'typing.Union[None, Nullable, uint]' = None - lampQuantity: 'uint' = None - lampType: 'typing.Optional[str]' = None - lampManufacturer: 'typing.Optional[str]' = None - lampRatedHours: 'typing.Union[None, Nullable, uint]' = None - lampBurnHours: 'typing.Union[None, Nullable, uint]' = None - lampAlarmMode: 'typing.Optional[uint]' = None - lampBurnHoursTripPoint: 'typing.Union[None, Nullable, uint]' = None + measuredValue: 'typing.Union[Nullable, uint]' = None + minMeasuredValue: 'typing.Union[Nullable, uint]' = None + maxMeasuredValue: 'typing.Union[Nullable, uint]' = None + tolerance: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -27923,20 +33220,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Bitmaps: - class BallastStatusBitmap(IntFlag): - kBallastNonOperational = 0x1 - kLampFailure = 0x2 - - class LampAlarmModeBitmap(IntFlag): - kLampBurnHours = 0x1 - class Attributes: @dataclass - class PhysicalMinLevel(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27944,15 +33233,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class PhysicalMaxLevel(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27960,15 +33249,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class BallastStatus(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27976,191 +33265,224 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class MinLevel(ClusterAttributeDescriptor): + class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class MaxLevel(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'uint' = 0 + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class IntrinsicBallastFactor(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class BallastFactorAdjustment(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class LampQuantity(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000020 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'uint' = 0 + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class LampType(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000030 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[str]' = None + value: 'uint' = 0 @dataclass - class LampManufacturer(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000031 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[str]' = None + value: 'uint' = 0 + + +@dataclass +class RelativeHumidityMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000405 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + measuredValue: 'typing.Union[Nullable, uint]' = None + minMeasuredValue: 'typing.Union[Nullable, uint]' = None + maxMeasuredValue: 'typing.Union[Nullable, uint]' = None + tolerance: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + class Attributes: @dataclass - class LampRatedHours(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000032 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class LampBurnHours(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000033 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class LampAlarmMode(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000034 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class LampBurnHoursTripPoint(ClusterAttributeDescriptor): + class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000035 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28176,7 +33498,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28192,7 +33514,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28208,7 +33530,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28224,7 +33546,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28240,7 +33562,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000301 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28254,31 +33576,45 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class IlluminanceMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000400 +class OccupancySensing(Cluster): + id: typing.ClassVar[int] = 0x00000406 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="lightSensorType", Tag=0x00000004, Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]), + ClusterObjectFieldDescriptor(Label="occupancy", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="occupancySensorType", Tag=0x00000001, Type=OccupancySensing.Enums.OccupancySensorTypeEnum), + ClusterObjectFieldDescriptor(Label="occupancySensorTypeBitmap", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="PIROccupiedToUnoccupiedDelay", Tag=0x00000010, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedDelay", Tag=0x00000011, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedThreshold", Tag=0x00000012, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ultrasonicOccupiedToUnoccupiedDelay", Tag=0x00000020, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ultrasonicUnoccupiedToOccupiedDelay", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ultrasonicUnoccupiedToOccupiedThreshold", Tag=0x00000022, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="physicalContactOccupiedToUnoccupiedDelay", Tag=0x00000030, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="physicalContactUnoccupiedToOccupiedDelay", Tag=0x00000031, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="physicalContactUnoccupiedToOccupiedThreshold", Tag=0x00000032, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - lightSensorType: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + occupancy: 'uint' = None + occupancySensorType: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = None + occupancySensorTypeBitmap: 'uint' = None + PIROccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None + PIRUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None + PIRUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None + ultrasonicOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None + ultrasonicUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None + ultrasonicUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None + physicalContactOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None + physicalContactUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None + physicalContactUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -28287,21 +33623,32 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class LightSensorTypeEnum(MatterIntEnum): - kPhotodiode = 0x00 - kCmos = 0x01 + class OccupancySensorTypeEnum(MatterIntEnum): + kPir = 0x00 + kUltrasonic = 0x01 + kPIRAndUltrasonic = 0x02 + kPhysicalContact = 0x03 # 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 = 2, + kUnknownEnumValue = 4, + + class Bitmaps: + class OccupancyBitmap(IntFlag): + kOccupied = 0x1 + + class OccupancySensorTypeBitmap(IntFlag): + kPir = 0x1 + kUltrasonic = 0x2 + kPhysicalContact = 0x4 class Attributes: @dataclass - class MeasuredValue(ClusterAttributeDescriptor): + class Occupancy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28309,15 +33656,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'uint' = 0 @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): + class OccupancySensorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28325,15 +33672,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=OccupancySensing.Enums.OccupancySensorTypeEnum) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = 0 @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): + class OccupancySensorTypeBitmap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28341,19 +33688,19 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'uint' = 0 @dataclass - class Tolerance(ClusterAttributeDescriptor): + class PIROccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -28362,207 +33709,126 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class LightSensorType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000400 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]) - - value: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000400 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000400 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): + class PIRUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class PIRUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class UltrasonicOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000020 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class UltrasonicUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000400 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000021 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class TemperatureMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000402 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - measuredValue: 'typing.Union[Nullable, int]' = None - minMeasuredValue: 'typing.Union[Nullable, int]' = None - maxMeasuredValue: 'typing.Union[Nullable, int]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class MeasuredValue(ClusterAttributeDescriptor): + class UltrasonicUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000022 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): + class PhysicalContactOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000030 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): + class PhysicalContactUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000031 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class Tolerance(ClusterAttributeDescriptor): + class PhysicalContactUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000032 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -28574,7 +33840,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28590,7 +33856,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28606,7 +33872,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28622,7 +33888,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28638,7 +33904,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28654,7 +33920,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000402 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28668,22 +33934,24 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class PressureMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000403 +class CarbonMonoxideConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000040C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="scaledValue", Tag=0x00000010, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="minScaledValue", Tag=0x00000011, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="maxScaledValue", Tag=0x00000012, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="scaledTolerance", Tag=0x00000013, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="scale", Tag=0x00000014, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -28692,15 +33960,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, int]' = None - minMeasuredValue: 'typing.Union[Nullable, int]' = None - maxMeasuredValue: 'typing.Union[Nullable, int]' = None - tolerance: 'typing.Optional[uint]' = None - scaledValue: 'typing.Union[None, Nullable, int]' = None - minScaledValue: 'typing.Union[None, Nullable, int]' = None - maxScaledValue: 'typing.Union[None, Nullable, int]' = None - scaledTolerance: 'typing.Optional[uint]' = None - scale: 'typing.Optional[int]' = None + measuredValue: 'typing.Union[None, Nullable, float32]' = None + minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValueWindow: 'typing.Optional[uint]' = None + averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + averageMeasuredValueWindow: 'typing.Optional[uint]' = None + uncertainty: 'typing.Optional[float32]' = None + measurementUnit: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -28708,16 +33978,59 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class LevelValueEnum(MatterIntEnum): + kUnknown = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 + kCritical = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class MeasurementMediumEnum(MatterIntEnum): + kAir = 0x00 + kWater = 0x01 + kSoil = 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, + + class MeasurementUnitEnum(MatterIntEnum): + kPpm = 0x00 + kPpb = 0x01 + kPpt = 0x02 + kMgm3 = 0x03 + kUgm3 = 0x04 + kNgm3 = 0x05 + kPm3 = 0x06 + kBqm3 = 0x07 + # 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 = 8, + class Bitmaps: class Feature(IntFlag): - kExtended = 0x1 + kNumericMeasurement = 0x1 + kLevelIndication = 0x2 + kMediumLevel = 0x4 + kCriticalLevel = 0x8 + kPeakMeasurement = 0x10 + kAverageMeasurement = 0x20 class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28725,15 +34038,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28741,15 +34054,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28757,20 +34070,36 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, int]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class Tolerance(ClusterAttributeDescriptor): + class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: return 0x00000003 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + + value: 'typing.Union[None, Nullable, float32]' = None + + @dataclass + class PeakMeasuredValueWindow(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000040C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) @@ -28778,90 +34107,106 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class ScaledValue(ClusterAttributeDescriptor): + class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class MinScaledValue(ClusterAttributeDescriptor): + class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.Optional[uint]' = None @dataclass - class MaxScaledValue(ClusterAttributeDescriptor): + class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Union[None, Nullable, int]' = None + value: 'typing.Optional[float32]' = None @dataclass - class ScaledTolerance(ClusterAttributeDescriptor): + class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass - class Scale(ClusterAttributeDescriptor): + class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[int]' = None + value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + + @dataclass + class LevelValue(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000040C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]) + + value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28877,7 +34222,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28893,7 +34238,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28909,7 +34254,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28925,7 +34270,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28941,7 +34286,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000403 + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28955,17 +34300,24 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class FlowMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000404 +class CarbonDioxideConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000040D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -28974,23 +34326,77 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: 'typing.Union[None, Nullable, float32]' = None + minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValueWindow: 'typing.Optional[uint]' = None + averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + averageMeasuredValueWindow: 'typing.Optional[uint]' = None + uncertainty: 'typing.Optional[float32]' = None + measurementUnit: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class LevelValueEnum(MatterIntEnum): + kUnknown = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 + kCritical = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class MeasurementMediumEnum(MatterIntEnum): + kAir = 0x00 + kWater = 0x01 + kSoil = 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, + + class MeasurementUnitEnum(MatterIntEnum): + kPpm = 0x00 + kPpb = 0x01 + kPpt = 0x02 + kMgm3 = 0x03 + kUgm3 = 0x04 + kNgm3 = 0x05 + kPm3 = 0x06 + kBqm3 = 0x07 + # 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 = 8, + + class Bitmaps: + class Feature(IntFlag): + kNumericMeasurement = 0x1 + kLevelIndication = 0x2 + kMediumLevel = 0x4 + kCriticalLevel = 0x8 + kPeakMeasurement = 0x10 + kAverageMeasurement = 0x20 class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28998,15 +34404,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29014,15 +34420,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29030,15 +34436,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class Tolerance(ClusterAttributeDescriptor): + class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29046,208 +34452,127 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000404 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000404 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000404 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000404 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class RelativeHumidityMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000405 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class MeasuredValue(ClusterAttributeDescriptor): + class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[float32]' = None @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): + class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): + class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass - class Tolerance(ClusterAttributeDescriptor): + class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29263,7 +34588,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29279,7 +34604,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29295,7 +34620,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29311,7 +34636,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29327,7 +34652,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000405 + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29341,25 +34666,24 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class OccupancySensing(Cluster): - id: typing.ClassVar[int] = 0x00000406 +class NitrogenDioxideConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000413 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="occupancy", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="occupancySensorType", Tag=0x00000001, Type=OccupancySensing.Enums.OccupancySensorTypeEnum), - ClusterObjectFieldDescriptor(Label="occupancySensorTypeBitmap", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="PIROccupiedToUnoccupiedDelay", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedDelay", Tag=0x00000011, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedThreshold", Tag=0x00000012, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ultrasonicOccupiedToUnoccupiedDelay", Tag=0x00000020, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ultrasonicUnoccupiedToOccupiedDelay", Tag=0x00000021, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ultrasonicUnoccupiedToOccupiedThreshold", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="physicalContactOccupiedToUnoccupiedDelay", Tag=0x00000030, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="physicalContactUnoccupiedToOccupiedDelay", Tag=0x00000031, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="physicalContactUnoccupiedToOccupiedThreshold", Tag=0x00000032, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), + ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -29368,18 +34692,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - occupancy: 'uint' = None - occupancySensorType: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = None - occupancySensorTypeBitmap: 'uint' = None - PIROccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - PIRUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - PIRUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None - ultrasonicOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - ultrasonicUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - ultrasonicUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None - physicalContactOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - physicalContactUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - physicalContactUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None + measuredValue: 'typing.Union[None, Nullable, float32]' = None + minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + peakMeasuredValueWindow: 'typing.Optional[uint]' = None + averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None + averageMeasuredValueWindow: 'typing.Optional[uint]' = None + uncertainty: 'typing.Optional[float32]' = None + measurementUnit: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -29388,32 +34711,58 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class OccupancySensorTypeEnum(MatterIntEnum): - kPir = 0x00 - kUltrasonic = 0x01 - kPIRAndUltrasonic = 0x02 - kPhysicalContact = 0x03 + class LevelValueEnum(MatterIntEnum): + kUnknown = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 + kCritical = 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 # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 5, - class Bitmaps: - class OccupancyBitmap(IntFlag): - kOccupied = 0x1 + class MeasurementMediumEnum(MatterIntEnum): + kAir = 0x00 + kWater = 0x01 + kSoil = 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, - class OccupancySensorTypeBitmap(IntFlag): - kPir = 0x1 - kUltrasonic = 0x2 - kPhysicalContact = 0x4 + class MeasurementUnitEnum(MatterIntEnum): + kPpm = 0x00 + kPpb = 0x01 + kPpt = 0x02 + kMgm3 = 0x03 + kUgm3 = 0x04 + kNgm3 = 0x05 + kPm3 = 0x06 + kBqm3 = 0x07 + # 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 = 8, + + class Bitmaps: + class Feature(IntFlag): + kNumericMeasurement = 0x1 + kLevelIndication = 0x2 + kMediumLevel = 0x4 + kCriticalLevel = 0x8 + kPeakMeasurement = 0x10 + kAverageMeasurement = 0x20 class Attributes: @dataclass - class Occupancy(ClusterAttributeDescriptor): + class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29421,15 +34770,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class OccupancySensorType(ClusterAttributeDescriptor): + class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29437,15 +34786,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=OccupancySensing.Enums.OccupancySensorTypeEnum) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = 0 + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class OccupancySensorTypeBitmap(ClusterAttributeDescriptor): + class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29453,51 +34802,35 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class PIROccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000406 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000010 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class PIRUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): + class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class PIRUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): + class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -29506,30 +34839,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class UltrasonicOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): + class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000020 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, float32]' = None @dataclass - class UltrasonicUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): + class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000021 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -29538,74 +34871,74 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class UltrasonicUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): + class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000022 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[float32]' = None @dataclass - class PhysicalContactOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): + class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000030 + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass - class PhysicalContactUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): + class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000031 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass - class PhysicalContactUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): + class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000032 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29621,7 +34954,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29637,7 +34970,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29653,7 +34986,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29669,7 +35002,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29685,7 +35018,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000406 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29699,8 +35032,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class CarbonMonoxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000040C +class OzoneConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x00000415 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29714,9 +35047,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -29733,9 +35066,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -29795,7 +35128,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29811,7 +35144,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29827,7 +35160,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29843,7 +35176,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29859,7 +35192,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29875,7 +35208,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29891,7 +35224,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29907,7 +35240,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29923,7 +35256,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29931,15 +35264,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29947,15 +35280,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29963,15 +35296,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29987,7 +35320,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30003,7 +35336,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30019,7 +35352,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30035,7 +35368,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30051,7 +35384,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040C + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30065,8 +35398,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class CarbonDioxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000040D +class Pm25ConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042A @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30080,9 +35413,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -30099,9 +35432,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -30161,7 +35494,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30177,7 +35510,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30193,7 +35526,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30209,7 +35542,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30225,7 +35558,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30241,7 +35574,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30257,7 +35590,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30273,7 +35606,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30289,7 +35622,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30297,15 +35630,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30313,15 +35646,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30329,15 +35662,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30353,7 +35686,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30369,7 +35702,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30385,7 +35718,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30401,7 +35734,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30417,7 +35750,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000040D + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30431,8 +35764,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class NitrogenDioxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000413 +class FormaldehydeConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30446,9 +35779,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -30465,9 +35798,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -30527,7 +35860,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30543,7 +35876,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30559,7 +35892,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30575,7 +35908,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30591,7 +35924,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30607,7 +35940,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30623,7 +35956,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30639,7 +35972,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30655,7 +35988,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30663,15 +35996,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30679,15 +36012,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30695,15 +36028,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30719,7 +36052,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30735,7 +36068,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30751,7 +36084,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30767,7 +36100,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30783,7 +36116,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000413 + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30797,8 +36130,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class OzoneConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000415 +class Pm1ConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30812,9 +36145,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -30831,9 +36164,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -30893,7 +36226,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30909,7 +36242,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30925,7 +36258,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30941,7 +36274,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30957,7 +36290,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30973,7 +36306,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30989,7 +36322,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31005,7 +36338,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31021,7 +36354,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31029,15 +36362,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31045,15 +36378,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31061,15 +36394,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31085,7 +36418,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31101,7 +36434,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31117,7 +36450,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31133,7 +36466,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31149,7 +36482,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000415 + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31163,8 +36496,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class Pm25ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042A +class Pm10ConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31178,9 +36511,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -31197,9 +36530,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -31259,7 +36592,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31275,7 +36608,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31291,7 +36624,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31307,7 +36640,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31323,7 +36656,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31339,7 +36672,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31355,7 +36688,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31371,7 +36704,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31387,7 +36720,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31395,15 +36728,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31411,15 +36744,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31427,15 +36760,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31451,7 +36784,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31467,7 +36800,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31483,7 +36816,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31499,7 +36832,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31515,7 +36848,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042A + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31529,8 +36862,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class FormaldehydeConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042B +class TotalVolatileOrganicCompoundsConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31544,9 +36877,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -31563,9 +36896,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -31625,7 +36958,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31641,7 +36974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31657,7 +36990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31673,7 +37006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31689,7 +37022,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31705,7 +37038,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31721,7 +37054,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31737,7 +37070,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31753,7 +37086,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31761,15 +37094,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31777,15 +37110,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31793,15 +37126,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31817,7 +37150,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31833,7 +37166,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31849,7 +37182,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31865,7 +37198,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31881,7 +37214,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042B + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31895,8 +37228,8 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class Pm1ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042C +class RadonConcentrationMeasurement(Cluster): + id: typing.ClassVar[int] = 0x0000042F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31910,9 +37243,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]), + ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]), + ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -31929,9 +37262,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None averageMeasuredValueWindow: 'typing.Optional[uint]' = None uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None + measurementUnit: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + measurementMedium: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + levelValue: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -31991,7 +37324,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32007,7 +37340,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32023,7 +37356,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32039,7 +37372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32055,7 +37388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32071,7 +37404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32087,7 +37420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32103,7 +37436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32119,7 +37452,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32127,15 +37460,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32143,15 +37476,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None @dataclass class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32159,15 +37492,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32183,7 +37516,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32199,7 +37532,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32215,7 +37548,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32231,7 +37564,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32247,7 +37580,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042C + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32261,24 +37594,15 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class Pm10ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042D +class WakeOnLan(Cluster): + id: typing.ClassVar[int] = 0x00000503 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="MACAddress", Tag=0x00000000, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="linkLocalAddress", Tag=0x00000001, Type=typing.Optional[bytes]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -32287,17 +37611,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None + MACAddress: 'typing.Optional[str]' = None + linkLocalAddress: 'typing.Optional[bytes]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -32305,235 +37620,587 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class LevelValueEnum(MatterIntEnum): - kUnknown = 0x00 - kLow = 0x01 - kMedium = 0x02 - kHigh = 0x03 - kCritical = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, + class Attributes: + @dataclass + class MACAddress(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000503 - class MeasurementMediumEnum(MatterIntEnum): - kAir = 0x00 - kWater = 0x01 - kSoil = 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, + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 - class MeasurementUnitEnum(MatterIntEnum): - kPpm = 0x00 - kPpb = 0x01 - kPpt = 0x02 - kMgm3 = 0x03 - kUgm3 = 0x04 - kNgm3 = 0x05 - kPm3 = 0x06 - kBqm3 = 0x07 - # 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 = 8, + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - class Bitmaps: - class Feature(IntFlag): - kNumericMeasurement = 0x1 - kLevelIndication = 0x2 - kMediumLevel = 0x4 - kCriticalLevel = 0x8 - kPeakMeasurement = 0x10 - kAverageMeasurement = 0x20 + value: 'typing.Optional[str]' = None - class Attributes: @dataclass - class MeasuredValue(ClusterAttributeDescriptor): + class LinkLocalAddress(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'typing.Optional[bytes]' = None @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class PeakMeasuredValue(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class PeakMeasuredValueWindow(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class AverageMeasuredValue(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'uint' = 0 @dataclass - class AverageMeasuredValueWindow(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 + + +@dataclass +class Channel(Cluster): + id: typing.ClassVar[int] = 0x00000504 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]), + ClusterObjectFieldDescriptor(Label="lineup", Tag=0x00000001, Type=typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]), + ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None + lineup: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None + currentChannel: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ChannelTypeEnum(MatterIntEnum): + kSatellite = 0x00 + kCable = 0x01 + kTerrestrial = 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, + + class LineupInfoTypeEnum(MatterIntEnum): + kMso = 0x00 + # 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 = 1, + + class StatusEnum(MatterIntEnum): + kSuccess = 0x00 + kMultipleMatches = 0x01 + kNoMatches = 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, + + class Bitmaps: + class Feature(IntFlag): + kChannelList = 0x1 + kLineupInfo = 0x2 + kElectronicGuide = 0x3 + kRecordProgram = 0x4 + + class RecordingFlagBitmap(IntFlag): + kScheduled = 0x1 + kRecordSeries = 0x2 + kRecorded = 0x3 + + class Structs: + @dataclass + class ProgramCastStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="role", Tag=1, Type=str), + ]) + + name: 'str' = "" + role: 'str' = "" + + @dataclass + class ProgramCategoryStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="category", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="subCategory", Tag=1, Type=typing.Optional[str]), + ]) + + category: 'str' = "" + subCategory: 'typing.Optional[str]' = None + + @dataclass + class SeriesInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="season", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="episode", Tag=1, Type=str), + ]) + + season: 'str' = "" + episode: 'str' = "" + + @dataclass + class ChannelInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="callSign", Tag=3, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="identifier", Tag=5, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="type", Tag=6, Type=typing.Optional[Channel.Enums.ChannelTypeEnum]), + ]) + + majorNumber: 'uint' = 0 + minorNumber: 'uint' = 0 + name: 'typing.Optional[str]' = None + callSign: 'typing.Optional[str]' = None + affiliateCallSign: 'typing.Optional[str]' = None + identifier: 'typing.Optional[str]' = None + type: 'typing.Optional[Channel.Enums.ChannelTypeEnum]' = None + + @dataclass + class ProgramStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="identifier", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="channel", Tag=1, Type=Channel.Structs.ChannelInfoStruct), + ClusterObjectFieldDescriptor(Label="startTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="endTime", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="title", Tag=4, Type=str), + ClusterObjectFieldDescriptor(Label="subtitle", Tag=5, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="description", Tag=6, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="audioLanguages", Tag=7, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="ratings", Tag=8, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="thumbnailUrl", Tag=9, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="posterArtUrl", Tag=10, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="dvbiUrl", Tag=11, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="releaseDate", Tag=12, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="parentalGuidanceText", Tag=13, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="recordingFlag", Tag=14, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="seriesInfo", Tag=15, Type=typing.Union[None, Nullable, Channel.Structs.SeriesInfoStruct]), + ClusterObjectFieldDescriptor(Label="categoryList", Tag=16, Type=typing.Optional[typing.List[Channel.Structs.ProgramCategoryStruct]]), + ClusterObjectFieldDescriptor(Label="castList", Tag=17, Type=typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=18, Type=typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]), + ]) + + identifier: 'str' = "" + channel: 'Channel.Structs.ChannelInfoStruct' = field(default_factory=lambda: Channel.Structs.ChannelInfoStruct()) + startTime: 'uint' = 0 + endTime: 'uint' = 0 + title: 'str' = "" + subtitle: 'typing.Optional[str]' = None + description: 'typing.Optional[str]' = None + audioLanguages: 'typing.Optional[typing.List[str]]' = None + ratings: 'typing.Optional[typing.List[str]]' = None + thumbnailUrl: 'typing.Optional[str]' = None + posterArtUrl: 'typing.Optional[str]' = None + dvbiUrl: 'typing.Optional[str]' = None + releaseDate: 'typing.Optional[str]' = None + parentalGuidanceText: 'typing.Optional[str]' = None + recordingFlag: 'typing.Optional[uint]' = None + seriesInfo: 'typing.Union[None, Nullable, Channel.Structs.SeriesInfoStruct]' = None + categoryList: 'typing.Optional[typing.List[Channel.Structs.ProgramCategoryStruct]]' = None + castList: 'typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]' = None + externalIDList: 'typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]' = None + + @dataclass + class PageTokenStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="limit", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="after", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="before", Tag=2, Type=typing.Optional[str]), + ]) + + limit: 'typing.Optional[uint]' = None + after: 'typing.Optional[str]' = None + before: 'typing.Optional[str]' = None + + @dataclass + class ChannelPagingStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="previousToken", Tag=0, Type=typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]), + ClusterObjectFieldDescriptor(Label="nextToken", Tag=1, Type=typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]), + ]) + + previousToken: 'typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]' = None + nextToken: 'typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]' = None + + @dataclass + class AdditionalInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), + ]) + + name: 'str' = "" + value: 'str' = "" + + @dataclass + class LineupInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="operatorName", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="lineupName", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="postalCode", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=3, Type=Channel.Enums.LineupInfoTypeEnum), + ]) + + operatorName: 'str' = "" + lineupName: 'typing.Optional[str]' = None + postalCode: 'typing.Optional[str]' = None + lineupInfoType: 'Channel.Enums.LineupInfoTypeEnum' = 0 + + class Commands: + @dataclass + class ChangeChannel(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeChannelResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="match", Tag=0, Type=str), + ]) + + match: 'str' = "" + + @dataclass + class ChangeChannelResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=Channel.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'Channel.Enums.StatusEnum' = 0 + data: 'typing.Optional[str]' = None + + @dataclass + class ChangeChannelByNumber(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), + ]) + + majorNumber: 'uint' = 0 + minorNumber: 'uint' = 0 + + @dataclass + class SkipChannel(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="count", Tag=0, Type=int), + ]) + + count: 'int' = 0 + + @dataclass + class GetProgramGuide(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ProgramGuideResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="startTime", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endTime", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="channelList", Tag=2, Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]), + ClusterObjectFieldDescriptor(Label="pageToken", Tag=3, Type=typing.Optional[Channel.Structs.PageTokenStruct]), + ClusterObjectFieldDescriptor(Label="recordingFlag", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=5, Type=typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]), + ClusterObjectFieldDescriptor(Label="data", Tag=6, Type=typing.Optional[bytes]), + ]) + + startTime: 'typing.Optional[uint]' = None + endTime: 'typing.Optional[uint]' = None + channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None + pageToken: 'typing.Optional[Channel.Structs.PageTokenStruct]' = None + recordingFlag: 'typing.Optional[uint]' = None + externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None + data: 'typing.Optional[bytes]' = None + + @dataclass + class ProgramGuideResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="channelPagingStruct", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="programList", Tag=1, Type=typing.List[Channel.Structs.ProgramStruct]), + ]) + + channelPagingStruct: 'int' = 0 + programList: 'typing.List[Channel.Structs.ProgramStruct]' = field(default_factory=lambda: []) + + @dataclass + class RecordProgram(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="programIdentifier", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="shouldRecordSeries", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[Channel.Structs.AdditionalInfoStruct]), + ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), + ]) + + programIdentifier: 'str' = "" + shouldRecordSeries: 'bool' = False + externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) + data: 'bytes' = b"" @dataclass - class Uncertainty(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 + class CancelRecordProgram(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000504 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="programIdentifier", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="shouldRecordSeries", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[Channel.Structs.AdditionalInfoStruct]), + ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), + ]) - value: 'typing.Optional[float32]' = None + programIdentifier: 'str' = "" + shouldRecordSeries: 'bool' = False + externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) + data: 'bytes' = b"" + class Attributes: @dataclass - class MeasurementUnit(ClusterAttributeDescriptor): + class ChannelList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None @dataclass - class MeasurementMedium(ClusterAttributeDescriptor): + class Lineup(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000009 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None @dataclass - class LevelValue(ClusterAttributeDescriptor): + class CurrentChannel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000A + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32549,7 +38216,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32565,7 +38232,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32581,7 +38248,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32597,7 +38264,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32613,7 +38280,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042D + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32627,24 +38294,15 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class TotalVolatileOrganicCompoundsConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042E +class TargetNavigator(Cluster): + id: typing.ClassVar[int] = 0x00000505 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="targetList", Tag=0x00000000, Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]), + ClusterObjectFieldDescriptor(Label="currentTarget", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -32653,17 +38311,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None + targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = None + currentTarget: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -32672,158 +38321,93 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class LevelValueEnum(MatterIntEnum): - kUnknown = 0x00 - kLow = 0x01 - kMedium = 0x02 - kHigh = 0x03 - kCritical = 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 - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, - - class MeasurementMediumEnum(MatterIntEnum): - kAir = 0x00 - kWater = 0x01 - kSoil = 0x02 + class StatusEnum(MatterIntEnum): + kSuccess = 0x00 + kTargetNotFound = 0x01 + kNotAllowed = 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, - class MeasurementUnitEnum(MatterIntEnum): - kPpm = 0x00 - kPpb = 0x01 - kPpt = 0x02 - kMgm3 = 0x03 - kUgm3 = 0x04 - kNgm3 = 0x05 - kPm3 = 0x06 - kBqm3 = 0x07 - # 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 = 8, - - class Bitmaps: - class Feature(IntFlag): - kNumericMeasurement = 0x1 - kLevelIndication = 0x2 - kMediumLevel = 0x4 - kCriticalLevel = 0x8 - kPeakMeasurement = 0x10 - kAverageMeasurement = 0x20 - - class Attributes: - @dataclass - class MeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - - value: 'typing.Union[None, Nullable, float32]' = None - - @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - - value: 'typing.Union[None, Nullable, float32]' = None - + class Structs: @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - + class TargetInfoStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="identifier", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ]) - value: 'typing.Union[None, Nullable, float32]' = None + identifier: 'uint' = 0 + name: 'str' = "" + class Commands: @dataclass - class PeakMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 + class NavigateTarget(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000505 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'NavigateTargetResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="target", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.Union[None, Nullable, float32]' = None + target: 'uint' = 0 + data: 'typing.Optional[str]' = None @dataclass - class PeakMeasuredValueWindow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 + class NavigateTargetResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000505 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=TargetNavigator.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.Optional[uint]' = None + status: 'TargetNavigator.Enums.StatusEnum' = 0 + data: 'typing.Optional[str]' = None + class Attributes: @dataclass - class AverageMeasuredValue(ClusterAttributeDescriptor): + class TargetList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + return ClusterObjectFieldDescriptor(Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]) - value: 'typing.Union[None, Nullable, float32]' = None + value: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) @dataclass - class AverageMeasuredValueWindow(ClusterAttributeDescriptor): + class CurrentTarget(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -32831,75 +38415,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None - @dataclass - class Uncertainty(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - - value: 'typing.Optional[float32]' = None - - @dataclass - class MeasurementUnit(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000008 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]) - - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - - @dataclass - class MeasurementMedium(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]) - - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - - @dataclass - class LevelValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]) - - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32915,7 +38435,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32931,7 +38451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32947,7 +38467,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32963,7 +38483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32979,7 +38499,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042E + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32991,26 +38511,50 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class TargetUpdated(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000505 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="targetList", Tag=0, Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]), + ClusterObjectFieldDescriptor(Label="currentTarget", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=bytes), + ]) + + targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) + currentTarget: 'uint' = 0 + data: 'bytes' = b"" + @dataclass -class RadonConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0000042F +class MediaPlayback(Cluster): + id: typing.ClassVar[int] = 0x00000506 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="measuredValue", Tag=0x00000000, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="minMeasuredValue", Tag=0x00000001, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="maxMeasuredValue", Tag=0x00000002, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValue", Tag=0x00000003, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="peakMeasuredValueWindow", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValue", Tag=0x00000005, Type=typing.Union[None, Nullable, float32]), - ClusterObjectFieldDescriptor(Label="averageMeasuredValueWindow", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="uncertainty", Tag=0x00000007, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="measurementUnit", Tag=0x00000008, Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]), - ClusterObjectFieldDescriptor(Label="measurementMedium", Tag=0x00000009, Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]), - ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]), + ClusterObjectFieldDescriptor(Label="currentState", Tag=0x00000000, Type=MediaPlayback.Enums.PlaybackStateEnum), + ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=0x00000003, Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]), + ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000004, Type=typing.Optional[float32]), + ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="activeAudioTrack", Tag=0x00000007, Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]), + ClusterObjectFieldDescriptor(Label="availableAudioTracks", Tag=0x00000008, Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]), + ClusterObjectFieldDescriptor(Label="activeTextTrack", Tag=0x00000009, Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]), + ClusterObjectFieldDescriptor(Label="availableTextTracks", Tag=0x0000000A, Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -33019,17 +38563,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None + currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = None + startTime: 'typing.Union[None, Nullable, uint]' = None + duration: 'typing.Union[None, Nullable, uint]' = None + sampledPosition: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None + playbackSpeed: 'typing.Optional[float32]' = None + seekRangeEnd: 'typing.Union[None, Nullable, uint]' = None + seekRangeStart: 'typing.Union[None, Nullable, uint]' = None + activeAudioTrack: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None + availableAudioTracks: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None + activeTextTrack: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None + availableTextTracks: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -33038,391 +38582,509 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class LevelValueEnum(MatterIntEnum): - kUnknown = 0x00 - kLow = 0x01 - kMedium = 0x02 - kHigh = 0x03 - kCritical = 0x04 + class CharacteristicEnum(MatterIntEnum): + kForcedSubtitles = 0x00 + kDescribesVideo = 0x01 + kEasyToRead = 0x02 + kFrameBased = 0x03 + kMainProgram = 0x04 + kOriginalContent = 0x05 + kVoiceOverTranslation = 0x06 + kCaption = 0x07 + kSubtitle = 0x08 + kAlternate = 0x09 + kSupplementary = 0x0A + kCommentary = 0x0B + kDubbedTranslation = 0x0C + kDescription = 0x0D + kMetadata = 0x0E + kEnhancedAudioIntelligibility = 0x0F + kEmergency = 0x10 + kKaraoke = 0x11 # 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 = 5, + kUnknownEnumValue = 18, - class MeasurementMediumEnum(MatterIntEnum): - kAir = 0x00 - kWater = 0x01 - kSoil = 0x02 + class PlaybackStateEnum(MatterIntEnum): + kPlaying = 0x00 + kPaused = 0x01 + kNotPlaying = 0x02 + kBuffering = 0x03 # 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, + kUnknownEnumValue = 4, - class MeasurementUnitEnum(MatterIntEnum): - kPpm = 0x00 - kPpb = 0x01 - kPpt = 0x02 - kMgm3 = 0x03 - kUgm3 = 0x04 - kNgm3 = 0x05 - kPm3 = 0x06 - kBqm3 = 0x07 + class StatusEnum(MatterIntEnum): + kSuccess = 0x00 + kInvalidStateForCommand = 0x01 + kNotAllowed = 0x02 + kNotActive = 0x03 + kSpeedOutOfRange = 0x04 + kSeekOutOfRange = 0x05 # 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 = 8, + kUnknownEnumValue = 6, class Bitmaps: class Feature(IntFlag): - kNumericMeasurement = 0x1 - kLevelIndication = 0x2 - kMediumLevel = 0x4 - kCriticalLevel = 0x8 - kPeakMeasurement = 0x10 - kAverageMeasurement = 0x20 + kAdvancedSeek = 0x1 + kVariableSpeed = 0x2 + kTextTracks = 0x3 + kAudioTracks = 0x4 + kAudioAdvance = 0x5 - class Attributes: + class Structs: @dataclass - class MeasuredValue(ClusterAttributeDescriptor): + class TrackAttributesStruct(ClusterObject): @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="languageCode", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="displayName", Tag=1, Type=typing.Union[None, Nullable, str]), + ]) + + languageCode: 'str' = "" + displayName: 'typing.Union[None, Nullable, str]' = None + @dataclass + class TrackStruct(ClusterObject): @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="id", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="trackAttributes", Tag=1, Type=typing.Union[Nullable, MediaPlayback.Structs.TrackAttributesStruct]), + ]) + + id: 'str' = "" + trackAttributes: 'typing.Union[Nullable, MediaPlayback.Structs.TrackAttributesStruct]' = NullValue + + @dataclass + class PlaybackPositionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="updatedAt", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="position", Tag=1, Type=typing.Union[Nullable, uint]), + ]) + + updatedAt: 'uint' = 0 + position: 'typing.Union[Nullable, uint]' = NullValue + + class Commands: + @dataclass + class Play(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Pause(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Stop(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class StartOver(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - - value: 'typing.Union[None, Nullable, float32]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class MinMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 + class Previous(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - - value: 'typing.Union[None, Nullable, float32]' = None + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class MaxMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F + class Next(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Rewind(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=0, Type=typing.Optional[bool]), + ]) - value: 'typing.Union[None, Nullable, float32]' = None + audioAdvanceUnmuted: 'typing.Optional[bool]' = None @dataclass - class PeakMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 + class FastForward(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=0, Type=typing.Optional[bool]), + ]) - value: 'typing.Union[None, Nullable, float32]' = None + audioAdvanceUnmuted: 'typing.Optional[bool]' = None @dataclass - class PeakMeasuredValueWindow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 + class SkipForward(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + deltaPositionMilliseconds: 'uint' = 0 @dataclass - class AverageMeasuredValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F + class SkipBackward(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000005 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), + ]) + + deltaPositionMilliseconds: 'uint' = 0 + + @dataclass + class PlaybackResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=MediaPlayback.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.Union[None, Nullable, float32]' = None + status: 'MediaPlayback.Enums.StatusEnum' = 0 + data: 'typing.Optional[str]' = None @dataclass - class AverageMeasuredValueWindow(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F + class Seek(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x0000000B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'PlaybackResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000006 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="position", Tag=0, Type=uint), + ]) + + position: 'uint' = 0 + + @dataclass + class ActivateAudioTrack(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x0000000C + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="trackID", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=1, Type=uint), + ]) - value: 'typing.Optional[uint]' = None + trackID: 'str' = "" + audioOutputIndex: 'uint' = 0 @dataclass - class Uncertainty(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F + class ActivateTextTrack(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x0000000D + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="trackID", Tag=0, Type=str), + ]) - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) + trackID: 'str' = "" - value: 'typing.Optional[float32]' = None + @dataclass + class DeactivateTextTrack(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000506 + command_id: typing.ClassVar[int] = 0x0000000E + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + class Attributes: @dataclass - class MeasurementUnit(ClusterAttributeDescriptor): + class CurrentState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]) + return ClusterObjectFieldDescriptor(Type=MediaPlayback.Enums.PlaybackStateEnum) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 @dataclass - class MeasurementMedium(ClusterAttributeDescriptor): + class StartTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000009 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class LevelValue(ClusterAttributeDescriptor): + class Duration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000A + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class SampledPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class PlaybackSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[float32]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class SeekRangeEnd(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class SeekRangeStart(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class ActiveAudioTrack(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class AvailableAudioTracks(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000042F + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class WakeOnLan(Cluster): - id: typing.ClassVar[int] = 0x00000503 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="MACAddress", Tag=0x00000000, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="linkLocalAddress", Tag=0x00000001, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]) - MACAddress: 'typing.Optional[str]' = None - linkLocalAddress: 'typing.Optional[bytes]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None - class Attributes: @dataclass - class MACAddress(ClusterAttributeDescriptor): + class ActiveTextTrack(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]) - value: 'typing.Optional[str]' = None + value: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None @dataclass - class LinkLocalAddress(ClusterAttributeDescriptor): + class AvailableTextTracks(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]) - value: 'typing.Optional[bytes]' = None + value: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33438,7 +39100,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33454,7 +39116,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33470,7 +39132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33486,7 +39148,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33502,7 +39164,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000503 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33514,18 +39176,53 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class StateChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000506 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="currentState", Tag=0, Type=MediaPlayback.Enums.PlaybackStateEnum), + ClusterObjectFieldDescriptor(Label="startTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=3, Type=MediaPlayback.Structs.PlaybackPositionStruct), + ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=4, Type=float32), + ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="data", Tag=7, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=8, Type=bool), + ]) + + currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 + startTime: 'uint' = 0 + duration: 'uint' = 0 + sampledPosition: 'MediaPlayback.Structs.PlaybackPositionStruct' = field(default_factory=lambda: MediaPlayback.Structs.PlaybackPositionStruct()) + playbackSpeed: 'float32' = 0.0 + seekRangeEnd: 'uint' = 0 + seekRangeStart: 'uint' = 0 + data: 'typing.Optional[bytes]' = None + audioAdvanceUnmuted: 'bool' = False + @dataclass -class Channel(Cluster): - id: typing.ClassVar[int] = 0x00000504 +class MediaInput(Cluster): + id: typing.ClassVar[int] = 0x00000507 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]), - ClusterObjectFieldDescriptor(Label="lineup", Tag=0x00000001, Type=typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]), + ClusterObjectFieldDescriptor(Label="inputList", Tag=0x00000000, Type=typing.List[MediaInput.Structs.InputInfoStruct]), + ClusterObjectFieldDescriptor(Label="currentInput", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -33534,9 +39231,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None - lineup: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None - currentChannel: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None + inputList: 'typing.List[MediaInput.Structs.InputInfoStruct]' = None + currentInput: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -33545,104 +39241,80 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class LineupInfoTypeEnum(MatterIntEnum): - kMso = 0x00 - # 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 = 1, - - class StatusEnum(MatterIntEnum): - kSuccess = 0x00 - kMultipleMatches = 0x01 - kNoMatches = 0x02 + class InputTypeEnum(MatterIntEnum): + kInternal = 0x00 + kAux = 0x01 + kCoax = 0x02 + kComposite = 0x03 + kHdmi = 0x04 + kInput = 0x05 + kLine = 0x06 + kOptical = 0x07 + kVideo = 0x08 + kScart = 0x09 + kUsb = 0x0A + kOther = 0x0B # 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, + kUnknownEnumValue = 12, class Bitmaps: class Feature(IntFlag): - kChannelList = 0x1 - kLineupInfo = 0x2 + kNameUpdates = 0x1 class Structs: @dataclass - class ChannelInfoStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="callSign", Tag=3, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=4, Type=typing.Optional[str]), - ]) - - majorNumber: 'uint' = 0 - minorNumber: 'uint' = 0 - name: 'typing.Optional[str]' = None - callSign: 'typing.Optional[str]' = None - affiliateCallSign: 'typing.Optional[str]' = None - - @dataclass - class LineupInfoStruct(ClusterObject): + class InputInfoStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="operatorName", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="lineupName", Tag=1, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="postalCode", Tag=2, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=3, Type=Channel.Enums.LineupInfoTypeEnum), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="inputType", Tag=1, Type=MediaInput.Enums.InputTypeEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="description", Tag=3, Type=str), ]) - operatorName: 'str' = "" - lineupName: 'typing.Optional[str]' = None - postalCode: 'typing.Optional[str]' = None - lineupInfoType: 'Channel.Enums.LineupInfoTypeEnum' = 0 + index: 'uint' = 0 + inputType: 'MediaInput.Enums.InputTypeEnum' = 0 + name: 'str' = "" + description: 'str' = "" class Commands: @dataclass - class ChangeChannel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000504 + class SelectInput(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ChangeChannelResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="match", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), ]) - match: 'str' = "" + index: 'uint' = 0 @dataclass - class ChangeChannelResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000504 + class ShowInputStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=Channel.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'Channel.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None - @dataclass - class ChangeChannelByNumber(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000504 + class HideInputStatus(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33651,16 +39323,11 @@ class ChangeChannelByNumber(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), ]) - majorNumber: 'uint' = 0 - minorNumber: 'uint' = 0 - @dataclass - class SkipChannel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000504 + class RenameInput(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33669,17 +39336,19 @@ class SkipChannel(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="count", Tag=0, Type=int), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), ]) - count: 'int' = 0 + index: 'uint' = 0 + name: 'str' = "" class Attributes: @dataclass - class ChannelList(ClusterAttributeDescriptor): + class InputList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33687,15 +39356,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]) + return ClusterObjectFieldDescriptor(Type=typing.List[MediaInput.Structs.InputInfoStruct]) - value: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None + value: 'typing.List[MediaInput.Structs.InputInfoStruct]' = field(default_factory=lambda: []) @dataclass - class Lineup(ClusterAttributeDescriptor): + class CurrentInput(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33703,31 +39372,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]) - - value: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None - - @dataclass - class CurrentChannel(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000504 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33743,7 +39396,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33759,7 +39412,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33775,7 +39428,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33791,7 +39444,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33807,7 +39460,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000504 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33821,15 +39474,13 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class TargetNavigator(Cluster): - id: typing.ClassVar[int] = 0x00000505 +class LowPower(Cluster): + id: typing.ClassVar[int] = 0x00000508 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="targetList", Tag=0x00000000, Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentTarget", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -33838,8 +39489,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = None - currentTarget: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -33847,106 +39496,26 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class TargetNavigatorStatusEnum(MatterIntEnum): - kSuccess = 0x00 - kTargetNotFound = 0x01 - kNotAllowed = 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, - - class Structs: - @dataclass - class TargetInfoStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="identifier", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ]) - - identifier: 'uint' = 0 - name: 'str' = "" - class Commands: @dataclass - class NavigateTarget(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000505 + class Sleep(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000508 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'NavigateTargetResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="target", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), - ]) - - target: 'uint' = 0 - data: 'typing.Optional[str]' = None - - @dataclass - class NavigateTargetResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000505 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=TargetNavigator.Enums.TargetNavigatorStatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'TargetNavigator.Enums.TargetNavigatorStatusEnum' = 0 - data: 'typing.Optional[str]' = None - class Attributes: - @dataclass - class TargetList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000505 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]) - - value: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) - - @dataclass - class CurrentTarget(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000505 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33962,7 +39531,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33978,7 +39547,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33994,7 +39563,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34010,7 +39579,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34026,7 +39595,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000505 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34040,20 +39609,13 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class MediaPlayback(Cluster): - id: typing.ClassVar[int] = 0x00000506 +class KeypadInput(Cluster): + id: typing.ClassVar[int] = 0x00000509 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="currentState", Tag=0x00000000, Type=MediaPlayback.Enums.PlaybackStateEnum), - ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=0x00000003, Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]), - ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000004, Type=typing.Optional[float32]), - ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -34062,13 +39624,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = None - startTime: 'typing.Union[None, Nullable, uint]' = None - duration: 'typing.Union[None, Nullable, uint]' = None - sampledPosition: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None - playbackSpeed: 'typing.Optional[float32]' = None - seekRangeEnd: 'typing.Union[None, Nullable, uint]' = None - seekRangeStart: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -34077,338 +39632,154 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class PlaybackStateEnum(MatterIntEnum): - kPlaying = 0x00 - kPaused = 0x01 - kNotPlaying = 0x02 - kBuffering = 0x03 + class CECKeyCodeEnum(MatterIntEnum): + kSelect = 0x00 + kUp = 0x01 + kDown = 0x02 + kLeft = 0x03 + kRight = 0x04 + kRightUp = 0x05 + kRightDown = 0x06 + kLeftUp = 0x07 + kLeftDown = 0x08 + kRootMenu = 0x09 + kSetupMenu = 0x0A + kContentsMenu = 0x0B + kFavoriteMenu = 0x0C + kExit = 0x0D + kMediaTopMenu = 0x10 + kMediaContextSensitiveMenu = 0x11 + kNumberEntryMode = 0x1D + kNumber11 = 0x1E + kNumber12 = 0x1F + kNumber0OrNumber10 = 0x20 + kNumbers1 = 0x21 + kNumbers2 = 0x22 + kNumbers3 = 0x23 + kNumbers4 = 0x24 + kNumbers5 = 0x25 + kNumbers6 = 0x26 + kNumbers7 = 0x27 + kNumbers8 = 0x28 + kNumbers9 = 0x29 + kDot = 0x2A + kEnter = 0x2B + kClear = 0x2C + kNextFavorite = 0x2F + kChannelUp = 0x30 + kChannelDown = 0x31 + kPreviousChannel = 0x32 + kSoundSelect = 0x33 + kInputSelect = 0x34 + kDisplayInformation = 0x35 + kHelp = 0x36 + kPageUp = 0x37 + kPageDown = 0x38 + kPower = 0x40 + kVolumeUp = 0x41 + kVolumeDown = 0x42 + kMute = 0x43 + kPlay = 0x44 + kStop = 0x45 + kPause = 0x46 + kRecord = 0x47 + kRewind = 0x48 + kFastForward = 0x49 + kEject = 0x4A + kForward = 0x4B + kBackward = 0x4C + kStopRecord = 0x4D + kPauseRecord = 0x4E + kReserved = 0x4F + kAngle = 0x50 + kSubPicture = 0x51 + kVideoOnDemand = 0x52 + kElectronicProgramGuide = 0x53 + kTimerProgramming = 0x54 + kInitialConfiguration = 0x55 + kSelectBroadcastType = 0x56 + kSelectSoundPresentation = 0x57 + kPlayFunction = 0x60 + kPausePlayFunction = 0x61 + kRecordFunction = 0x62 + kPauseRecordFunction = 0x63 + kStopFunction = 0x64 + kMuteFunction = 0x65 + kRestoreVolumeFunction = 0x66 + kTuneFunction = 0x67 + kSelectMediaFunction = 0x68 + kSelectAvInputFunction = 0x69 + kSelectAudioInputFunction = 0x6A + kPowerToggleFunction = 0x6B + kPowerOffFunction = 0x6C + kPowerOnFunction = 0x6D + kF1Blue = 0x71 + kF2Red = 0x72 + kF3Green = 0x73 + kF4Yellow = 0x74 + kF5 = 0x75 + kData = 0x76 # 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 = 4, + kUnknownEnumValue = 14, class StatusEnum(MatterIntEnum): kSuccess = 0x00 - kInvalidStateForCommand = 0x01 - kNotAllowed = 0x02 - kNotActive = 0x03 - kSpeedOutOfRange = 0x04 - kSeekOutOfRange = 0x05 + kUnsupportedKey = 0x01 + kInvalidKeyInCurrentState = 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 = 6, + kUnknownEnumValue = 3, class Bitmaps: class Feature(IntFlag): - kAdvancedSeek = 0x1 - kVariableSpeed = 0x2 - - class Structs: - @dataclass - class PlaybackPositionStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="updatedAt", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="position", Tag=1, Type=typing.Union[Nullable, uint]), - ]) - - updatedAt: 'uint' = 0 - position: 'typing.Union[Nullable, uint]' = NullValue + kNavigationKeyCodes = 0x1 + kLocationKeys = 0x2 + kNumberKeys = 0x4 class Commands: - @dataclass - class Play(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Pause(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class StartOver(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Previous(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Next(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Rewind(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class FastForward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000007 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class SkipForward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000008 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), - ]) - - deltaPositionMilliseconds: 'uint' = 0 - - @dataclass - class SkipBackward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x00000009 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), - ]) - - deltaPositionMilliseconds: 'uint' = 0 - - @dataclass - class PlaybackResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x0000000A - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=MediaPlayback.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), - ]) - - status: 'MediaPlayback.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None - - @dataclass - class Seek(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000506 - command_id: typing.ClassVar[int] = 0x0000000B - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'PlaybackResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="position", Tag=0, Type=uint), - ]) - - position: 'uint' = 0 - - class Attributes: - @dataclass - class CurrentState(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=MediaPlayback.Enums.PlaybackStateEnum) - - value: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 - - @dataclass - class StartTime(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class Duration(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class SampledPosition(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]) - - value: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None - - @dataclass - class PlaybackSpeed(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - - value: 'typing.Optional[float32]' = None - - @dataclass - class SeekRangeEnd(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000005 + @dataclass + class SendKey(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000509 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SendKeyResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="keyCode", Tag=0, Type=KeypadInput.Enums.CECKeyCodeEnum), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + keyCode: 'KeypadInput.Enums.CECKeyCodeEnum' = 0 @dataclass - class SeekRangeStart(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000006 + class SendKeyResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000509 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=KeypadInput.Enums.StatusEnum), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + status: 'KeypadInput.Enums.StatusEnum' = 0 + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34424,7 +39795,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34440,7 +39811,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34456,7 +39827,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34472,7 +39843,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34488,7 +39859,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000506 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34502,15 +39873,15 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class MediaInput(Cluster): - id: typing.ClassVar[int] = 0x00000507 +class ContentLauncher(Cluster): + id: typing.ClassVar[int] = 0x0000050A @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="inputList", Tag=0x00000000, Type=typing.List[MediaInput.Structs.InputInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentInput", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="acceptHeader", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -34519,8 +39890,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - inputList: 'typing.List[MediaInput.Structs.InputInfoStruct]' = None - currentInput: 'uint' = None + acceptHeader: 'typing.Optional[typing.List[str]]' = None + supportedStreamingProtocols: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -34529,281 +39900,311 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class InputTypeEnum(MatterIntEnum): - kInternal = 0x00 - kAux = 0x01 - kCoax = 0x02 - kComposite = 0x03 - kHdmi = 0x04 - kInput = 0x05 - kLine = 0x06 - kOptical = 0x07 - kVideo = 0x08 - kScart = 0x09 - kUsb = 0x0A - kOther = 0x0B + class CharacteristicEnum(MatterIntEnum): + kForcedSubtitles = 0x00 + kDescribesVideo = 0x01 + kEasyToRead = 0x02 + kFrameBased = 0x03 + kMainProgram = 0x04 + kOriginalContent = 0x05 + kVoiceOverTranslation = 0x06 + kCaption = 0x07 + kSubtitle = 0x08 + kAlternate = 0x09 + kSupplementary = 0x0A + kCommentary = 0x0B + kDubbedTranslation = 0x0C + kDescription = 0x0D + kMetadata = 0x0E + kEnhancedAudioIntelligibility = 0x0F + kEmergency = 0x10 + kKaraoke = 0x11 # 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 = 12, + kUnknownEnumValue = 18, + + class MetricTypeEnum(MatterIntEnum): + kPixels = 0x00 + kPercentage = 0x01 + # 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 = 2, + + class ParameterEnum(MatterIntEnum): + kActor = 0x00 + kChannel = 0x01 + kCharacter = 0x02 + kDirector = 0x03 + kEvent = 0x04 + kFranchise = 0x05 + kGenre = 0x06 + kLeague = 0x07 + kPopularity = 0x08 + kProvider = 0x09 + kSport = 0x0A + kSportsTeam = 0x0B + kType = 0x0C + kVideo = 0x0D + kSeason = 0x0E + kEpisode = 0x0F + kAny = 0x10 + # 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 = 17, + + class StatusEnum(MatterIntEnum): + kSuccess = 0x00 + kURLNotAvailable = 0x01 + kAuthFailed = 0x02 + kTextTrackNotAvailable = 0x03 + kAudioTrackNotAvailable = 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 + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, class Bitmaps: class Feature(IntFlag): - kNameUpdates = 0x1 + kContentSearch = 0x1 + kURLPlayback = 0x2 + kAdvancedSeek = 0x3 + kTextTracks = 0x4 + kAudioTracks = 0x5 + + class SupportedProtocolsBitmap(IntFlag): + kDash = 0x1 + kHls = 0x2 + kWebRTC = 0x2 class Structs: @dataclass - class InputInfoStruct(ClusterObject): + class DimensionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="inputType", Tag=1, Type=MediaInput.Enums.InputTypeEnum), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="description", Tag=3, Type=str), + ClusterObjectFieldDescriptor(Label="width", Tag=0, Type=float), + ClusterObjectFieldDescriptor(Label="height", Tag=1, Type=float), + ClusterObjectFieldDescriptor(Label="metric", Tag=2, Type=ContentLauncher.Enums.MetricTypeEnum), ]) - index: 'uint' = 0 - inputType: 'MediaInput.Enums.InputTypeEnum' = 0 - name: 'str' = "" - description: 'str' = "" + width: 'float' = 0.0 + height: 'float' = 0.0 + metric: 'ContentLauncher.Enums.MetricTypeEnum' = 0 - class Commands: @dataclass - class SelectInput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000507 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class TrackPreferenceStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="languageCode", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="characteristics", Tag=1, Type=typing.Optional[typing.List[ContentLauncher.Enums.CharacteristicEnum]]), + ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=2, Type=uint), ]) - index: 'uint' = 0 + languageCode: 'str' = "" + characteristics: 'typing.Optional[typing.List[ContentLauncher.Enums.CharacteristicEnum]]' = None + audioOutputIndex: 'uint' = 0 @dataclass - class ShowInputStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000507 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class PlaybackPreferencesStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="playbackPosition", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="textTrack", Tag=1, Type=ContentLauncher.Structs.TrackPreferenceStruct), + ClusterObjectFieldDescriptor(Label="audioTracks", Tag=2, Type=typing.Optional[typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]), ]) - @dataclass - class HideInputStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000507 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + playbackPosition: 'uint' = 0 + textTrack: 'ContentLauncher.Structs.TrackPreferenceStruct' = field(default_factory=lambda: ContentLauncher.Structs.TrackPreferenceStruct()) + audioTracks: 'typing.Optional[typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]' = None + @dataclass + class AdditionalInfoStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), ]) - @dataclass - class RenameInput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000507 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + name: 'str' = "" + value: 'str' = "" + @dataclass + class ParameterStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=ContentLauncher.Enums.ParameterEnum), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfoStruct]]), ]) - index: 'uint' = 0 - name: 'str' = "" + type: 'ContentLauncher.Enums.ParameterEnum' = 0 + value: 'str' = "" + externalIDList: 'typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfoStruct]]' = None - class Attributes: @dataclass - class InputList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - + class ContentSearchStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[MediaInput.Structs.InputInfoStruct]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="parameterList", Tag=0, Type=typing.List[ContentLauncher.Structs.ParameterStruct]), + ]) - value: 'typing.List[MediaInput.Structs.InputInfoStruct]' = field(default_factory=lambda: []) + parameterList: 'typing.List[ContentLauncher.Structs.ParameterStruct]' = field(default_factory=lambda: []) @dataclass - class CurrentInput(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - + class StyleInformationStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="imageURL", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="color", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="size", Tag=2, Type=typing.Optional[ContentLauncher.Structs.DimensionStruct]), + ]) - value: 'uint' = 0 + imageURL: 'typing.Optional[str]' = None + color: 'typing.Optional[str]' = None + size: 'typing.Optional[ContentLauncher.Structs.DimensionStruct]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 - + class BrandingInformationStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="providerName", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="background", Tag=1, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ClusterObjectFieldDescriptor(Label="logo", Tag=2, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ClusterObjectFieldDescriptor(Label="progressBar", Tag=3, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ClusterObjectFieldDescriptor(Label="splash", Tag=4, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ClusterObjectFieldDescriptor(Label="waterMark", Tag=5, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + providerName: 'str' = "" + background: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + logo: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + progressBar: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + splash: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + waterMark: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + class Commands: @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 + class LaunchContent(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050A + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="search", Tag=0, Type=ContentLauncher.Structs.ContentSearchStruct), + ClusterObjectFieldDescriptor(Label="autoPlay", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="playbackPreferences", Tag=3, Type=typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct]), + ClusterObjectFieldDescriptor(Label="useCurrentContext", Tag=4, Type=typing.Optional[bool]), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + search: 'ContentLauncher.Structs.ContentSearchStruct' = field(default_factory=lambda: ContentLauncher.Structs.ContentSearchStruct()) + autoPlay: 'bool' = False + data: 'typing.Optional[str]' = None + playbackPreferences: 'typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct]' = None + useCurrentContext: 'typing.Optional[bool]' = None @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA + class LaunchURL(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050A + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="contentURL", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + contentURL: 'str' = "" + displayString: 'typing.Optional[str]' = None + brandingInformation: 'typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFB + class LauncherResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050A + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ContentLauncher.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + status: 'ContentLauncher.Enums.StatusEnum' = 0 + data: 'typing.Optional[str]' = None + class Attributes: @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AcceptHeader(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000507 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'uint' = 0 + value: 'typing.Optional[typing.List[str]]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class SupportedStreamingProtocols(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000507 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class LowPower(Cluster): - id: typing.ClassVar[int] = 0x00000508 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Commands: - @dataclass - class Sleep(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000508 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34819,7 +40220,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34835,7 +40236,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34851,7 +40252,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34867,7 +40268,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34883,7 +40284,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000508 + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34897,177 +40298,139 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class KeypadInput(Cluster): - id: typing.ClassVar[int] = 0x00000509 +class AudioOutput(Cluster): + id: typing.ClassVar[int] = 0x0000050B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="outputList", Tag=0x00000000, Type=typing.List[AudioOutput.Structs.OutputInfoStruct]), + ClusterObjectFieldDescriptor(Label="currentOutput", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class CecKeyCode(MatterIntEnum): - kSelect = 0x00 - kUp = 0x01 - kDown = 0x02 - kLeft = 0x03 - kRight = 0x04 - kRightUp = 0x05 - kRightDown = 0x06 - kLeftUp = 0x07 - kLeftDown = 0x08 - kRootMenu = 0x09 - kSetupMenu = 0x0A - kContentsMenu = 0x0B - kFavoriteMenu = 0x0C - kExit = 0x0D - kMediaTopMenu = 0x10 - kMediaContextSensitiveMenu = 0x11 - kNumberEntryMode = 0x1D - kNumber11 = 0x1E - kNumber12 = 0x1F - kNumber0OrNumber10 = 0x20 - kNumbers1 = 0x21 - kNumbers2 = 0x22 - kNumbers3 = 0x23 - kNumbers4 = 0x24 - kNumbers5 = 0x25 - kNumbers6 = 0x26 - kNumbers7 = 0x27 - kNumbers8 = 0x28 - kNumbers9 = 0x29 - kDot = 0x2A - kEnter = 0x2B - kClear = 0x2C - kNextFavorite = 0x2F - kChannelUp = 0x30 - kChannelDown = 0x31 - kPreviousChannel = 0x32 - kSoundSelect = 0x33 - kInputSelect = 0x34 - kDisplayInformation = 0x35 - kHelp = 0x36 - kPageUp = 0x37 - kPageDown = 0x38 - kPower = 0x40 - kVolumeUp = 0x41 - kVolumeDown = 0x42 - kMute = 0x43 - kPlay = 0x44 - kStop = 0x45 - kPause = 0x46 - kRecord = 0x47 - kRewind = 0x48 - kFastForward = 0x49 - kEject = 0x4A - kForward = 0x4B - kBackward = 0x4C - kStopRecord = 0x4D - kPauseRecord = 0x4E - kReserved = 0x4F - kAngle = 0x50 - kSubPicture = 0x51 - kVideoOnDemand = 0x52 - kElectronicProgramGuide = 0x53 - kTimerProgramming = 0x54 - kInitialConfiguration = 0x55 - kSelectBroadcastType = 0x56 - kSelectSoundPresentation = 0x57 - kPlayFunction = 0x60 - kPausePlayFunction = 0x61 - kRecordFunction = 0x62 - kPauseRecordFunction = 0x63 - kStopFunction = 0x64 - kMuteFunction = 0x65 - kRestoreVolumeFunction = 0x66 - kTuneFunction = 0x67 - kSelectMediaFunction = 0x68 - kSelectAvInputFunction = 0x69 - kSelectAudioInputFunction = 0x6A - kPowerToggleFunction = 0x6B - kPowerOffFunction = 0x6C - kPowerOnFunction = 0x6D - kF1Blue = 0x71 - kF2Red = 0x72 - kF3Green = 0x73 - kF4Yellow = 0x74 - kF5 = 0x75 - kData = 0x76 - # 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 = 14, + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) - class StatusEnum(MatterIntEnum): - kSuccess = 0x00 - kUnsupportedKey = 0x01 - kInvalidKeyInCurrentState = 0x02 + outputList: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = None + currentOutput: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class OutputTypeEnum(MatterIntEnum): + kHdmi = 0x00 + kBt = 0x01 + kOptical = 0x02 + kHeadphone = 0x03 + kInternal = 0x04 + kOther = 0x05 # 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, + kUnknownEnumValue = 6, class Bitmaps: class Feature(IntFlag): - kNavigationKeyCodes = 0x1 - kLocationKeys = 0x2 - kNumberKeys = 0x4 + kNameUpdates = 0x1 + + class Structs: + @dataclass + class OutputInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="outputType", Tag=1, Type=AudioOutput.Enums.OutputTypeEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ]) + + index: 'uint' = 0 + outputType: 'AudioOutput.Enums.OutputTypeEnum' = 0 + name: 'str' = "" class Commands: @dataclass - class SendKey(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000509 + class SelectOutput(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'SendKeyResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="keyCode", Tag=0, Type=KeypadInput.Enums.CecKeyCode), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), ]) - keyCode: 'KeypadInput.Enums.CecKeyCode' = 0 + index: 'uint' = 0 @dataclass - class SendKeyResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000509 + class RenameOutput(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=KeypadInput.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), ]) - status: 'KeypadInput.Enums.StatusEnum' = 0 + index: 'uint' = 0 + name: 'str' = "" class Attributes: + @dataclass + class OutputList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[AudioOutput.Structs.OutputInfoStruct]) + + value: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentOutput(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35083,7 +40446,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35099,7 +40462,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35115,7 +40478,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35131,7 +40494,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35147,7 +40510,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000509 + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35161,15 +40524,15 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class ContentLauncher(Cluster): - id: typing.ClassVar[int] = 0x0000050A +class ApplicationLauncher(Cluster): + id: typing.ClassVar[int] = 0x0000050C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="acceptHeader", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), - ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="catalogList", Tag=0x00000000, Type=typing.Optional[typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="currentApp", Tag=0x00000001, Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -35178,8 +40541,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acceptHeader: 'typing.Optional[typing.List[str]]' = None - supportedStreamingProtocols: 'typing.Optional[uint]' = None + catalogList: 'typing.Optional[typing.List[uint]]' = None + currentApp: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -35188,40 +40551,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class MetricTypeEnum(MatterIntEnum): - kPixels = 0x00 - kPercentage = 0x01 - # 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 = 2, - - class ParameterEnum(MatterIntEnum): - kActor = 0x00 - kChannel = 0x01 - kCharacter = 0x02 - kDirector = 0x03 - kEvent = 0x04 - kFranchise = 0x05 - kGenre = 0x06 - kLeague = 0x07 - kPopularity = 0x08 - kProvider = 0x09 - kSport = 0x0A - kSportsTeam = 0x0B - kType = 0x0C - kVideo = 0x0D - # 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 = 14, - class StatusEnum(MatterIntEnum): kSuccess = 0x00 - kURLNotAvailable = 0x01 - kAuthFailed = 0x02 + kAppNotAvailable = 0x01 + kSystemBusy = 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 @@ -35230,109 +40563,58 @@ class StatusEnum(MatterIntEnum): class Bitmaps: class Feature(IntFlag): - kContentSearch = 0x1 - kURLPlayback = 0x2 - - class SupportedProtocolsBitmap(IntFlag): - kDash = 0x1 - kHls = 0x2 + kApplicationPlatform = 0x1 class Structs: @dataclass - class DimensionStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="width", Tag=0, Type=float), - ClusterObjectFieldDescriptor(Label="height", Tag=1, Type=float), - ClusterObjectFieldDescriptor(Label="metric", Tag=2, Type=ContentLauncher.Enums.MetricTypeEnum), - ]) - - width: 'float' = 0.0 - height: 'float' = 0.0 - metric: 'ContentLauncher.Enums.MetricTypeEnum' = 0 - - @dataclass - class AdditionalInfoStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), - ]) - - name: 'str' = "" - value: 'str' = "" - - @dataclass - class ParameterStruct(ClusterObject): + class ApplicationStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=ContentLauncher.Enums.ParameterEnum), - ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfoStruct]]), + ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), ]) - type: 'ContentLauncher.Enums.ParameterEnum' = 0 - value: 'str' = "" - externalIDList: 'typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfoStruct]]' = None + catalogVendorID: 'uint' = 0 + applicationID: 'str' = "" @dataclass - class ContentSearchStruct(ClusterObject): + class ApplicationEPStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="parameterList", Tag=0, Type=typing.List[ContentLauncher.Structs.ParameterStruct]), + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.ApplicationStruct), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=typing.Optional[uint]), ]) - parameterList: 'typing.List[ContentLauncher.Structs.ParameterStruct]' = field(default_factory=lambda: []) + application: 'ApplicationLauncher.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationStruct()) + endpoint: 'typing.Optional[uint]' = None + class Commands: @dataclass - class StyleInformationStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="imageURL", Tag=0, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="color", Tag=1, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="size", Tag=2, Type=typing.Optional[ContentLauncher.Structs.DimensionStruct]), - ]) - - imageURL: 'typing.Optional[str]' = None - color: 'typing.Optional[str]' = None - size: 'typing.Optional[ContentLauncher.Structs.DimensionStruct]' = None + class LaunchApp(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050C + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'LauncherResponse' - @dataclass - class BrandingInformationStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="providerName", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="background", Tag=1, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), - ClusterObjectFieldDescriptor(Label="logo", Tag=2, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), - ClusterObjectFieldDescriptor(Label="progressBar", Tag=3, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), - ClusterObjectFieldDescriptor(Label="splash", Tag=4, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), - ClusterObjectFieldDescriptor(Label="waterMark", Tag=5, Type=typing.Optional[ContentLauncher.Structs.StyleInformationStruct]), + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), ]) - providerName: 'str' = "" - background: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None - logo: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None - progressBar: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None - splash: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None - waterMark: 'typing.Optional[ContentLauncher.Structs.StyleInformationStruct]' = None + application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None + data: 'typing.Optional[bytes]' = None - class Commands: @dataclass - class LaunchContent(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050A - command_id: typing.ClassVar[int] = 0x00000000 + class StopApp(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050C + command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -35340,19 +40622,15 @@ class LaunchContent(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="search", Tag=0, Type=ContentLauncher.Structs.ContentSearchStruct), - ClusterObjectFieldDescriptor(Label="autoPlay", Tag=1, Type=bool), - ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), ]) - search: 'ContentLauncher.Structs.ContentSearchStruct' = field(default_factory=lambda: ContentLauncher.Structs.ContentSearchStruct()) - autoPlay: 'bool' = False - data: 'typing.Optional[str]' = None + application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None @dataclass - class LaunchURL(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050A - command_id: typing.ClassVar[int] = 0x00000001 + class HideApp(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050C + command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -35360,19 +40638,15 @@ class LaunchURL(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="contentURL", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]), + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), ]) - contentURL: 'str' = "" - displayString: 'typing.Optional[str]' = None - brandingInformation: 'typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]' = None + application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None @dataclass class LauncherResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050A - command_id: typing.ClassVar[int] = 0x00000002 + cluster_id: typing.ClassVar[int] = 0x0000050C + command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -35380,19 +40654,19 @@ class LauncherResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ContentLauncher.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ApplicationLauncher.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), ]) - status: 'ContentLauncher.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None + status: 'ApplicationLauncher.Enums.StatusEnum' = 0 + data: 'typing.Optional[bytes]' = None class Attributes: @dataclass - class AcceptHeader(ClusterAttributeDescriptor): + class CatalogList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35400,15 +40674,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.Optional[typing.List[str]]' = None + value: 'typing.Optional[typing.List[uint]]' = None @dataclass - class SupportedStreamingProtocols(ClusterAttributeDescriptor): + class CurrentApp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35416,15 +40690,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35440,7 +40714,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35456,7 +40730,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35472,7 +40746,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35488,7 +40762,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35504,7 +40778,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050A + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35518,15 +40792,21 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class AudioOutput(Cluster): - id: typing.ClassVar[int] = 0x0000050B +class ApplicationBasic(Cluster): + id: typing.ClassVar[int] = 0x0000050D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="outputList", Tag=0x00000000, Type=typing.List[AudioOutput.Structs.OutputInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentOutput", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000000, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="applicationName", Tag=0x00000002, Type=str), + ClusterObjectFieldDescriptor(Label="productID", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="application", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationStruct), + ClusterObjectFieldDescriptor(Label="status", Tag=0x00000005, Type=ApplicationBasic.Enums.ApplicationStatusEnum), + ClusterObjectFieldDescriptor(Label="applicationVersion", Tag=0x00000006, Type=str), + ClusterObjectFieldDescriptor(Label="allowedVendorList", Tag=0x00000007, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -35535,8 +40815,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - outputList: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = None - currentOutput: 'uint' = None + vendorName: 'typing.Optional[str]' = None + vendorID: 'typing.Optional[uint]' = None + applicationName: 'str' = None + productID: 'typing.Optional[uint]' = None + application: 'ApplicationBasic.Structs.ApplicationStruct' = None + status: 'ApplicationBasic.Enums.ApplicationStatusEnum' = None + applicationVersion: 'str' = None + allowedVendorList: 'typing.List[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -35545,112 +40831,165 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class OutputTypeEnum(MatterIntEnum): - kHdmi = 0x00 - kBt = 0x01 - kOptical = 0x02 - kHeadphone = 0x03 - kInternal = 0x04 - kOther = 0x05 + class ApplicationStatusEnum(MatterIntEnum): + kStopped = 0x00 + kActiveVisibleFocus = 0x01 + kActiveHidden = 0x02 + kActiveVisibleNotFocus = 0x03 # 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 = 6, - - class Bitmaps: - class Feature(IntFlag): - kNameUpdates = 0x1 + kUnknownEnumValue = 4, class Structs: @dataclass - class OutputInfoStruct(ClusterObject): + class ApplicationStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="outputType", Tag=1, Type=AudioOutput.Enums.OutputTypeEnum), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), ]) - index: 'uint' = 0 - outputType: 'AudioOutput.Enums.OutputTypeEnum' = 0 - name: 'str' = "" + catalogVendorID: 'uint' = 0 + applicationID: 'str' = "" - class Commands: + class Attributes: @dataclass - class SelectOutput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050B - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class VendorName(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - index: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None @dataclass - class RenameOutput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050B - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class VendorID(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ]) + def attribute_id(cls) -> int: + return 0x00000001 - index: 'uint' = 0 - name: 'str' = "" + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class OutputList(ClusterAttributeDescriptor): + class ApplicationName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[AudioOutput.Structs.OutputInfoStruct]) + return ClusterObjectFieldDescriptor(Type=str) - value: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = field(default_factory=lambda: []) + value: 'str' = "" @dataclass - class CurrentOutput(ClusterAttributeDescriptor): + class ProductID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None + + @dataclass + class Application(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationStruct) + + value: 'ApplicationBasic.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) + + @dataclass + class Status(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Enums.ApplicationStatusEnum) + + value: 'ApplicationBasic.Enums.ApplicationStatusEnum' = 0 + + @dataclass + class ApplicationVersion(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class AllowedVendorList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35666,7 +41005,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35682,7 +41021,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35698,7 +41037,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35714,7 +41053,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35730,7 +41069,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050B + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35744,15 +41083,13 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class ApplicationLauncher(Cluster): - id: typing.ClassVar[int] = 0x0000050C +class AccountLogin(Cluster): + id: typing.ClassVar[int] = 0x0000050E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="catalogList", Tag=0x00000000, Type=typing.Optional[typing.List[uint]]), - ClusterObjectFieldDescriptor(Label="currentApp", Tag=0x00000001, Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -35761,8 +41098,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - catalogList: 'typing.Optional[typing.List[uint]]' = None - currentApp: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -35770,155 +41105,93 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class StatusEnum(MatterIntEnum): - kSuccess = 0x00 - kAppNotAvailable = 0x01 - kSystemBusy = 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, - - class Bitmaps: - class Feature(IntFlag): - kApplicationPlatform = 0x1 - - class Structs: - @dataclass - class ApplicationStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), - ]) - - catalogVendorID: 'uint' = 0 - applicationID: 'str' = "" - - @dataclass - class ApplicationEPStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.ApplicationStruct), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=typing.Optional[uint]), - ]) - - application: 'ApplicationLauncher.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationStruct()) - endpoint: 'typing.Optional[uint]' = None - class Commands: @dataclass - class LaunchApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050C + class GetSetupPIN(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'LauncherResponse' + response_type: typing.ClassVar[str] = 'GetSetupPINResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None - data: 'typing.Optional[bytes]' = None + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + tempAccountIdentifier: 'str' = "" @dataclass - class StopApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050C + class GetSetupPINResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'LauncherResponse' + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), + ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None + setupPIN: 'str' = "" @dataclass - class HideApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050C + class Login(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'LauncherResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), + ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="setupPIN", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="node", Tag=2, Type=typing.Optional[uint]), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + tempAccountIdentifier: 'str' = "" + setupPIN: 'str' = "" + node: 'typing.Optional[uint]' = None @dataclass - class LauncherResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050C + class Logout(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = False + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ApplicationLauncher.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="node", Tag=0, Type=typing.Optional[uint]), ]) - status: 'ApplicationLauncher.Enums.StatusEnum' = 0 - data: 'typing.Optional[bytes]' = None - - class Attributes: - @dataclass - class CatalogList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - - value: 'typing.Optional[typing.List[uint]]' = None - - @dataclass - class CurrentApp(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]) + def must_use_timed_invoke(cls) -> bool: + return True - value: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None + node: 'typing.Optional[uint]' = None + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35934,7 +41207,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35950,7 +41223,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35966,7 +41239,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35982,7 +41255,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35998,7 +41271,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050C + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36010,23 +41283,43 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class LoggedOut(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050E + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="node", Tag=0, Type=typing.Optional[uint]), + ]) + + node: 'typing.Optional[uint]' = None + @dataclass -class ApplicationBasic(Cluster): - id: typing.ClassVar[int] = 0x0000050D +class ContentControl(Cluster): + id: typing.ClassVar[int] = 0x0000050F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000000, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="vendorID", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="applicationName", Tag=0x00000002, Type=str), - ClusterObjectFieldDescriptor(Label="productID", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="application", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationStruct), - ClusterObjectFieldDescriptor(Label="status", Tag=0x00000005, Type=ApplicationBasic.Enums.ApplicationStatusEnum), - ClusterObjectFieldDescriptor(Label="applicationVersion", Tag=0x00000006, Type=str), - ClusterObjectFieldDescriptor(Label="allowedVendorList", Tag=0x00000007, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="enabled", Tag=0x00000000, Type=bool), + ClusterObjectFieldDescriptor(Label="onDemandRatings", Tag=0x00000001, Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]), + ClusterObjectFieldDescriptor(Label="onDemandRatingThreshold", Tag=0x00000002, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="scheduledContentRatings", Tag=0x00000003, Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]), + ClusterObjectFieldDescriptor(Label="scheduledContentRatingThreshold", Tag=0x00000004, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="screenDailyTime", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="remainingScreenTime", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="blockUnrated", Tag=0x00000007, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -36035,14 +41328,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - vendorName: 'typing.Optional[str]' = None - vendorID: 'typing.Optional[uint]' = None - applicationName: 'str' = None - productID: 'typing.Optional[uint]' = None - application: 'ApplicationBasic.Structs.ApplicationStruct' = None - status: 'ApplicationBasic.Enums.ApplicationStatusEnum' = None - applicationVersion: 'str' = None - allowedVendorList: 'typing.List[uint]' = None + enabled: 'bool' = None + onDemandRatings: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None + onDemandRatingThreshold: 'typing.Optional[str]' = None + scheduledContentRatings: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None + scheduledContentRatingThreshold: 'typing.Optional[str]' = None + screenDailyTime: 'typing.Optional[uint]' = None + remainingScreenTime: 'typing.Optional[uint]' = None + blockUnrated: 'bool' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -36050,38 +41343,200 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class ApplicationStatusEnum(MatterIntEnum): - kStopped = 0x00 - kActiveVisibleFocus = 0x01 - kActiveHidden = 0x02 - kActiveVisibleNotFocus = 0x03 - # 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 = 4, + class Bitmaps: + class Feature(IntFlag): + kScreenTime = 0x1 + kPINManagement = 0x2 + kBlockUnrated = 0x3 + kOnDemandContentRating = 0x4 + kScheduledContentRating = 0x5 class Structs: @dataclass - class ApplicationStruct(ClusterObject): + class RatingNameStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="ratingName", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="ratingNameDesc", Tag=1, Type=typing.Optional[str]), ]) - catalogVendorID: 'uint' = 0 - applicationID: 'str' = "" + ratingName: 'str' = "" + ratingNameDesc: 'typing.Optional[str]' = None + + class Commands: + @dataclass + class UpdatePIN(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="oldPIN", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="newPIN", Tag=1, Type=str), + ]) + + oldPIN: 'typing.Optional[str]' = None + newPIN: 'str' = "" + + @dataclass + class ResetPIN(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ResetPINResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class ResetPINResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=str), + ]) + + PINCode: 'str' = "" + + @dataclass + class Enable(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Disable(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class AddBonusTime(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="bonusTime", Tag=1, Type=typing.Optional[uint]), + ]) + + PINCode: 'typing.Optional[str]' = None + bonusTime: 'typing.Optional[uint]' = None + + @dataclass + class SetScreenDailyTime(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="screenTime", Tag=0, Type=uint), + ]) + + screenTime: 'uint' = 0 + + @dataclass + class BlockUnratedContent(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class UnblockUnratedContent(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class SetOnDemandRatingThreshold(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="rating", Tag=0, Type=str), + ]) + + rating: 'str' = "" + + @dataclass + class SetScheduledContentRatingThreshold(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="rating", Tag=0, Type=str), + ]) + + rating: 'str' = "" class Attributes: @dataclass - class VendorName(ClusterAttributeDescriptor): + class Enabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36089,15 +41544,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=bool) - value: 'typing.Optional[str]' = None + value: 'bool' = False @dataclass - class VendorID(ClusterAttributeDescriptor): + class OnDemandRatings(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36105,15 +41560,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None @dataclass - class ApplicationName(ClusterAttributeDescriptor): + class OnDemandRatingThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36121,15 +41576,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'str' = "" + value: 'typing.Optional[str]' = None @dataclass - class ProductID(ClusterAttributeDescriptor): + class ScheduledContentRatings(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36137,15 +41592,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None @dataclass - class Application(ClusterAttributeDescriptor): + class ScheduledContentRatingThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36153,15 +41608,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationStruct) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'ApplicationBasic.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) + value: 'typing.Optional[str]' = None @dataclass - class Status(ClusterAttributeDescriptor): + class ScreenDailyTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36169,15 +41624,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Enums.ApplicationStatusEnum) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'ApplicationBasic.Enums.ApplicationStatusEnum' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ApplicationVersion(ClusterAttributeDescriptor): + class RemainingScreenTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36185,15 +41640,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'str' = "" + value: 'typing.Optional[uint]' = None @dataclass - class AllowedVendorList(ClusterAttributeDescriptor): + class BlockUnrated(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36201,15 +41656,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=bool) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'bool' = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36225,7 +41680,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36241,7 +41696,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36257,7 +41712,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36273,7 +41728,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36289,7 +41744,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050D + return 0x0000050F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36301,10 +41756,27 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class RemainingScreenTimeExpired(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050F + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + @dataclass -class AccountLogin(Cluster): - id: typing.ClassVar[int] = 0x0000050E +class ContentAppObserver(Cluster): + id: typing.ClassVar[int] = 0x00000510 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -36325,30 +41797,38 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class StatusEnum(MatterIntEnum): + kSuccess = 0x00 + kUnexpectedData = 0x01 + # 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 = 2, + class Commands: @dataclass - class GetSetupPIN(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050E + class ContentAppMessage(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000510 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetSetupPINResponse' + response_type: typing.ClassVar[str] = 'ContentAppMessageResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="encodingHint", Tag=1, Type=str), ]) - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True - - tempAccountIdentifier: 'str' = "" + data: 'typing.Optional[str]' = None + encodingHint: 'str' = "" @dataclass - class GetSetupPINResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050E + class ContentAppMessageResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000510 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -36357,56 +41837,21 @@ class GetSetupPINResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), - ]) - - setupPIN: 'str' = "" - - @dataclass - class Login(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050E - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="tempAccountIdentifier", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="setupPIN", Tag=1, Type=str), - ]) - - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True - - tempAccountIdentifier: 'str' = "" - setupPIN: 'str' = "" - - @dataclass - class Logout(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000050E - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=typing.Optional[ContentAppObserver.Enums.StatusEnum]), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="encodingHint", Tag=2, Type=str), ]) - @ChipUtility.classproperty - def must_use_timed_invoke(cls) -> bool: - return True + status: 'typing.Optional[ContentAppObserver.Enums.StatusEnum]' = None + data: 'str' = "" + encodingHint: 'str' = "" class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36422,7 +41867,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36438,7 +41883,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36454,7 +41899,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36470,7 +41915,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36486,7 +41931,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000050E + return 0x00000510 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -41855,3 +47300,25 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class PingCountEvent(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC20 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="count", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + count: 'uint' = 0 + fabricIndex: 'uint' = 0 + diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 3a6099961c0463..ed49f19632e0ff 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -34,7 +34,7 @@ KeypadInput, LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffSwitchConfiguration, OperationalCredentials, OperationalState, - OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, OzoneConcentrationMeasurement, + OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, OvenCavityOperationalState, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, @@ -56,7 +56,7 @@ LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffSwitchConfiguration, OperationalCredentials, OperationalState, - OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, + OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor,OvenCavityOperationalState, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index d229c3c89f92e1..8d1513ffc0f8b6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -111,7 +111,7 @@ static BOOL AttributeIsSpecifiedInScenesCluster(AttributeId aAttributeId) case Attributes::SceneTableSize::Id: { return YES; } - case Attributes::RemainingCapacity::Id: { + case Attributes::FabricSceneInfo::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -579,6 +579,12 @@ static BOOL AttributeIsSpecifiedInBasicInformationCluster(AttributeId aAttribute case Attributes::ProductAppearance::Id: { return YES; } + case Attributes::SpecificationVersion::Id: { + return YES; + } + case Attributes::MaxPathsPerInvoke::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -1916,9 +1922,45 @@ static BOOL AttributeIsSpecifiedInICDManagementCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInOvenOperationalStateCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInTimerCluster(AttributeId aAttributeId) { - using namespace Clusters::OvenOperationalState; + using namespace Clusters::Timer; + switch (aAttributeId) { + case Attributes::SetTime::Id: { + return YES; + } + case Attributes::TimeRemaining::Id: { + return YES; + } + case Attributes::TimerState::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInOvenCavityOperationalStateCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenCavityOperationalState; switch (aAttributeId) { case Attributes::PhaseList::Id: { return YES; @@ -1961,6 +2003,78 @@ static BOOL AttributeIsSpecifiedInOvenOperationalStateCluster(AttributeId aAttri } } } +static BOOL AttributeIsSpecifiedInOvenModeCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + case Attributes::SupportedModes::Id: { + return YES; + } + case Attributes::CurrentMode::Id: { + return YES; + } + case Attributes::StartUpMode::Id: { + return YES; + } + case Attributes::OnMode::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInLaundryDryerControlsCluster(AttributeId aAttributeId) +{ + using namespace Clusters::LaundryDryerControls; + switch (aAttributeId) { + case Attributes::SupportedDrynessLevels::Id: { + return YES; + } + case Attributes::SelectedDrynessLevel::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) { using namespace Clusters::ModeSelect; @@ -2705,6 +2819,357 @@ static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(Attribu } } } +static BOOL AttributeIsSpecifiedInBooleanStateConfigurationCluster(AttributeId aAttributeId) +{ + using namespace Clusters::BooleanStateConfiguration; + switch (aAttributeId) { + case Attributes::CurrentSensitivityLevel::Id: { + return YES; + } + case Attributes::SupportedSensitivityLevels::Id: { + return YES; + } + case Attributes::DefaultSensitivityLevel::Id: { + return YES; + } + case Attributes::AlarmsActive::Id: { + return YES; + } + case Attributes::AlarmsSuppressed::Id: { + return YES; + } + case Attributes::AlarmsEnabled::Id: { + return YES; + } + case Attributes::AlarmsSupported::Id: { + return YES; + } + case Attributes::SensorFault::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInValveConfigurationAndControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aAttributeId) { + case Attributes::OpenDuration::Id: { + return YES; + } + case Attributes::DefaultOpenDuration::Id: { + return YES; + } + case Attributes::AutoCloseTime::Id: { + return YES; + } + case Attributes::RemainingDuration::Id: { + return YES; + } + case Attributes::CurrentState::Id: { + return YES; + } + case Attributes::TargetState::Id: { + return YES; + } + case Attributes::CurrentLevel::Id: { + return YES; + } + case Attributes::TargetLevel::Id: { + return YES; + } + case Attributes::DefaultOpenLevel::Id: { + return YES; + } + case Attributes::ValveFault::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInElectricalEnergyMeasurementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ElectricalEnergyMeasurement; + switch (aAttributeId) { + case Attributes::Accuracy::Id: { + return YES; + } + case Attributes::CumulativeEnergyImported::Id: { + return YES; + } + case Attributes::CumulativeEnergyExported::Id: { + return YES; + } + case Attributes::PeriodicEnergyImported::Id: { + return YES; + } + case Attributes::PeriodicEnergyExported::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aAttributeId) { + case Attributes::LoadControlPrograms::Id: { + return YES; + } + case Attributes::NumberOfLoadControlPrograms::Id: { + return YES; + } + case Attributes::Events::Id: { + return YES; + } + case Attributes::ActiveEvents::Id: { + return YES; + } + case Attributes::NumberOfEventsPerProgram::Id: { + return YES; + } + case Attributes::NumberOfTransitions::Id: { + return YES; + } + case Attributes::DefaultRandomStart::Id: { + return YES; + } + case Attributes::DefaultRandomDuration::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInDeviceEnergyManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::DeviceEnergyManagement; + switch (aAttributeId) { + case Attributes::ESAType::Id: { + return YES; + } + case Attributes::ESACanGenerate::Id: { + return YES; + } + case Attributes::ESAState::Id: { + return YES; + } + case Attributes::AbsMinPower::Id: { + return YES; + } + case Attributes::AbsMaxPower::Id: { + return YES; + } + case Attributes::PowerAdjustmentCapability::Id: { + return YES; + } + case Attributes::Forecast::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInEnergyEVSECluster(AttributeId aAttributeId) +{ + using namespace Clusters::EnergyEvse; + switch (aAttributeId) { + case Attributes::State::Id: { + return YES; + } + case Attributes::SupplyState::Id: { + return YES; + } + case Attributes::FaultState::Id: { + return YES; + } + case Attributes::ChargingEnabledUntil::Id: { + return YES; + } + case Attributes::DischargingEnabledUntil::Id: { + return YES; + } + case Attributes::CircuitCapacity::Id: { + return YES; + } + case Attributes::MinimumChargeCurrent::Id: { + return YES; + } + case Attributes::MaximumChargeCurrent::Id: { + return YES; + } + case Attributes::MaximumDischargeCurrent::Id: { + return YES; + } + case Attributes::UserMaximumChargeCurrent::Id: { + return YES; + } + case Attributes::RandomizationDelayWindow::Id: { + return YES; + } + case Attributes::NumberOfWeeklyTargets::Id: { + return YES; + } + case Attributes::NumberOfDailyTargets::Id: { + return YES; + } + case Attributes::NextChargeStartTime::Id: { + return YES; + } + case Attributes::NextChargeTargetTime::Id: { + return YES; + } + case Attributes::NextChargeRequiredEnergy::Id: { + return YES; + } + case Attributes::NextChargeTargetSoC::Id: { + return YES; + } + case Attributes::ApproximateEVEfficiency::Id: { + return YES; + } + case Attributes::StateOfCharge::Id: { + return YES; + } + case Attributes::BatteryCapacity::Id: { + return YES; + } + case Attributes::VehicleID::Id: { + return YES; + } + case Attributes::SessionID::Id: { + return YES; + } + case Attributes::SessionDuration::Id: { + return YES; + } + case Attributes::SessionEnergyCharged::Id: { + return YES; + } + case Attributes::SessionEnergyDischarged::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInDoorLockCluster(AttributeId aAttributeId) { using namespace Clusters::DoorLock; @@ -4614,6 +5079,18 @@ static BOOL AttributeIsSpecifiedInMediaPlaybackCluster(AttributeId aAttributeId) case Attributes::SeekRangeStart::Id: { return YES; } + case Attributes::ActiveAudioTrack::Id: { + return YES; + } + case Attributes::AvailableAudioTracks::Id: { + return YES; + } + case Attributes::ActiveTextTrack::Id: { + return YES; + } + case Attributes::AvailableTextTracks::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -4901,6 +5378,84 @@ static BOOL AttributeIsSpecifiedInAccountLoginCluster(AttributeId aAttributeId) } } } +static BOOL AttributeIsSpecifiedInContentControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ContentControl; + switch (aAttributeId) { + case Attributes::Enabled::Id: { + return YES; + } + case Attributes::OnDemandRatings::Id: { + return YES; + } + case Attributes::OnDemandRatingThreshold::Id: { + return YES; + } + case Attributes::ScheduledContentRatings::Id: { + return YES; + } + case Attributes::ScheduledContentRatingThreshold::Id: { + return YES; + } + case Attributes::ScreenDailyTime::Id: { + return YES; + } + case Attributes::RemainingScreenTime::Id: { + return YES; + } + case Attributes::BlockUnrated::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInContentAppObserverCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ContentAppObserver; + switch (aAttributeId) { + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInElectricalMeasurementCluster(AttributeId aAttributeId) { using namespace Clusters::ElectricalMeasurement; @@ -5733,8 +6288,17 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::IcdManagement::Id: { return AttributeIsSpecifiedInICDManagementCluster(aAttributeId); } - case Clusters::OvenOperationalState::Id: { - return AttributeIsSpecifiedInOvenOperationalStateCluster(aAttributeId); + case Clusters::Timer::Id: { + return AttributeIsSpecifiedInTimerCluster(aAttributeId); + } + case Clusters::OvenCavityOperationalState::Id: { + return AttributeIsSpecifiedInOvenCavityOperationalStateCluster(aAttributeId); + } + case Clusters::OvenMode::Id: { + return AttributeIsSpecifiedInOvenModeCluster(aAttributeId); + } + case Clusters::LaundryDryerControls::Id: { + return AttributeIsSpecifiedInLaundryDryerControlsCluster(aAttributeId); } case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); @@ -5790,6 +6354,24 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ActivatedCarbonFilterMonitoring::Id: { return AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(aAttributeId); } + case Clusters::BooleanStateConfiguration::Id: { + return AttributeIsSpecifiedInBooleanStateConfigurationCluster(aAttributeId); + } + case Clusters::ValveConfigurationAndControl::Id: { + return AttributeIsSpecifiedInValveConfigurationAndControlCluster(aAttributeId); + } + case Clusters::ElectricalEnergyMeasurement::Id: { + return AttributeIsSpecifiedInElectricalEnergyMeasurementCluster(aAttributeId); + } + case Clusters::DemandResponseLoadControl::Id: { + return AttributeIsSpecifiedInDemandResponseLoadControlCluster(aAttributeId); + } + case Clusters::DeviceEnergyManagement::Id: { + return AttributeIsSpecifiedInDeviceEnergyManagementCluster(aAttributeId); + } + case Clusters::EnergyEvse::Id: { + return AttributeIsSpecifiedInEnergyEVSECluster(aAttributeId); + } case Clusters::DoorLock::Id: { return AttributeIsSpecifiedInDoorLockCluster(aAttributeId); } @@ -5901,6 +6483,12 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::AccountLogin::Id: { return AttributeIsSpecifiedInAccountLoginCluster(aAttributeId); } + case Clusters::ContentControl::Id: { + return AttributeIsSpecifiedInContentControlCluster(aAttributeId); + } + case Clusters::ContentAppObserver::Id: { + return AttributeIsSpecifiedInContentAppObserverCluster(aAttributeId); + } case Clusters::ElectricalMeasurement::Id: { return AttributeIsSpecifiedInElectricalMeasurementCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 79b8ebef00124f..a2e2ae45788c22 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -313,15 +313,36 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RemainingCapacity::Id: { - using TypeInfo = Attributes::RemainingCapacity::TypeInfo; + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRScenesClusterSceneInfoStruct * newElement_0; + newElement_0 = [MTRScenesClusterSceneInfoStruct new]; + newElement_0.sceneCount = [NSNumber numberWithUnsignedChar:entry_0.sceneCount]; + newElement_0.currentScene = [NSNumber numberWithUnsignedChar:entry_0.currentScene]; + newElement_0.currentGroup = [NSNumber numberWithUnsignedShort:entry_0.currentGroup]; + newElement_0.sceneValid = [NSNumber numberWithBool:entry_0.sceneValid]; + newElement_0.remainingCapacity = [NSNumber numberWithUnsignedChar:entry_0.remainingCapacity]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } default: { @@ -1564,6 +1585,28 @@ static id _Nullable DecodeAttributeValueForBasicInformationCluster(AttributeId a } return value; } + case Attributes::SpecificationVersion::Id: { + using TypeInfo = Attributes::SpecificationVersion::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::MaxPathsPerInvoke::Id: { + using TypeInfo = Attributes::MaxPathsPerInvoke::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: { break; } @@ -5191,9 +5234,54 @@ static id _Nullable DecodeAttributeValueForICDManagementCluster(AttributeId aAtt *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOvenOperationalStateCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForTimerCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Timer; + switch (aAttributeId) { + case Attributes::SetTime::Id: { + using TypeInfo = Attributes::SetTime::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::TimeRemaining::Id: { + using TypeInfo = Attributes::TimeRemaining::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::TimerState::Id: { + using TypeInfo = Attributes::TimerState::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; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOvenCavityOperationalStateCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OvenOperationalState; + using namespace Clusters::OvenCavityOperationalState; switch (aAttributeId) { case Attributes::PhaseList::Id: { using TypeInfo = Attributes::PhaseList::TypeInfo; @@ -5273,8 +5361,8 @@ static id _Nullable DecodeAttributeValueForOvenOperationalStateCluster(Attribute auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROvenOperationalStateClusterOperationalStateStruct * newElement_0; - newElement_0 = [MTROvenOperationalStateClusterOperationalStateStruct new]; + MTROvenCavityOperationalStateClusterOperationalStateStruct * newElement_0; + newElement_0 = [MTROvenCavityOperationalStateClusterOperationalStateStruct new]; newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; if (entry_0.operationalStateLabel.HasValue()) { newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); @@ -5305,7 +5393,7 @@ static id _Nullable DecodeAttributeValueForOvenOperationalStateCluster(Attribute return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::OperationalError::Id: { @@ -5315,8 +5403,8 @@ static id _Nullable DecodeAttributeValueForOvenOperationalStateCluster(Attribute if (*aError != CHIP_NO_ERROR) { return nil; } - MTROvenOperationalStateClusterErrorStateStruct * _Nonnull value; - value = [MTROvenOperationalStateClusterErrorStateStruct new]; + MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull value; + value = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; if (cppValue.errorStateLabel.HasValue()) { value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); @@ -5348,6 +5436,167 @@ static id _Nullable DecodeAttributeValueForOvenOperationalStateCluster(Attribute *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForOvenModeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROvenModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTROvenModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTROvenModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTROvenModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForLaundryDryerControlsCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryDryerControls; + switch (aAttributeId) { + case Attributes::SupportedDrynessLevels::Id: { + using TypeInfo = Attributes::SupportedDrynessLevels::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SelectedDrynessLevel::Id: { + using TypeInfo = Attributes::SelectedDrynessLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForModeSelectCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ModeSelect; @@ -7132,64 +7381,1496 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForBooleanStateConfigurationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DoorLock; + using namespace Clusters::BooleanStateConfiguration; switch (aAttributeId) { - case Attributes::LockState::Id: { - using TypeInfo = Attributes::LockState::TypeInfo; + case Attributes::CurrentSensitivityLevel::Id: { + using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::LockType::Id: { - using TypeInfo = Attributes::LockType::TypeInfo; + case Attributes::SupportedSensitivityLevels::Id: { + using TypeInfo = Attributes::SupportedSensitivityLevels::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)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ActuatorEnabled::Id: { - using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; + case Attributes::DefaultSensitivityLevel::Id: { + using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::DoorState::Id: { - using TypeInfo = Attributes::DoorState::TypeInfo; + case Attributes::AlarmsActive::Id: { + using TypeInfo = Attributes::AlarmsActive::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::DoorOpenEvents::Id: { - using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; + case Attributes::AlarmsSuppressed::Id: { + using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::AlarmsEnabled::Id: { + using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::AlarmsSupported::Id: { + using TypeInfo = Attributes::AlarmsSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::SensorFault::Id: { + using TypeInfo = Attributes::SensorFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForValveConfigurationAndControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aAttributeId) { + case Attributes::OpenDuration::Id: { + using TypeInfo = Attributes::OpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::DefaultOpenDuration::Id: { + using TypeInfo = Attributes::DefaultOpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::AutoCloseTime::Id: { + using TypeInfo = Attributes::AutoCloseTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::RemainingDuration::Id: { + using TypeInfo = Attributes::RemainingDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::TargetState::Id: { + using TypeInfo = Attributes::TargetState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::TargetLevel::Id: { + using TypeInfo = Attributes::TargetLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::DefaultOpenLevel::Id: { + using TypeInfo = Attributes::DefaultOpenLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::ValveFault::Id: { + using TypeInfo = Attributes::ValveFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForElectricalEnergyMeasurementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ElectricalEnergyMeasurement; + switch (aAttributeId) { + case Attributes::Accuracy::Id: { + using TypeInfo = Attributes::Accuracy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nonnull value; + value = [MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct new]; + value.measurementType = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue.measurementType)]; + value.measured = [NSNumber numberWithBool:cppValue.measured]; + value.minMeasuredValue = [NSNumber numberWithLongLong:cppValue.minMeasuredValue]; + value.maxMeasuredValue = [NSNumber numberWithLongLong:cppValue.maxMeasuredValue]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.accuracyRanges.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct * newElement_1; + newElement_1 = [MTRElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct new]; + newElement_1.rangeMin = [NSNumber numberWithLongLong:entry_1.rangeMin]; + newElement_1.rangeMax = [NSNumber numberWithLongLong:entry_1.rangeMax]; + if (entry_1.percentMax.HasValue()) { + newElement_1.percentMax = [NSNumber numberWithUnsignedShort:entry_1.percentMax.Value()]; + } else { + newElement_1.percentMax = nil; + } + if (entry_1.percentMin.HasValue()) { + newElement_1.percentMin = [NSNumber numberWithUnsignedShort:entry_1.percentMin.Value()]; + } else { + newElement_1.percentMin = nil; + } + if (entry_1.percentTypical.HasValue()) { + newElement_1.percentTypical = [NSNumber numberWithUnsignedShort:entry_1.percentTypical.Value()]; + } else { + newElement_1.percentTypical = nil; + } + if (entry_1.fixedMax.HasValue()) { + newElement_1.fixedMax = [NSNumber numberWithUnsignedLongLong:entry_1.fixedMax.Value()]; + } else { + newElement_1.fixedMax = nil; + } + if (entry_1.fixedMin.HasValue()) { + newElement_1.fixedMin = [NSNumber numberWithUnsignedLongLong:entry_1.fixedMin.Value()]; + } else { + newElement_1.fixedMin = nil; + } + if (entry_1.fixedTypical.HasValue()) { + newElement_1.fixedTypical = [NSNumber numberWithUnsignedLongLong:entry_1.fixedTypical.Value()]; + } else { + newElement_1.fixedTypical = nil; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.accuracyRanges = array_1; + } + return value; + } + case Attributes::CumulativeEnergyImported::Id: { + using TypeInfo = Attributes::CumulativeEnergyImported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + value.energy = [NSNumber numberWithLongLong:cppValue.Value().energy]; + if (cppValue.Value().startTimestamp.HasValue()) { + value.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().startTimestamp.Value()]; + } else { + value.startTimestamp = nil; + } + if (cppValue.Value().endTimestamp.HasValue()) { + value.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().endTimestamp.Value()]; + } else { + value.endTimestamp = nil; + } + if (cppValue.Value().startSystime.HasValue()) { + value.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().startSystime.Value()]; + } else { + value.startSystime = nil; + } + if (cppValue.Value().endSystime.HasValue()) { + value.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().endSystime.Value()]; + } else { + value.endSystime = nil; + } + } + return value; + } + case Attributes::CumulativeEnergyExported::Id: { + using TypeInfo = Attributes::CumulativeEnergyExported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + value.energy = [NSNumber numberWithLongLong:cppValue.Value().energy]; + if (cppValue.Value().startTimestamp.HasValue()) { + value.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().startTimestamp.Value()]; + } else { + value.startTimestamp = nil; + } + if (cppValue.Value().endTimestamp.HasValue()) { + value.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().endTimestamp.Value()]; + } else { + value.endTimestamp = nil; + } + if (cppValue.Value().startSystime.HasValue()) { + value.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().startSystime.Value()]; + } else { + value.startSystime = nil; + } + if (cppValue.Value().endSystime.HasValue()) { + value.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().endSystime.Value()]; + } else { + value.endSystime = nil; + } + } + return value; + } + case Attributes::PeriodicEnergyImported::Id: { + using TypeInfo = Attributes::PeriodicEnergyImported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + value.energy = [NSNumber numberWithLongLong:cppValue.Value().energy]; + if (cppValue.Value().startTimestamp.HasValue()) { + value.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().startTimestamp.Value()]; + } else { + value.startTimestamp = nil; + } + if (cppValue.Value().endTimestamp.HasValue()) { + value.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().endTimestamp.Value()]; + } else { + value.endTimestamp = nil; + } + if (cppValue.Value().startSystime.HasValue()) { + value.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().startSystime.Value()]; + } else { + value.startSystime = nil; + } + if (cppValue.Value().endSystime.HasValue()) { + value.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().endSystime.Value()]; + } else { + value.endSystime = nil; + } + } + return value; + } + case Attributes::PeriodicEnergyExported::Id: { + using TypeInfo = Attributes::PeriodicEnergyExported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + value.energy = [NSNumber numberWithLongLong:cppValue.Value().energy]; + if (cppValue.Value().startTimestamp.HasValue()) { + value.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().startTimestamp.Value()]; + } else { + value.startTimestamp = nil; + } + if (cppValue.Value().endTimestamp.HasValue()) { + value.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().endTimestamp.Value()]; + } else { + value.endTimestamp = nil; + } + if (cppValue.Value().startSystime.HasValue()) { + value.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().startSystime.Value()]; + } else { + value.startSystime = nil; + } + if (cppValue.Value().endSystime.HasValue()) { + value.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.Value().endSystime.Value()]; + } else { + value.endSystime = nil; + } + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aAttributeId) { + case Attributes::LoadControlPrograms::Id: { + using TypeInfo = Attributes::LoadControlPrograms::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRDemandResponseLoadControlClusterLoadControlProgramStruct * newElement_0; + newElement_0 = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; + newElement_0.programID = AsData(entry_0.programID); + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_0.enrollmentGroup.IsNull()) { + newElement_0.enrollmentGroup = nil; + } else { + newElement_0.enrollmentGroup = [NSNumber numberWithUnsignedChar:entry_0.enrollmentGroup.Value()]; + } + if (entry_0.randomStartMinutes.IsNull()) { + newElement_0.randomStartMinutes = nil; + } else { + newElement_0.randomStartMinutes = [NSNumber numberWithUnsignedChar:entry_0.randomStartMinutes.Value()]; + } + if (entry_0.randomDurationMinutes.IsNull()) { + newElement_0.randomDurationMinutes = nil; + } else { + newElement_0.randomDurationMinutes = [NSNumber numberWithUnsignedChar:entry_0.randomDurationMinutes.Value()]; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::NumberOfLoadControlPrograms::Id: { + using TypeInfo = Attributes::NumberOfLoadControlPrograms::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Events::Id: { + using TypeInfo = Attributes::Events::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRDemandResponseLoadControlClusterLoadControlEventStruct * newElement_0; + newElement_0 = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; + newElement_0.eventID = AsData(entry_0.eventID); + if (entry_0.programID.IsNull()) { + newElement_0.programID = nil; + } else { + newElement_0.programID = AsData(entry_0.programID.Value()); + } + newElement_0.control = [NSNumber numberWithUnsignedShort:entry_0.control.Raw()]; + newElement_0.deviceClass = [NSNumber numberWithUnsignedInt:entry_0.deviceClass.Raw()]; + if (entry_0.enrollmentGroup.HasValue()) { + newElement_0.enrollmentGroup = [NSNumber numberWithUnsignedChar:entry_0.enrollmentGroup.Value()]; + } else { + newElement_0.enrollmentGroup = nil; + } + newElement_0.criticality = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.criticality)]; + if (entry_0.startTime.IsNull()) { + newElement_0.startTime = nil; + } else { + newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime.Value()]; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.transitions.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct * newElement_2; + newElement_2 = [MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct new]; + newElement_2.duration = [NSNumber numberWithUnsignedShort:entry_2.duration]; + newElement_2.control = [NSNumber numberWithUnsignedShort:entry_2.control.Raw()]; + if (entry_2.temperatureControl.HasValue()) { + newElement_2.temperatureControl = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; + if (entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) { + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { + newElement_2.temperatureControl.coolingTempOffset = nil; + } else { + newElement_2.temperatureControl.coolingTempOffset = [NSNumber numberWithUnsignedShort:entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()]; + } + } else { + newElement_2.temperatureControl.coolingTempOffset = nil; + } + if (entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) { + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { + newElement_2.temperatureControl.heatingtTempOffset = nil; + } else { + newElement_2.temperatureControl.heatingtTempOffset = [NSNumber numberWithUnsignedShort:entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()]; + } + } else { + newElement_2.temperatureControl.heatingtTempOffset = nil; + } + if (entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) { + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { + newElement_2.temperatureControl.coolingTempSetpoint = nil; + } else { + newElement_2.temperatureControl.coolingTempSetpoint = [NSNumber numberWithShort:entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()]; + } + } else { + newElement_2.temperatureControl.coolingTempSetpoint = nil; + } + if (entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) { + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { + newElement_2.temperatureControl.heatingTempSetpoint = nil; + } else { + newElement_2.temperatureControl.heatingTempSetpoint = [NSNumber numberWithShort:entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()]; + } + } else { + newElement_2.temperatureControl.heatingTempSetpoint = nil; + } + } else { + newElement_2.temperatureControl = nil; + } + if (entry_2.averageLoadControl.HasValue()) { + newElement_2.averageLoadControl = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; + newElement_2.averageLoadControl.loadAdjustment = [NSNumber numberWithChar:entry_2.averageLoadControl.Value().loadAdjustment]; + } else { + newElement_2.averageLoadControl = nil; + } + if (entry_2.dutyCycleControl.HasValue()) { + newElement_2.dutyCycleControl = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; + newElement_2.dutyCycleControl.dutyCycle = [NSNumber numberWithUnsignedChar:entry_2.dutyCycleControl.Value().dutyCycle]; + } else { + newElement_2.dutyCycleControl = nil; + } + if (entry_2.powerSavingsControl.HasValue()) { + newElement_2.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; + newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_2.powerSavingsControl.Value().powerSavings]; + } else { + newElement_2.powerSavingsControl = nil; + } + if (entry_2.heatingSourceControl.HasValue()) { + newElement_2.heatingSourceControl = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; + newElement_2.heatingSourceControl.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.heatingSourceControl.Value().heatingSource)]; + } else { + newElement_2.heatingSourceControl = nil; + } + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.transitions = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ActiveEvents::Id: { + using TypeInfo = Attributes::ActiveEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRDemandResponseLoadControlClusterLoadControlEventStruct * newElement_0; + newElement_0 = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; + newElement_0.eventID = AsData(entry_0.eventID); + if (entry_0.programID.IsNull()) { + newElement_0.programID = nil; + } else { + newElement_0.programID = AsData(entry_0.programID.Value()); + } + newElement_0.control = [NSNumber numberWithUnsignedShort:entry_0.control.Raw()]; + newElement_0.deviceClass = [NSNumber numberWithUnsignedInt:entry_0.deviceClass.Raw()]; + if (entry_0.enrollmentGroup.HasValue()) { + newElement_0.enrollmentGroup = [NSNumber numberWithUnsignedChar:entry_0.enrollmentGroup.Value()]; + } else { + newElement_0.enrollmentGroup = nil; + } + newElement_0.criticality = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.criticality)]; + if (entry_0.startTime.IsNull()) { + newElement_0.startTime = nil; + } else { + newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime.Value()]; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.transitions.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct * newElement_2; + newElement_2 = [MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct new]; + newElement_2.duration = [NSNumber numberWithUnsignedShort:entry_2.duration]; + newElement_2.control = [NSNumber numberWithUnsignedShort:entry_2.control.Raw()]; + if (entry_2.temperatureControl.HasValue()) { + newElement_2.temperatureControl = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; + if (entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) { + if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { + newElement_2.temperatureControl.coolingTempOffset = nil; + } else { + newElement_2.temperatureControl.coolingTempOffset = [NSNumber numberWithUnsignedShort:entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()]; + } + } else { + newElement_2.temperatureControl.coolingTempOffset = nil; + } + if (entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) { + if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { + newElement_2.temperatureControl.heatingtTempOffset = nil; + } else { + newElement_2.temperatureControl.heatingtTempOffset = [NSNumber numberWithUnsignedShort:entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()]; + } + } else { + newElement_2.temperatureControl.heatingtTempOffset = nil; + } + if (entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) { + if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { + newElement_2.temperatureControl.coolingTempSetpoint = nil; + } else { + newElement_2.temperatureControl.coolingTempSetpoint = [NSNumber numberWithShort:entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()]; + } + } else { + newElement_2.temperatureControl.coolingTempSetpoint = nil; + } + if (entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) { + if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { + newElement_2.temperatureControl.heatingTempSetpoint = nil; + } else { + newElement_2.temperatureControl.heatingTempSetpoint = [NSNumber numberWithShort:entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()]; + } + } else { + newElement_2.temperatureControl.heatingTempSetpoint = nil; + } + } else { + newElement_2.temperatureControl = nil; + } + if (entry_2.averageLoadControl.HasValue()) { + newElement_2.averageLoadControl = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; + newElement_2.averageLoadControl.loadAdjustment = [NSNumber numberWithChar:entry_2.averageLoadControl.Value().loadAdjustment]; + } else { + newElement_2.averageLoadControl = nil; + } + if (entry_2.dutyCycleControl.HasValue()) { + newElement_2.dutyCycleControl = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; + newElement_2.dutyCycleControl.dutyCycle = [NSNumber numberWithUnsignedChar:entry_2.dutyCycleControl.Value().dutyCycle]; + } else { + newElement_2.dutyCycleControl = nil; + } + if (entry_2.powerSavingsControl.HasValue()) { + newElement_2.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; + newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_2.powerSavingsControl.Value().powerSavings]; + } else { + newElement_2.powerSavingsControl = nil; + } + if (entry_2.heatingSourceControl.HasValue()) { + newElement_2.heatingSourceControl = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; + newElement_2.heatingSourceControl.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.heatingSourceControl.Value().heatingSource)]; + } else { + newElement_2.heatingSourceControl = nil; + } + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.transitions = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::NumberOfEventsPerProgram::Id: { + using TypeInfo = Attributes::NumberOfEventsPerProgram::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::NumberOfTransitions::Id: { + using TypeInfo = Attributes::NumberOfTransitions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::DefaultRandomStart::Id: { + using TypeInfo = Attributes::DefaultRandomStart::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::DefaultRandomDuration::Id: { + using TypeInfo = Attributes::DefaultRandomDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDeviceEnergyManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DeviceEnergyManagement; + switch (aAttributeId) { + case Attributes::ESAType::Id: { + using TypeInfo = Attributes::ESAType::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::ESACanGenerate::Id: { + using TypeInfo = Attributes::ESACanGenerate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ESAState::Id: { + using TypeInfo = Attributes::ESAState::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::AbsMinPower::Id: { + using TypeInfo = Attributes::AbsMinPower::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::AbsMaxPower::Id: { + using TypeInfo = Attributes::AbsMaxPower::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::PowerAdjustmentCapability::Id: { + using TypeInfo = Attributes::PowerAdjustmentCapability::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRDeviceEnergyManagementClusterPowerAdjustStruct * newElement_1; + newElement_1 = [MTRDeviceEnergyManagementClusterPowerAdjustStruct new]; + newElement_1.minPower = [NSNumber numberWithLongLong:entry_1.minPower]; + newElement_1.maxPower = [NSNumber numberWithLongLong:entry_1.maxPower]; + newElement_1.minDuration = [NSNumber numberWithUnsignedInt:entry_1.minDuration]; + newElement_1.maxDuration = [NSNumber numberWithUnsignedInt:entry_1.maxDuration]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_1; + } + } + return value; + } + case Attributes::Forecast::Id: { + using TypeInfo = Attributes::Forecast::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRDeviceEnergyManagementClusterForecastStruct new]; + value.forecastId = [NSNumber numberWithUnsignedShort:cppValue.Value().forecastId]; + if (cppValue.Value().activeSlotNumber.IsNull()) { + value.activeSlotNumber = nil; + } else { + value.activeSlotNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().activeSlotNumber.Value()]; + } + value.startTime = [NSNumber numberWithUnsignedInt:cppValue.Value().startTime]; + value.endTime = [NSNumber numberWithUnsignedInt:cppValue.Value().endTime]; + if (cppValue.Value().earliestStartTime.HasValue()) { + if (cppValue.Value().earliestStartTime.Value().IsNull()) { + value.earliestStartTime = nil; + } else { + value.earliestStartTime = [NSNumber numberWithUnsignedInt:cppValue.Value().earliestStartTime.Value().Value()]; + } + } else { + value.earliestStartTime = nil; + } + if (cppValue.Value().latestEndTime.HasValue()) { + value.latestEndTime = [NSNumber numberWithUnsignedInt:cppValue.Value().latestEndTime.Value()]; + } else { + value.latestEndTime = nil; + } + value.isPauseable = [NSNumber numberWithBool:cppValue.Value().isPauseable]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = cppValue.Value().slots.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRDeviceEnergyManagementClusterSlotStruct * newElement_2; + newElement_2 = [MTRDeviceEnergyManagementClusterSlotStruct new]; + newElement_2.minDuration = [NSNumber numberWithUnsignedInt:entry_2.minDuration]; + newElement_2.maxDuration = [NSNumber numberWithUnsignedInt:entry_2.maxDuration]; + newElement_2.defaultDuration = [NSNumber numberWithUnsignedInt:entry_2.defaultDuration]; + newElement_2.elapsedSlotTime = [NSNumber numberWithUnsignedInt:entry_2.elapsedSlotTime]; + newElement_2.remainingSlotTime = [NSNumber numberWithUnsignedInt:entry_2.remainingSlotTime]; + newElement_2.slotIsPauseable = [NSNumber numberWithBool:entry_2.slotIsPauseable]; + newElement_2.minPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.minPauseDuration]; + newElement_2.maxPauseDuration = [NSNumber numberWithUnsignedInt:entry_2.maxPauseDuration]; + if (entry_2.manufacturerESAState.HasValue()) { + newElement_2.manufacturerESAState = [NSNumber numberWithUnsignedShort:entry_2.manufacturerESAState.Value()]; + } else { + newElement_2.manufacturerESAState = nil; + } + if (entry_2.nominalPower.HasValue()) { + newElement_2.nominalPower = [NSNumber numberWithLongLong:entry_2.nominalPower.Value()]; + } else { + newElement_2.nominalPower = nil; + } + if (entry_2.minPower.HasValue()) { + newElement_2.minPower = [NSNumber numberWithLongLong:entry_2.minPower.Value()]; + } else { + newElement_2.minPower = nil; + } + if (entry_2.maxPower.HasValue()) { + newElement_2.maxPower = [NSNumber numberWithLongLong:entry_2.maxPower.Value()]; + } else { + newElement_2.maxPower = nil; + } + if (entry_2.nominalEnergy.HasValue()) { + newElement_2.nominalEnergy = [NSNumber numberWithLongLong:entry_2.nominalEnergy.Value()]; + } else { + newElement_2.nominalEnergy = nil; + } + if (entry_2.costs.HasValue()) { + { // Scope for our temporary variables + auto * array_5 = [NSMutableArray new]; + auto iter_5 = entry_2.costs.Value().begin(); + while (iter_5.Next()) { + auto & entry_5 = iter_5.GetValue(); + MTRDeviceEnergyManagementClusterCostStruct * newElement_5; + newElement_5 = [MTRDeviceEnergyManagementClusterCostStruct new]; + newElement_5.costType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_5.costType)]; + newElement_5.value = [NSNumber numberWithInt:entry_5.value]; + newElement_5.decimalPoints = [NSNumber numberWithUnsignedChar:entry_5.decimalPoints]; + if (entry_5.currency.HasValue()) { + newElement_5.currency = [NSNumber numberWithUnsignedShort:entry_5.currency.Value()]; + } else { + newElement_5.currency = nil; + } + [array_5 addObject:newElement_5]; + } + CHIP_ERROR err = iter_5.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_2.costs = array_5; + } + } else { + newElement_2.costs = nil; + } + if (entry_2.minPowerAdjustment.HasValue()) { + newElement_2.minPowerAdjustment = [NSNumber numberWithLongLong:entry_2.minPowerAdjustment.Value()]; + } else { + newElement_2.minPowerAdjustment = nil; + } + if (entry_2.maxPowerAdjustment.HasValue()) { + newElement_2.maxPowerAdjustment = [NSNumber numberWithLongLong:entry_2.maxPowerAdjustment.Value()]; + } else { + newElement_2.maxPowerAdjustment = nil; + } + if (entry_2.minDurationAdjustment.HasValue()) { + newElement_2.minDurationAdjustment = [NSNumber numberWithUnsignedInt:entry_2.minDurationAdjustment.Value()]; + } else { + newElement_2.minDurationAdjustment = nil; + } + if (entry_2.maxDurationAdjustment.HasValue()) { + newElement_2.maxDurationAdjustment = [NSNumber numberWithUnsignedInt:entry_2.maxDurationAdjustment.Value()]; + } else { + newElement_2.maxDurationAdjustment = nil; + } + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.slots = array_2; + } + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForEnergyEVSECluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::EnergyEvse; + switch (aAttributeId) { + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::SupplyState::Id: { + using TypeInfo = Attributes::SupplyState::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::FaultState::Id: { + using TypeInfo = Attributes::FaultState::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::ChargingEnabledUntil::Id: { + using TypeInfo = Attributes::ChargingEnabledUntil::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::DischargingEnabledUntil::Id: { + using TypeInfo = Attributes::DischargingEnabledUntil::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::CircuitCapacity::Id: { + using TypeInfo = Attributes::CircuitCapacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::MinimumChargeCurrent::Id: { + using TypeInfo = Attributes::MinimumChargeCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::MaximumChargeCurrent::Id: { + using TypeInfo = Attributes::MaximumChargeCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::MaximumDischargeCurrent::Id: { + using TypeInfo = Attributes::MaximumDischargeCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::UserMaximumChargeCurrent::Id: { + using TypeInfo = Attributes::UserMaximumChargeCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::RandomizationDelayWindow::Id: { + using TypeInfo = Attributes::RandomizationDelayWindow::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::NumberOfWeeklyTargets::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTargets::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::NumberOfDailyTargets::Id: { + using TypeInfo = Attributes::NumberOfDailyTargets::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::NextChargeStartTime::Id: { + using TypeInfo = Attributes::NextChargeStartTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::NextChargeTargetTime::Id: { + using TypeInfo = Attributes::NextChargeTargetTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::NextChargeRequiredEnergy::Id: { + using TypeInfo = Attributes::NextChargeRequiredEnergy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::NextChargeTargetSoC::Id: { + using TypeInfo = Attributes::NextChargeTargetSoC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::ApproximateEVEfficiency::Id: { + using TypeInfo = Attributes::ApproximateEVEfficiency::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::StateOfCharge::Id: { + using TypeInfo = Attributes::StateOfCharge::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::BatteryCapacity::Id: { + using TypeInfo = Attributes::BatteryCapacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::VehicleID::Id: { + using TypeInfo = Attributes::VehicleID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsString(cppValue.Value()); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + return value; + } + case Attributes::SessionID::Id: { + using TypeInfo = Attributes::SessionID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::SessionDuration::Id: { + using TypeInfo = Attributes::SessionDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::SessionEnergyCharged::Id: { + using TypeInfo = Attributes::SessionEnergyCharged::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::SessionEnergyDischarged::Id: { + using TypeInfo = Attributes::SessionEnergyDischarged::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DoorLock; + switch (aAttributeId) { + case Attributes::LockState::Id: { + using TypeInfo = Attributes::LockState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::LockType::Id: { + using TypeInfo = Attributes::LockType::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::ActuatorEnabled::Id: { + using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::DoorState::Id: { + using TypeInfo = Attributes::DoorState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::DoorOpenEvents::Id: { + using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8538,7 +10219,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ControlSequenceOfOperation::Id: { @@ -8560,7 +10241,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ThermostatRunningMode::Id: { @@ -8571,7 +10252,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::StartOfWeek::Id: { @@ -8582,7 +10263,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::NumberOfWeeklyTransitions::Id: { @@ -8615,7 +10296,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::TemperatureSetpointHoldDuration::Id: { @@ -8641,7 +10322,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ThermostatRunningState::Id: { @@ -8652,7 +10333,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::SetpointChangeSource::Id: { @@ -8663,7 +10344,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::SetpointChangeAmount::Id: { @@ -8801,7 +10482,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCapacity::Id: { @@ -8823,7 +10504,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCompressorType::Id: { @@ -8834,7 +10515,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACErrorCode::Id: { @@ -8845,7 +10526,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } case Attributes::ACLouverPosition::Id: { @@ -8856,7 +10537,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCoilTemperature::Id: { @@ -8882,7 +10563,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } default: { @@ -9057,7 +10738,7 @@ static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationC return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::KeypadLockout::Id: { @@ -9068,7 +10749,7 @@ static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationC return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ScheduleProgrammingVisibility::Id: { @@ -9079,7 +10760,7 @@ static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationC return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } default: { @@ -12105,6 +13786,21 @@ static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttribute } else { newElement_0.affiliateCallSign = nil; } + if (entry_0.identifier.HasValue()) { + newElement_0.identifier = AsString(entry_0.identifier.Value()); + if (newElement_0.identifier == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.identifier = nil; + } + if (entry_0.type.HasValue()) { + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type.Value())]; + } else { + newElement_0.type = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12202,6 +13898,21 @@ static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttribute } else { value.affiliateCallSign = nil; } + if (cppValue.Value().identifier.HasValue()) { + value.identifier = AsString(cppValue.Value().identifier.Value()); + if (value.identifier == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.identifier = nil; + } + if (cppValue.Value().type.HasValue()) { + value.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().type.Value())]; + } else { + value.type = nil; + } } return value; } @@ -12335,44 +14046,258 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster(AttributeId aAtt } return value; } - case Attributes::PlaybackSpeed::Id: { - using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; + case Attributes::PlaybackSpeed::Id: { + using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } + case Attributes::SeekRangeEnd::Id: { + using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::SeekRangeStart::Id: { + using TypeInfo = Attributes::SeekRangeStart::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::ActiveAudioTrack::Id: { + using TypeInfo = Attributes::ActiveAudioTrack::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRMediaPlaybackClusterTrackStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRMediaPlaybackClusterTrackStruct new]; + value.id = AsString(cppValue.Value().id); + if (value.id == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.IsNull()) { + value.trackAttributes = nil; + } else { + value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.Value().languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.Value().displayName.HasValue()) { + if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { + value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.Value().displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + value.trackAttributes.displayName = nil; + } + } + } + return value; + } + case Attributes::AvailableAudioTracks::Id: { + using TypeInfo = Attributes::AvailableAudioTracks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + NSArray * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRMediaPlaybackClusterTrackStruct * newElement_1; + newElement_1 = [MTRMediaPlaybackClusterTrackStruct new]; + newElement_1.id = AsString(entry_1.id); + if (newElement_1.id == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.IsNull()) { + newElement_1.trackAttributes = nil; + } else { + newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.Value().displayName.HasValue()) { + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { + newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + newElement_1.trackAttributes.displayName = nil; + } + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_1; + } + } return value; } - case Attributes::SeekRangeEnd::Id: { - using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; + case Attributes::ActiveTextTrack::Id: { + using TypeInfo = Attributes::ActiveTextTrack::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + MTRMediaPlaybackClusterTrackStruct * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + value = [MTRMediaPlaybackClusterTrackStruct new]; + value.id = AsString(cppValue.Value().id); + if (value.id == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.IsNull()) { + value.trackAttributes = nil; + } else { + value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.Value().languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.Value().displayName.HasValue()) { + if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { + value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.Value().displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + value.trackAttributes.displayName = nil; + } + } } return value; } - case Attributes::SeekRangeStart::Id: { - using TypeInfo = Attributes::SeekRangeStart::TypeInfo; + case Attributes::AvailableTextTracks::Id: { + using TypeInfo = Attributes::AvailableTextTracks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + NSArray * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRMediaPlaybackClusterTrackStruct * newElement_1; + newElement_1 = [MTRMediaPlaybackClusterTrackStruct new]; + newElement_1.id = AsString(entry_1.id); + if (newElement_1.id == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.IsNull()) { + newElement_1.trackAttributes = nil; + } else { + newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.Value().displayName.HasValue()) { + if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { + newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + newElement_1.trackAttributes.displayName = nil; + } + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_1; + } } return value; } @@ -12797,6 +14722,190 @@ static id _Nullable DecodeAttributeValueForAccountLoginCluster(AttributeId aAttr *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForContentControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ContentControl; + switch (aAttributeId) { + case Attributes::Enabled::Id: { + using TypeInfo = Attributes::Enabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::OnDemandRatings::Id: { + using TypeInfo = Attributes::OnDemandRatings::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRContentControlClusterRatingNameStruct * newElement_0; + newElement_0 = [MTRContentControlClusterRatingNameStruct new]; + newElement_0.ratingName = AsString(entry_0.ratingName); + if (newElement_0.ratingName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_0.ratingNameDesc.HasValue()) { + newElement_0.ratingNameDesc = AsString(entry_0.ratingNameDesc.Value()); + if (newElement_0.ratingNameDesc == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.ratingNameDesc = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::OnDemandRatingThreshold::Id: { + using TypeInfo = Attributes::OnDemandRatingThreshold::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::ScheduledContentRatings::Id: { + using TypeInfo = Attributes::ScheduledContentRatings::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRContentControlClusterRatingNameStruct * newElement_0; + newElement_0 = [MTRContentControlClusterRatingNameStruct new]; + newElement_0.ratingName = AsString(entry_0.ratingName); + if (newElement_0.ratingName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_0.ratingNameDesc.HasValue()) { + newElement_0.ratingNameDesc = AsString(entry_0.ratingNameDesc.Value()); + if (newElement_0.ratingNameDesc == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.ratingNameDesc = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ScheduledContentRatingThreshold::Id: { + using TypeInfo = Attributes::ScheduledContentRatingThreshold::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::ScreenDailyTime::Id: { + using TypeInfo = Attributes::ScreenDailyTime::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::RemainingScreenTime::Id: { + using TypeInfo = Attributes::RemainingScreenTime::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::BlockUnrated::Id: { + using TypeInfo = Attributes::BlockUnrated::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForContentAppObserverCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ContentAppObserver; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ElectricalMeasurement; @@ -15773,8 +17882,17 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::IcdManagement::Id: { return DecodeAttributeValueForICDManagementCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::OvenOperationalState::Id: { - return DecodeAttributeValueForOvenOperationalStateCluster(aPath.mAttributeId, aReader, aError); + case Clusters::Timer::Id: { + return DecodeAttributeValueForTimerCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::OvenCavityOperationalState::Id: { + return DecodeAttributeValueForOvenCavityOperationalStateCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::OvenMode::Id: { + return DecodeAttributeValueForOvenModeCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::LaundryDryerControls::Id: { + return DecodeAttributeValueForLaundryDryerControlsCluster(aPath.mAttributeId, aReader, aError); } case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); @@ -15830,6 +17948,24 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::BooleanStateConfiguration::Id: { + return DecodeAttributeValueForBooleanStateConfigurationCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::ValveConfigurationAndControl::Id: { + return DecodeAttributeValueForValveConfigurationAndControlCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::ElectricalEnergyMeasurement::Id: { + return DecodeAttributeValueForElectricalEnergyMeasurementCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::DemandResponseLoadControl::Id: { + return DecodeAttributeValueForDemandResponseLoadControlCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::DeviceEnergyManagement::Id: { + return DecodeAttributeValueForDeviceEnergyManagementCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::EnergyEvse::Id: { + return DecodeAttributeValueForEnergyEVSECluster(aPath.mAttributeId, aReader, aError); + } case Clusters::DoorLock::Id: { return DecodeAttributeValueForDoorLockCluster(aPath.mAttributeId, aReader, aError); } @@ -15941,6 +18077,12 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::AccountLogin::Id: { return DecodeAttributeValueForAccountLoginCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::ContentControl::Id: { + return DecodeAttributeValueForContentControlCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::ContentAppObserver::Id: { + return DecodeAttributeValueForContentAppObserverCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::ElectricalMeasurement::Id: { return DecodeAttributeValueForElectricalMeasurementCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 1f64ae95c2441a..49cc9273260b2d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -327,11 +327,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -1558,6 +1558,18 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(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_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2282,11 +2294,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -4641,8 +4653,8 @@ MTR_PROVISIONALLY_AVAILABLE * * Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithCompletion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -4747,44 +4759,150 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Oven Operational State + * Cluster Timer + * + * This cluster supports creating a simple timer functionality. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterTimer : MTRGenericBaseCluster + +/** + * Command SetTimer + * + * This command is used to set the timer. + */ +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ResetTimer + * + * This command is used to reset the timer to the original value. + */ +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetTimerWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddTime + * + * This command is used to add time to the existing timer. + */ +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ReduceTime + * + * This command is used to reduce time on the existing timer. + */ +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimerStateWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterTimer (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Oven Cavity Operational State * * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRBaseClusterOvenOperationalState : MTRGenericBaseCluster +@interface MTRBaseClusterOvenCavityOperationalState : MTRGenericBaseCluster /** * Command Pause * * Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ -- (void)pauseWithParams:(MTROvenOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command Stop * * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ -- (void)stopWithParams:(MTROvenOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command Start * * Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ -- (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command Resume * * Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ -- (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -4817,11 +4935,184 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterOvenCavityOperationalState (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Oven Mode + * + * Attributes and commands for selecting a mode from a list of supported options. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterOvenMode : MTRGenericBaseCluster + +/** + * Command ChangeToMode + * + * This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + */ +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOnModeWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterOvenMode (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Laundry Dryer Controls + * + * This cluster supports remotely monitoring and controling the different typs of + functionality available to a drying device, such as a laundry dryer. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterLaundryDryerControls : MTRGenericBaseCluster + +- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(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 @@ -4864,7 +5155,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRBaseClusterOvenOperationalState (Availability) +@interface MTRBaseClusterLaundryDryerControls (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -5272,7 +5563,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterRVCRunMode : MTRGenericBaseCluster /** @@ -5281,39 +5572,39 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -5321,23 +5612,23 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5352,7 +5643,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -5361,7 +5652,7 @@ MTR_PROVISIONALLY_AVAILABLE * * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterRVCCleanMode : MTRGenericBaseCluster /** @@ -5370,39 +5661,39 @@ MTR_PROVISIONALLY_AVAILABLE * This command is used to change device modes. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -5410,23 +5701,23 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5441,7 +5732,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -6222,7 +6513,7 @@ MTR_PROVISIONALLY_AVAILABLE * * This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterOperationalState : MTRGenericBaseCluster /** @@ -6230,81 +6521,81 @@ MTR_PROVISIONALLY_AVAILABLE * * Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command Stop * * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command Start * * Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command Resume * * Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -6312,23 +6603,23 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6343,7 +6634,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -6352,7 +6643,7 @@ MTR_PROVISIONALLY_AVAILABLE * * This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRBaseClusterRVCOperationalState : MTRGenericBaseCluster /** @@ -6360,9 +6651,9 @@ MTR_PROVISIONALLY_AVAILABLE * * Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; /** * Command Stop * @@ -6384,57 +6675,57 @@ MTR_PROVISIONALLY_AVAILABLE * * Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -6442,23 +6733,23 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6473,7 +6764,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -6614,31 +6905,948 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterActivatedCarbonFilterMonitoring (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Boolean State Configuration + * + * This cluster is used to configure a boolean sensor. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterBooleanStateConfiguration : MTRGenericBaseCluster + +/** + * Command SuppressAlarm + * + * This command is used to suppress the specified alarm mode. + */ +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnableDisableAlarm + * + * This command is used to enable or disable the specified alarm mode. + */ +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSensorFaultWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterBooleanStateConfiguration (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Valve Configuration and Control + * + * This cluster is used to configure a valve. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterValveConfigurationAndControl : MTRGenericBaseCluster + +/** + * Command Open + * + * This command is used to set the valve to its open position. + */ +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command Close + * + * This command is used to set the valve to its closed position. + */ +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeValveFaultWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterValveConfigurationAndControl (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Electrical Energy Measurement + * + * This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterElectricalEnergyMeasurement : MTRGenericBaseCluster + +- (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterElectricalEnergyMeasurement (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Demand Response Load Control + * + * This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterDemandResponseLoadControl : MTRGenericBaseCluster + +/** + * Command RegisterLoadControlProgramRequest + * + * Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values. + */ +- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command UnregisterLoadControlProgramRequest + * + * Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID. + */ +- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddLoadControlEventRequest + * + * On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event. + */ +- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveLoadControlEventRequest + * + * Upon receipt, this SHALL remove the LoadControlEventStruct with the matching EventID from LoadEventPrograms. + */ +- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ClearLoadControlEventsRequest + * + * Upon receipt, this SHALL clear all the load control events. + */ +- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearLoadControlEventsRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultRandomDurationWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterDemandResponseLoadControl (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Device Energy Management + * + * This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterDeviceEnergyManagement : MTRGenericBaseCluster + +/** + * Command PowerAdjustRequest + * + * Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. + */ +- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CancelPowerAdjustRequest + * + * Allows a client to cancel an ongoing PowerAdjustmentRequest operation. + */ +- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPowerAdjustRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StartTimeAdjustRequest + * + * Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). + */ +- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command PauseRequest + * + * Allows a client to temporarily pause an operation and reduce the ESAs energy demand. + */ +- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ResumeRequest + * + * Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. + */ +- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ModifyForecastRequest + * + * Allows a client to modify a Forecast within the limits allowed by the ESA. + */ +- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RequestConstraintBasedForecast + * + * Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. + */ +- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterDeviceEnergyManagement (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Energy EVSE + * + * Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterEnergyEVSE : MTRGenericBaseCluster + +/** + * Command Disable + * + * Allows a client to disable the EVSE from charging and discharging. + */ +- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)disableWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnableCharging + * + * Allows a client to enable the EVSE to charge an EV. + */ +- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnableDischarging + * + * Allows a client to enable the EVSE to discharge an EV. + */ +- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StartDiagnostics + * + * Allows a client to put the EVSE into a self-diagnostics mode. + */ +- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startDiagnosticsWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetTargets + * + * Allows a client to set the user specified charging targets. + */ +- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command GetTargets + * + * Allows a client to retrieve the user specified charging targets. + */ +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ClearTargets + * + * Allows a client to clear all stored charging targets. + */ +- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearTargetsWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRandomizationDelayWindowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNextChargeTargetTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNextChargeTargetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNextChargeRequiredEnergyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNextChargeRequiredEnergyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNextChargeRequiredEnergyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNextChargeTargetSoCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams *)params +- (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(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 @@ -6681,7 +7889,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRBaseClusterActivatedCarbonFilterMonitoring (Availability) +@interface MTRBaseClusterEnergyEVSE (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -11055,6 +12263,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. */ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GetProgramGuide + * + * This command retrieves the program guide. It accepts several filter parameters to return specific schedule and program information from a content app. The command shall receive in response a ProgramGuideResponse. + */ +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RecordProgram + * + * Record a specific program or series when it goes live. This functionality enables DVR recording features. + */ +- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CancelRecordProgram + * + * Cancel recording for a specific program or series. + */ +- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams *)params @@ -11269,16 +12495,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Command FastForward * * Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). */ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Command SkipForward * @@ -11297,6 +12519,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: */ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command ActivateAudioTrack + * + * Upon receipt, the server SHALL set the active Audio Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server will return an error status of INVALID_ARGUMENT. + */ +- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ActivateTextTrack + * + * Upon receipt, the server SHALL set the active Text Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server SHALL return an error status of INVALID_ARGUMENT. + */ +- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command DeactivateTextTrack + * + * If a Text Track is active (i.e. being displayed), upon receipt of this command, the server SHALL stop displaying it. + */ +- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)deactivateTextTrackWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params @@ -11340,6 +12582,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAvailableAudioTracksWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAvailableAudioTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveTextTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11984,21 +13250,281 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterApplicationBasic (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@end + +/** + * Cluster Account Login + * + * This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. + */ +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRBaseClusterAccountLogin : MTRGenericBaseCluster + +/** + * Command GetSetupPIN + * + * Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. + */ +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command Login + * + * Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. + */ +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command Logout + * + * The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. + */ +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterAccountLogin (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@end + +/** + * Cluster Content Control + * + * This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterContentControl : MTRGenericBaseCluster + +/** + * Command UpdatePIN + * + * The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. + */ +- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ResetPIN + * + * The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. + */ +- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetPINWithCompletion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command Enable + * + * The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. + */ +- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command Disable + * + * The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. + */ +- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)disableWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddBonusTime + * + * The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. + */ +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetScreenDailyTime + * + * The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. + */ +- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command BlockUnratedContent + * + * The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. + */ +- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)blockUnratedContentWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command UnblockUnratedContent + * + * The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. + */ +- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unblockUnratedContentWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetOnDemandRatingThreshold + * + * The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. + */ +- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetScheduledContentRatingThreshold + * + * The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. + */ +- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeBlockUnratedWithClusterStateCache:(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 + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end -@interface MTRBaseClusterApplicationBasic (Availability) +@interface MTRBaseClusterContentControl (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -12006,50 +13532,36 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; @end /** - * Cluster Account Login + * Cluster Content App Observer * - * This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. + * This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterAccountLogin : MTRGenericBaseCluster +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterContentAppObserver : MTRGenericBaseCluster /** - * Command GetSetupPIN - * - * Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. - */ -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command Login - * - * Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. - */ -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command Logout + * Command ContentAppMessage * - * The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. + * Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. */ -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)logoutWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -12057,30 +13569,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end -@interface MTRBaseClusterAccountLogin (Availability) +@interface MTRBaseClusterContentAppObserver (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -12088,7 +13600,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; @end @@ -13996,8 +15508,8 @@ typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { } MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRScenesNameSupportBitmap) { - MTRScenesNameSupportBitmapSceneNames MTR_NEWLY_AVAILABLE = 0x80, -} MTR_NEWLY_AVAILABLE; + MTRScenesNameSupportBitmapSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x80, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROnOffDelayedAllOffEffectVariant) { MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, @@ -14055,10 +15567,20 @@ typedef NS_OPTIONS(uint32_t, MTRLevelControlFeature) { MTRLevelControlFeatureFrequency MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRLevelControlOptionsBitmap) { + MTRLevelControlOptionsBitmapExecuteIfOff MTR_NEWLY_AVAILABLE = 0x1, + MTRLevelControlOptionsBitmapCoupleColorTempToLevel MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRLevelControlOptions) { - MTRLevelControlOptionsExecuteIfOff MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRLevelControlOptionsCoupleColorTempToLevel MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + MTRLevelControlOptionsExecuteIfOff MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRLevelControlOptionsBitmapExecuteIfOff") + = 0x1, + MTRLevelControlOptionsCoupleColorTempToLevel MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRLevelControlOptionsBitmapCoupleColorTempToLevel") + = 0x2, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRLevelControlOptionsBitmap"); typedef NS_OPTIONS(uint32_t, MTRDescriptorFeature) { MTRDescriptorFeatureTagList MTR_PROVISIONALLY_AVAILABLE = 0x1, @@ -15004,18 +16526,52 @@ typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_PROVISIONALLY_AVAILABLE = 0x10000, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROvenOperationalStateErrorState) { - MTROvenOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTRTimerStatus) { + MTRTimerStatusRunning MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRTimerStatusPaused MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRTimerStatusExpired MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRTimerStatusReady MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRTimerFeature) { + MTRTimerFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateErrorState) { + MTROvenCavityOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenCavityOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenCavityOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenCavityOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateOperationalState) { + MTROvenCavityOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenCavityOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenCavityOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenCavityOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROvenOperationalStateOperationalState) { - MTROvenOperationalStateOperationalStatePreheating MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTROvenOperationalStateOperationalStatePreheated MTR_PROVISIONALLY_AVAILABLE = 0x41, - MTROvenOperationalStateOperationalStateCoolingDown MTR_PROVISIONALLY_AVAILABLE = 0x42, - MTROvenOperationalStateOperationalStateSelfCleaning MTR_PROVISIONALLY_AVAILABLE = 0x43, +typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { + MTROvenModeModeTagBake MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTROvenModeModeTagConvection MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTROvenModeModeTagGrill MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTROvenModeModeTagRoast MTR_PROVISIONALLY_AVAILABLE = 0x4003, + MTROvenModeModeTagClean MTR_PROVISIONALLY_AVAILABLE = 0x4004, + MTROvenModeModeTagConvectionBake MTR_PROVISIONALLY_AVAILABLE = 0x4005, + MTROvenModeModeTagConvectionRoast MTR_PROVISIONALLY_AVAILABLE = 0x4006, + MTROvenModeModeTagWarming MTR_PROVISIONALLY_AVAILABLE = 0x4007, + MTROvenModeModeTagProofing MTR_PROVISIONALLY_AVAILABLE = 0x4008, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTROvenModeFeature) { + MTROvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRLaundryDryerControlsDrynessLevel) { + MTRLaundryDryerControlsDrynessLevelLow MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRLaundryDryerControlsDrynessLevelNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRLaundryDryerControlsDrynessLevelExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRLaundryDryerControlsDrynessLevelMax MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { @@ -15056,38 +16612,38 @@ typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { - MTRRVCRunModeModeTagIdle MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRRVCRunModeModeTagCleaning MTR_PROVISIONALLY_AVAILABLE = 0x4001, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCRunModeModeTagIdle MTR_NEWLY_AVAILABLE = 0x4000, + MTRRVCRunModeModeTagCleaning MTR_NEWLY_AVAILABLE = 0x4001, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { - MTRRVCRunModeStatusCodeStuck MTR_PROVISIONALLY_AVAILABLE = 0x41, - MTRRVCRunModeStatusCodeDustBinMissing MTR_PROVISIONALLY_AVAILABLE = 0x42, - MTRRVCRunModeStatusCodeDustBinFull MTR_PROVISIONALLY_AVAILABLE = 0x43, - MTRRVCRunModeStatusCodeWaterTankEmpty MTR_PROVISIONALLY_AVAILABLE = 0x44, - MTRRVCRunModeStatusCodeWaterTankMissing MTR_PROVISIONALLY_AVAILABLE = 0x45, - MTRRVCRunModeStatusCodeWaterTankLidOpen MTR_PROVISIONALLY_AVAILABLE = 0x46, - MTRRVCRunModeStatusCodeMopCleaningPadMissing MTR_PROVISIONALLY_AVAILABLE = 0x47, - MTRRVCRunModeStatusCodeBatteryLow MTR_PROVISIONALLY_AVAILABLE = 0x48, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCRunModeStatusCodeStuck MTR_NEWLY_AVAILABLE = 0x41, + MTRRVCRunModeStatusCodeDustBinMissing MTR_NEWLY_AVAILABLE = 0x42, + MTRRVCRunModeStatusCodeDustBinFull MTR_NEWLY_AVAILABLE = 0x43, + MTRRVCRunModeStatusCodeWaterTankEmpty MTR_NEWLY_AVAILABLE = 0x44, + MTRRVCRunModeStatusCodeWaterTankMissing MTR_NEWLY_AVAILABLE = 0x45, + MTRRVCRunModeStatusCodeWaterTankLidOpen MTR_NEWLY_AVAILABLE = 0x46, + MTRRVCRunModeStatusCodeMopCleaningPadMissing MTR_NEWLY_AVAILABLE = 0x47, + MTRRVCRunModeStatusCodeBatteryLow MTR_NEWLY_AVAILABLE = 0x48, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { - MTRRVCRunModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCRunModeFeatureOnOff MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { - MTRRVCCleanModeModeTagDeepClean MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRRVCCleanModeModeTagVacuum MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRRVCCleanModeModeTagMop MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCCleanModeModeTagDeepClean MTR_NEWLY_AVAILABLE = 0x4000, + MTRRVCCleanModeModeTagVacuum MTR_NEWLY_AVAILABLE = 0x4001, + MTRRVCCleanModeModeTagMop MTR_NEWLY_AVAILABLE = 0x4002, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { - MTRRVCCleanModeStatusCodeCleaningInProgress MTR_PROVISIONALLY_AVAILABLE = 0x40, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCCleanModeStatusCodeCleaningInProgress MTR_NEWLY_AVAILABLE = 0x40, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { - MTRRVCCleanModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCCleanModeFeatureOnOff MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, @@ -15195,35 +16751,35 @@ typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenModeFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { - MTROperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; + MTROperationalStateErrorStateNoError MTR_NEWLY_AVAILABLE = 0x00, + MTROperationalStateErrorStateUnableToStartOrResume MTR_NEWLY_AVAILABLE = 0x01, + MTROperationalStateErrorStateUnableToCompleteOperation MTR_NEWLY_AVAILABLE = 0x02, + MTROperationalStateErrorStateCommandInvalidInState MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROperationalState) { - MTROperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; + MTROperationalStateStopped MTR_NEWLY_AVAILABLE = 0x00, + MTROperationalStateRunning MTR_NEWLY_AVAILABLE = 0x01, + MTROperationalStatePaused MTR_NEWLY_AVAILABLE = 0x02, + MTROperationalStateError MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { - MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRRVCOperationalStateErrorStateStuck MTR_PROVISIONALLY_AVAILABLE = 0x41, - MTRRVCOperationalStateErrorStateDustBinMissing MTR_PROVISIONALLY_AVAILABLE = 0x42, - MTRRVCOperationalStateErrorStateDustBinFull MTR_PROVISIONALLY_AVAILABLE = 0x43, - MTRRVCOperationalStateErrorStateWaterTankEmpty MTR_PROVISIONALLY_AVAILABLE = 0x44, - MTRRVCOperationalStateErrorStateWaterTankMissing MTR_PROVISIONALLY_AVAILABLE = 0x45, - MTRRVCOperationalStateErrorStateWaterTankLidOpen MTR_PROVISIONALLY_AVAILABLE = 0x46, - MTRRVCOperationalStateErrorStateMopCleaningPadMissing MTR_PROVISIONALLY_AVAILABLE = 0x47, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_NEWLY_AVAILABLE = 0x40, + MTRRVCOperationalStateErrorStateStuck MTR_NEWLY_AVAILABLE = 0x41, + MTRRVCOperationalStateErrorStateDustBinMissing MTR_NEWLY_AVAILABLE = 0x42, + MTRRVCOperationalStateErrorStateDustBinFull MTR_NEWLY_AVAILABLE = 0x43, + MTRRVCOperationalStateErrorStateWaterTankEmpty MTR_NEWLY_AVAILABLE = 0x44, + MTRRVCOperationalStateErrorStateWaterTankMissing MTR_NEWLY_AVAILABLE = 0x45, + MTRRVCOperationalStateErrorStateWaterTankLidOpen MTR_NEWLY_AVAILABLE = 0x46, + MTRRVCOperationalStateErrorStateMopCleaningPadMissing MTR_NEWLY_AVAILABLE = 0x47, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { - MTRRVCOperationalStateOperationalStateSeekingCharger MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRRVCOperationalStateOperationalStateCharging MTR_PROVISIONALLY_AVAILABLE = 0x41, - MTRRVCOperationalStateOperationalStateDocked MTR_PROVISIONALLY_AVAILABLE = 0x42, -} MTR_PROVISIONALLY_AVAILABLE; + MTRRVCOperationalStateOperationalStateSeekingCharger MTR_NEWLY_AVAILABLE = 0x40, + MTRRVCOperationalStateOperationalStateCharging MTR_NEWLY_AVAILABLE = 0x41, + MTRRVCOperationalStateOperationalStateDocked MTR_NEWLY_AVAILABLE = 0x42, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringChangeIndication) { MTRHEPAFilterMonitoringChangeIndicationOK MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -15275,6 +16831,264 @@ typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint8_t, MTRBooleanStateConfigurationAlarmModeBitmap) { + MTRBooleanStateConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanStateConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRBooleanStateConfigurationFeature) { + MTRBooleanStateConfigurationFeatureVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanStateConfigurationFeatureAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRBooleanStateConfigurationFeatureAlarmSuppress MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRBooleanStateConfigurationFeatureSensitivityLevel MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) { + MTRBooleanStateConfigurationSensorFaultBitmapGeneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlStatusCode) { + MTRValveConfigurationAndControlStatusCodeFailureDueToFault MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { + MTRValveConfigurationAndControlValveStateClosed MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRValveConfigurationAndControlValveStateOpen MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRValveConfigurationAndControlValveStateTransitioning MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRValveConfigurationAndControlFeature) { + MTRValveConfigurationAndControlFeatureTimeSync MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRValveConfigurationAndControlFeatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRValveConfigurationAndControlValveFaultBitmap) { + MTRValveConfigurationAndControlValveFaultBitmapGeneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRValveConfigurationAndControlValveFaultBitmapBlocked MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRValveConfigurationAndControlValveFaultBitmapLeaking MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRValveConfigurationAndControlValveFaultBitmapNotConnected MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRValveConfigurationAndControlValveFaultBitmapShortCircuit MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRValveConfigurationAndControlValveFaultBitmapCurrentExceeded MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint16_t, MTRElectricalEnergyMeasurementMeasurementType) { + MTRElectricalEnergyMeasurementMeasurementTypeUnspecified MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRElectricalEnergyMeasurementMeasurementTypeVoltage MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRElectricalEnergyMeasurementMeasurementTypeActiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRElectricalEnergyMeasurementMeasurementTypeReactiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRElectricalEnergyMeasurementMeasurementTypeApparentCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRElectricalEnergyMeasurementMeasurementTypeActivePower MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRElectricalEnergyMeasurementMeasurementTypeReactivePower MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRElectricalEnergyMeasurementMeasurementTypeApparentPower MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRElectricalEnergyMeasurementMeasurementTypeRMSVoltage MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRElectricalEnergyMeasurementMeasurementTypeRMSCurrent MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRElectricalEnergyMeasurementMeasurementTypeRMSPower MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRElectricalEnergyMeasurementMeasurementTypeFrequency MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRElectricalEnergyMeasurementMeasurementTypePowerFactor MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRElectricalEnergyMeasurementMeasurementTypeNeutralCurrent MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRElectricalEnergyMeasurementMeasurementTypeElectricalEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0E, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRElectricalEnergyMeasurementFeature) { + MTRElectricalEnergyMeasurementFeatureImportedEnergy MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRElectricalEnergyMeasurementFeatureExportedEnergy MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRElectricalEnergyMeasurementFeatureCumulativeEnergy MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRElectricalEnergyMeasurementFeaturePeriodicEnergy MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlCriticalityLevel) { + MTRDemandResponseLoadControlCriticalityLevelUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlCriticalityLevelGreen MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlCriticalityLevelLevel1 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDemandResponseLoadControlCriticalityLevelLevel2 MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDemandResponseLoadControlCriticalityLevelLevel3 MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDemandResponseLoadControlCriticalityLevelLevel4 MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDemandResponseLoadControlCriticalityLevelLevel5 MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDemandResponseLoadControlCriticalityLevelEmergency MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDemandResponseLoadControlCriticalityLevelPlannedOutage MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDemandResponseLoadControlCriticalityLevelServiceDisconnect MTR_PROVISIONALLY_AVAILABLE = 0x09, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlHeatingSource) { + MTRDemandResponseLoadControlHeatingSourceAny MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlHeatingSourceElectric MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlHeatingSourceNonElectric MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventChangeSource) { + MTRDemandResponseLoadControlLoadControlEventChangeSourceAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlLoadControlEventChangeSourceUserAction MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventStatus) { + MTRDemandResponseLoadControlLoadControlEventStatusUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlLoadControlEventStatusReceived MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlLoadControlEventStatusInProgress MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDemandResponseLoadControlLoadControlEventStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDemandResponseLoadControlLoadControlEventStatusOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDemandResponseLoadControlLoadControlEventStatusOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDemandResponseLoadControlLoadControlEventStatusCanceled MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDemandResponseLoadControlLoadControlEventStatusSuperseded MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDemandResponseLoadControlLoadControlEventStatusNoParticipation MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDemandResponseLoadControlLoadControlEventStatusUnavailable MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDemandResponseLoadControlLoadControlEventStatusFailed MTR_PROVISIONALLY_AVAILABLE = 0x0C, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlCancelControlBitmap) { + MTRDemandResponseLoadControlCancelControlBitmapRandomEnd MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlDeviceClassBitmap) { + MTRDemandResponseLoadControlDeviceClassBitmapHVAC MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlDeviceClassBitmapStripHeater MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDemandResponseLoadControlDeviceClassBitmapWaterHeater MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDemandResponseLoadControlDeviceClassBitmapPoolPump MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDemandResponseLoadControlDeviceClassBitmapSmartAppliance MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDemandResponseLoadControlDeviceClassBitmapIrrigationPump MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDemandResponseLoadControlDeviceClassBitmapCommercialLoad MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRDemandResponseLoadControlDeviceClassBitmapResidentialLoad MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRDemandResponseLoadControlDeviceClassBitmapExteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x100, + MTRDemandResponseLoadControlDeviceClassBitmapInteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x200, + MTRDemandResponseLoadControlDeviceClassBitmapEV MTR_PROVISIONALLY_AVAILABLE = 0x400, + MTRDemandResponseLoadControlDeviceClassBitmapGenerationSystem MTR_PROVISIONALLY_AVAILABLE = 0x800, + MTRDemandResponseLoadControlDeviceClassBitmapSmartInverter MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRDemandResponseLoadControlDeviceClassBitmapEVSE MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRDemandResponseLoadControlDeviceClassBitmapRESU MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRDemandResponseLoadControlDeviceClassBitmapEMS MTR_PROVISIONALLY_AVAILABLE = 0x8000, + MTRDemandResponseLoadControlDeviceClassBitmapSEM MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventControlBitmap) { + MTRDemandResponseLoadControlEventControlBitmapRandomStart MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventTransitionControlBitmap) { + MTRDemandResponseLoadControlEventTransitionControlBitmapRandomDuration MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlEventTransitionControlBitmapIgnoreOptOut MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlFeature) { + MTRDemandResponseLoadControlFeatureEnrollmentGroups MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlFeatureTemperatureOffset MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDemandResponseLoadControlFeatureTemperatureSetpoint MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDemandResponseLoadControlFeatureLoadAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDemandResponseLoadControlFeatureDutyCycle MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDemandResponseLoadControlFeaturePowerSavings MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDemandResponseLoadControlFeatureHeatingSource MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCause) { + MTRDeviceEnergyManagementCauseNormalCompletion MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementCauseOffline MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementCauseFault MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementCauseUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCostType) { + MTRDeviceEnergyManagementCostTypeFinancial MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementCostTypeGHGEmissions MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementCostTypeComfort MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementCostTypeTemperature MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAState) { + MTRDeviceEnergyManagementESAStateOffline MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementESAStateOnline MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementESAStateFault MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementESAStateUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementESAStatePowerAdjustActive MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDeviceEnergyManagementESAStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAType) { + MTRDeviceEnergyManagementESATypeEVSE MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementESATypeSpaceHeating MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementESATypeWaterHeating MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementESATypeSpaceCooling MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementESATypeSpaceHeatingCooling MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDeviceEnergyManagementESATypeBatteryStorage MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDeviceEnergyManagementESATypeSolarPV MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDeviceEnergyManagementESATypeFridgeFreezer MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDeviceEnergyManagementESATypeWashingMachine MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDeviceEnergyManagementESATypeDishwasher MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDeviceEnergyManagementESATypeCooking MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDeviceEnergyManagementESATypeHomeWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDeviceEnergyManagementESATypeIrrigationWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDeviceEnergyManagementESATypePoolPump MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRDeviceEnergyManagementESATypeOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementFeature) { + MTRDeviceEnergyManagementFeaturePowerAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDeviceEnergyManagementFeaturePowerForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDeviceEnergyManagementFeatureStateForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDeviceEnergyManagementFeatureForecastAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTREnergyEVSEEnergyTransferStoppedReason) { + MTREnergyEVSEEnergyTransferStoppedReasonEVStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEEnergyTransferStoppedReasonEVSEStopped MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEEnergyTransferStoppedReasonOther MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTREnergyEVSEFaultState) { + MTREnergyEVSEFaultStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEFaultStateMeterFailure MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEFaultStateOverVoltage MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEFaultStateUnderVoltage MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEFaultStateOverCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEFaultStateContactWetFailure MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEFaultStateContactDryFailure MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTREnergyEVSEFaultStateGroundFault MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTREnergyEVSEFaultStatePowerLoss MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTREnergyEVSEFaultStatePowerQuality MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTREnergyEVSEFaultStatePilotShortCircuit MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTREnergyEVSEFaultStateEmergencyStop MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTREnergyEVSEFaultStateEVDisconnected MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTREnergyEVSEFaultStateWrongPowerSupply MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTREnergyEVSEFaultStateLiveNeutralSwap MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTREnergyEVSEFaultStateOverTemperature MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTREnergyEVSEFaultStateOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTREnergyEVSEState) { + MTREnergyEVSEStateNotPluggedIn MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEStatePluggedInNoDemand MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEStatePluggedInDemand MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEStatePluggedInCharging MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEStatePluggedInDischarging MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEStateSessionEnding MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEStateFault MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTREnergyEVSESupplyState) { + MTREnergyEVSESupplyStateDisabled MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSESupplyStateChargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSESupplyStateDischargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSESupplyStateDisabledError MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSESupplyStateDisabledDiagnostics MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTREnergyEVSEFeature) { + MTREnergyEVSEFeatureChargingPreferences MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTREnergyEVSEFeatureSoCReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTREnergyEVSEFeaturePlugAndCharge MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTREnergyEVSEFeatureRFID MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTREnergyEVSEFeatureV2X MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTREnergyEVSETargetDayOfWeekBitmap) { + MTREnergyEVSETargetDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTREnergyEVSETargetDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTREnergyEVSETargetDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTREnergyEVSETargetDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTREnergyEVSETargetDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTREnergyEVSETargetDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTREnergyEVSETargetDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRDoorLockAlarmCode) { MTRDoorLockAlarmCodeLockJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRDoorLockAlarmCodeLockFactoryReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, @@ -15901,29 +17715,108 @@ typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { MTRPumpConfigurationAndControlPumpStatusRemoteTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x100, } MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmap", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { - MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatACCapacityFormat) { + MTRThermostatACCapacityFormatBTUh MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACCompressorType) { + MTRThermostatACCompressorTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACCompressorTypeT1 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACCompressorTypeT2 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACCompressorTypeT3 MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACLouverPosition) { + MTRThermostatACLouverPositionClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACLouverPositionOpen MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACLouverPositionQuarter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACLouverPositionHalf MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatACLouverPositionThreeQuarters MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACRefrigerantType) { + MTRThermostatACRefrigerantTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACRefrigerantTypeR22 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACRefrigerantTypeR410a MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACRefrigerantTypeR407c MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACType) { + MTRThermostatACTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACTypeCoolingFixed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACTypeHeatPumpFixed MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACTypeCoolingInverter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACTypeHeatPumpInverter MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { + MTRThermostatControlSequenceOfOperationCoolingOnly MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatControlSequenceOfOperationHeatingOnly MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x03, + MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_NEWLY_AVAILABLE = 0x04, + MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { - MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingOnly") + = 0x00, + MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingWithReheat") + = 0x01, + MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingOnly") + = 0x02, + MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingWithReheat") + = 0x03, + MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeating") + = 0x04, + MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat") + = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation"); -typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { - MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { + MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSetpointChangeSourceExternal MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { + MTRThermostatSetpointRaiseLowerModeHeat MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatSetpointRaiseLowerModeCool MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatSetpointRaiseLowerModeBoth MTR_NEWLY_AVAILABLE = 0x02, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { + MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat") + = 0x00, + MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool") + = 0x01, + MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth") + = 0x02, + MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerMode"); + +typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { + MTRThermostatStartOfWeekSunday MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatStartOfWeekMonday MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatStartOfWeekTuesday MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatStartOfWeekWednesday MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatStartOfWeekThursday MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatStartOfWeekFriday MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatStartOfWeekSaturday MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -15938,18 +17831,25 @@ typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeSleep MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { - MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x80, - MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatDayOfWeekAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { + MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatTemperatureSetpointHoldSetpointHoldOn MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { + MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { + MTRThermostatACErrorCodeBitmapCompressorFail MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatACErrorCodeBitmapRoomSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatACErrorCodeBitmapOutdoorSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatACErrorCodeBitmapCoilSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRThermostatFeatureCooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, @@ -15962,12 +17862,91 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { + MTRThermostatHVACSystemTypeBitmapCoolingStage MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRThermostatHVACSystemTypeBitmapHeatingStage MTR_PROVISIONALLY_AVAILABLE = 0xC, + MTRThermostatHVACSystemTypeBitmapHeatingIsHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { + MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatProgrammingOperationModeBitmapEconomy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRThermostatRelayStateBitmap) { + MTRThermostatRelayStateBitmapHeat MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRelayStateBitmapCool MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRelayStateBitmapFan MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatRelayStateBitmapHeatStage2 MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatRelayStateBitmapCoolStage2 MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatRelayStateBitmapFanStage2 MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRThermostatRelayStateBitmapFanStage3 MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { + MTRThermostatRemoteSensingBitmapLocalTemperature MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRemoteSensingBitmapOutdoorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRemoteSensingBitmapOccupancy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { + MTRThermostatScheduleDayOfWeekBitmapSunday MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleDayOfWeekBitmapMonday MTR_NEWLY_AVAILABLE = 0x2, + MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_NEWLY_AVAILABLE = 0x4, + MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_NEWLY_AVAILABLE = 0x8, + MTRThermostatScheduleDayOfWeekBitmapThursday MTR_NEWLY_AVAILABLE = 0x10, + MTRThermostatScheduleDayOfWeekBitmapFriday MTR_NEWLY_AVAILABLE = 0x20, + MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_NEWLY_AVAILABLE = 0x40, + MTRThermostatScheduleDayOfWeekBitmapAway MTR_NEWLY_AVAILABLE = 0x80, +} MTR_NEWLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { + MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSunday") + = 0x1, + MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapMonday") + = 0x2, + MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapTuesday") + = 0x4, + MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapWednesday") + = 0x8, + MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapThursday") + = 0x10, + MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapFriday") + = 0x20, + MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSaturday") + = 0x40, + MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway") + = 0x80, + MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmap"); + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { + MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { - MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent") + = 0x1, + MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent") + = 0x2, + MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmap"); typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionForward MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -16054,6 +18033,25 @@ typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { MTRFanControlWindSupportMaskNaturalWind MTR_DEPRECATED("Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x2, } MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationKeypadLockout) { + MTRThermostatUserInterfaceConfigurationKeypadLockoutNoLockout MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout1 MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout2 MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout3 MTR_NEWLY_AVAILABLE = 0x03, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout4 MTR_NEWLY_AVAILABLE = 0x04, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout5 MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibility) { + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingPermitted MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingDenied MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationTemperatureDisplayMode) { + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeCelsius MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeFahrenheit MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { MTRColorControlColorLoopActionDeactivate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRColorControlColorLoopActionActivateFromColorLoopStartEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -16503,6 +18501,12 @@ typedef NS_OPTIONS(uint32_t, MTRRadonConcentrationMeasurementFeature) { MTRRadonConcentrationMeasurementFeatureAverageMeasurement MTR_PROVISIONALLY_AVAILABLE = 0x20, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRChannelType) { + MTRChannelTypeSatellite MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRChannelTypeCable MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRChannelTypeTerrestrial MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRChannelLineupInfoType) { MTRChannelLineupInfoTypeMSO MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRChannelLineupInfoTypeMso MTR_DEPRECATED("Please use MTRChannelLineupInfoTypeMSO", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, @@ -16517,14 +18521,43 @@ typedef NS_ENUM(uint8_t, MTRChannelStatus) { typedef NS_OPTIONS(uint32_t, MTRChannelFeature) { MTRChannelFeatureChannelList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRChannelFeatureLineupInfo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRChannelFeatureElectronicGuide MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRChannelRecordingFlagBitmap) { + MTRChannelRecordingFlagBitmapScheduled MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRChannelRecordingFlagBitmapRecordSeries MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x3, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRTargetNavigatorStatus) { MTRTargetNavigatorStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRTargetNavigatorStatusTargetNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRTargetNavigatorStatusNotAllowed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRMediaPlaybackCharacteristic) { + MTRMediaPlaybackCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMediaPlaybackCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMediaPlaybackCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMediaPlaybackCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRMediaPlaybackCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRMediaPlaybackCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRMediaPlaybackCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRMediaPlaybackCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRMediaPlaybackCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRMediaPlaybackCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRMediaPlaybackCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRMediaPlaybackCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRMediaPlaybackCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRMediaPlaybackCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRMediaPlaybackCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRMediaPlaybackCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRMediaPlaybackCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRMediaPlaybackCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRMediaPlaybackPlaybackState) { MTRMediaPlaybackPlaybackStatePlaying MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRMediaPlaybackPlaybackStatePaused MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -16544,6 +18577,9 @@ typedef NS_ENUM(uint8_t, MTRMediaPlaybackStatus) { typedef NS_OPTIONS(uint32_t, MTRMediaPlaybackFeature) { MTRMediaPlaybackFeatureAdvancedSeek MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, MTRMediaPlaybackFeatureVariableSpeed MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, + MTRMediaPlaybackFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRMediaPlaybackFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRMediaPlaybackFeatureAudioAdvance MTR_PROVISIONALLY_AVAILABLE = 0x5, } MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); typedef NS_ENUM(uint8_t, MTRMediaInputInputType) { @@ -16568,100 +18604,362 @@ typedef NS_OPTIONS(uint32_t, MTRMediaInputFeature) { MTRMediaInputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRKeypadInputCECKeyCode) { + MTRKeypadInputCECKeyCodeSelect MTR_NEWLY_AVAILABLE = 0x00, + MTRKeypadInputCECKeyCodeUp MTR_NEWLY_AVAILABLE = 0x01, + MTRKeypadInputCECKeyCodeDown MTR_NEWLY_AVAILABLE = 0x02, + MTRKeypadInputCECKeyCodeLeft MTR_NEWLY_AVAILABLE = 0x03, + MTRKeypadInputCECKeyCodeRight MTR_NEWLY_AVAILABLE = 0x04, + MTRKeypadInputCECKeyCodeRightUp MTR_NEWLY_AVAILABLE = 0x05, + MTRKeypadInputCECKeyCodeRightDown MTR_NEWLY_AVAILABLE = 0x06, + MTRKeypadInputCECKeyCodeLeftUp MTR_NEWLY_AVAILABLE = 0x07, + MTRKeypadInputCECKeyCodeLeftDown MTR_NEWLY_AVAILABLE = 0x08, + MTRKeypadInputCECKeyCodeRootMenu MTR_NEWLY_AVAILABLE = 0x09, + MTRKeypadInputCECKeyCodeSetupMenu MTR_NEWLY_AVAILABLE = 0x0A, + MTRKeypadInputCECKeyCodeContentsMenu MTR_NEWLY_AVAILABLE = 0x0B, + MTRKeypadInputCECKeyCodeFavoriteMenu MTR_NEWLY_AVAILABLE = 0x0C, + MTRKeypadInputCECKeyCodeExit MTR_NEWLY_AVAILABLE = 0x0D, + MTRKeypadInputCECKeyCodeMediaTopMenu MTR_NEWLY_AVAILABLE = 0x10, + MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu MTR_NEWLY_AVAILABLE = 0x11, + MTRKeypadInputCECKeyCodeNumberEntryMode MTR_NEWLY_AVAILABLE = 0x1D, + MTRKeypadInputCECKeyCodeNumber11 MTR_NEWLY_AVAILABLE = 0x1E, + MTRKeypadInputCECKeyCodeNumber12 MTR_NEWLY_AVAILABLE = 0x1F, + MTRKeypadInputCECKeyCodeNumber0OrNumber10 MTR_NEWLY_AVAILABLE = 0x20, + MTRKeypadInputCECKeyCodeNumbers1 MTR_NEWLY_AVAILABLE = 0x21, + MTRKeypadInputCECKeyCodeNumbers2 MTR_NEWLY_AVAILABLE = 0x22, + MTRKeypadInputCECKeyCodeNumbers3 MTR_NEWLY_AVAILABLE = 0x23, + MTRKeypadInputCECKeyCodeNumbers4 MTR_NEWLY_AVAILABLE = 0x24, + MTRKeypadInputCECKeyCodeNumbers5 MTR_NEWLY_AVAILABLE = 0x25, + MTRKeypadInputCECKeyCodeNumbers6 MTR_NEWLY_AVAILABLE = 0x26, + MTRKeypadInputCECKeyCodeNumbers7 MTR_NEWLY_AVAILABLE = 0x27, + MTRKeypadInputCECKeyCodeNumbers8 MTR_NEWLY_AVAILABLE = 0x28, + MTRKeypadInputCECKeyCodeNumbers9 MTR_NEWLY_AVAILABLE = 0x29, + MTRKeypadInputCECKeyCodeDot MTR_NEWLY_AVAILABLE = 0x2A, + MTRKeypadInputCECKeyCodeEnter MTR_NEWLY_AVAILABLE = 0x2B, + MTRKeypadInputCECKeyCodeClear MTR_NEWLY_AVAILABLE = 0x2C, + MTRKeypadInputCECKeyCodeNextFavorite MTR_NEWLY_AVAILABLE = 0x2F, + MTRKeypadInputCECKeyCodeChannelUp MTR_NEWLY_AVAILABLE = 0x30, + MTRKeypadInputCECKeyCodeChannelDown MTR_NEWLY_AVAILABLE = 0x31, + MTRKeypadInputCECKeyCodePreviousChannel MTR_NEWLY_AVAILABLE = 0x32, + MTRKeypadInputCECKeyCodeSoundSelect MTR_NEWLY_AVAILABLE = 0x33, + MTRKeypadInputCECKeyCodeInputSelect MTR_NEWLY_AVAILABLE = 0x34, + MTRKeypadInputCECKeyCodeDisplayInformation MTR_NEWLY_AVAILABLE = 0x35, + MTRKeypadInputCECKeyCodeHelp MTR_NEWLY_AVAILABLE = 0x36, + MTRKeypadInputCECKeyCodePageUp MTR_NEWLY_AVAILABLE = 0x37, + MTRKeypadInputCECKeyCodePageDown MTR_NEWLY_AVAILABLE = 0x38, + MTRKeypadInputCECKeyCodePower MTR_NEWLY_AVAILABLE = 0x40, + MTRKeypadInputCECKeyCodeVolumeUp MTR_NEWLY_AVAILABLE = 0x41, + MTRKeypadInputCECKeyCodeVolumeDown MTR_NEWLY_AVAILABLE = 0x42, + MTRKeypadInputCECKeyCodeMute MTR_NEWLY_AVAILABLE = 0x43, + MTRKeypadInputCECKeyCodePlay MTR_NEWLY_AVAILABLE = 0x44, + MTRKeypadInputCECKeyCodeStop MTR_NEWLY_AVAILABLE = 0x45, + MTRKeypadInputCECKeyCodePause MTR_NEWLY_AVAILABLE = 0x46, + MTRKeypadInputCECKeyCodeRecord MTR_NEWLY_AVAILABLE = 0x47, + MTRKeypadInputCECKeyCodeRewind MTR_NEWLY_AVAILABLE = 0x48, + MTRKeypadInputCECKeyCodeFastForward MTR_NEWLY_AVAILABLE = 0x49, + MTRKeypadInputCECKeyCodeEject MTR_NEWLY_AVAILABLE = 0x4A, + MTRKeypadInputCECKeyCodeForward MTR_NEWLY_AVAILABLE = 0x4B, + MTRKeypadInputCECKeyCodeBackward MTR_NEWLY_AVAILABLE = 0x4C, + MTRKeypadInputCECKeyCodeStopRecord MTR_NEWLY_AVAILABLE = 0x4D, + MTRKeypadInputCECKeyCodePauseRecord MTR_NEWLY_AVAILABLE = 0x4E, + MTRKeypadInputCECKeyCodeReserved MTR_NEWLY_AVAILABLE = 0x4F, + MTRKeypadInputCECKeyCodeAngle MTR_NEWLY_AVAILABLE = 0x50, + MTRKeypadInputCECKeyCodeSubPicture MTR_NEWLY_AVAILABLE = 0x51, + MTRKeypadInputCECKeyCodeVideoOnDemand MTR_NEWLY_AVAILABLE = 0x52, + MTRKeypadInputCECKeyCodeElectronicProgramGuide MTR_NEWLY_AVAILABLE = 0x53, + MTRKeypadInputCECKeyCodeTimerProgramming MTR_NEWLY_AVAILABLE = 0x54, + MTRKeypadInputCECKeyCodeInitialConfiguration MTR_NEWLY_AVAILABLE = 0x55, + MTRKeypadInputCECKeyCodeSelectBroadcastType MTR_NEWLY_AVAILABLE = 0x56, + MTRKeypadInputCECKeyCodeSelectSoundPresentation MTR_NEWLY_AVAILABLE = 0x57, + MTRKeypadInputCECKeyCodePlayFunction MTR_NEWLY_AVAILABLE = 0x60, + MTRKeypadInputCECKeyCodePausePlayFunction MTR_NEWLY_AVAILABLE = 0x61, + MTRKeypadInputCECKeyCodeRecordFunction MTR_NEWLY_AVAILABLE = 0x62, + MTRKeypadInputCECKeyCodePauseRecordFunction MTR_NEWLY_AVAILABLE = 0x63, + MTRKeypadInputCECKeyCodeStopFunction MTR_NEWLY_AVAILABLE = 0x64, + MTRKeypadInputCECKeyCodeMuteFunction MTR_NEWLY_AVAILABLE = 0x65, + MTRKeypadInputCECKeyCodeRestoreVolumeFunction MTR_NEWLY_AVAILABLE = 0x66, + MTRKeypadInputCECKeyCodeTuneFunction MTR_NEWLY_AVAILABLE = 0x67, + MTRKeypadInputCECKeyCodeSelectMediaFunction MTR_NEWLY_AVAILABLE = 0x68, + MTRKeypadInputCECKeyCodeSelectAvInputFunction MTR_NEWLY_AVAILABLE = 0x69, + MTRKeypadInputCECKeyCodeSelectAudioInputFunction MTR_NEWLY_AVAILABLE = 0x6A, + MTRKeypadInputCECKeyCodePowerToggleFunction MTR_NEWLY_AVAILABLE = 0x6B, + MTRKeypadInputCECKeyCodePowerOffFunction MTR_NEWLY_AVAILABLE = 0x6C, + MTRKeypadInputCECKeyCodePowerOnFunction MTR_NEWLY_AVAILABLE = 0x6D, + MTRKeypadInputCECKeyCodeF1Blue MTR_NEWLY_AVAILABLE = 0x71, + MTRKeypadInputCECKeyCodeF2Red MTR_NEWLY_AVAILABLE = 0x72, + MTRKeypadInputCECKeyCodeF3Green MTR_NEWLY_AVAILABLE = 0x73, + MTRKeypadInputCECKeyCodeF4Yellow MTR_NEWLY_AVAILABLE = 0x74, + MTRKeypadInputCECKeyCodeF5 MTR_NEWLY_AVAILABLE = 0x75, + MTRKeypadInputCECKeyCodeData MTR_NEWLY_AVAILABLE = 0x76, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRKeypadInputCecKeyCode) { - MTRKeypadInputCecKeyCodeSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRKeypadInputCecKeyCodeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRKeypadInputCecKeyCodeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRKeypadInputCecKeyCodeLeft MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRKeypadInputCecKeyCodeRight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRKeypadInputCecKeyCodeRightUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRKeypadInputCecKeyCodeRightDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRKeypadInputCecKeyCodeLeftUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRKeypadInputCecKeyCodeLeftDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRKeypadInputCecKeyCodeRootMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRKeypadInputCecKeyCodeSetupMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRKeypadInputCecKeyCodeContentsMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRKeypadInputCecKeyCodeFavoriteMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, - MTRKeypadInputCecKeyCodeExit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, - MTRKeypadInputCecKeyCodeMediaTopMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x11, - MTRKeypadInputCecKeyCodeNumberEntryMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1D, - MTRKeypadInputCecKeyCodeNumber11 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1E, - MTRKeypadInputCecKeyCodeNumber12 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1F, - MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRKeypadInputCecKeyCodeNumbers1 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x21, - MTRKeypadInputCecKeyCodeNumbers2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x22, - MTRKeypadInputCecKeyCodeNumbers3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x23, - MTRKeypadInputCecKeyCodeNumbers4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x24, - MTRKeypadInputCecKeyCodeNumbers5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x25, - MTRKeypadInputCecKeyCodeNumbers6 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x26, - MTRKeypadInputCecKeyCodeNumbers7 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x27, - MTRKeypadInputCecKeyCodeNumbers8 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x28, - MTRKeypadInputCecKeyCodeNumbers9 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x29, - MTRKeypadInputCecKeyCodeDot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2A, - MTRKeypadInputCecKeyCodeEnter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2B, - MTRKeypadInputCecKeyCodeClear MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2C, - MTRKeypadInputCecKeyCodeNextFavorite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2F, - MTRKeypadInputCecKeyCodeChannelUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x30, - MTRKeypadInputCecKeyCodeChannelDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x31, - MTRKeypadInputCecKeyCodePreviousChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x32, - MTRKeypadInputCecKeyCodeSoundSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x33, - MTRKeypadInputCecKeyCodeInputSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x34, - MTRKeypadInputCecKeyCodeDisplayInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x35, - MTRKeypadInputCecKeyCodeHelp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x36, - MTRKeypadInputCecKeyCodePageUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x37, - MTRKeypadInputCecKeyCodePageDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x38, - MTRKeypadInputCecKeyCodePower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRKeypadInputCecKeyCodeVolumeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x41, - MTRKeypadInputCecKeyCodeVolumeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x42, - MTRKeypadInputCecKeyCodeMute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x43, - MTRKeypadInputCecKeyCodePlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x44, - MTRKeypadInputCecKeyCodeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x45, - MTRKeypadInputCecKeyCodePause MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x46, - MTRKeypadInputCecKeyCodeRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x47, - MTRKeypadInputCecKeyCodeRewind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x48, - MTRKeypadInputCecKeyCodeFastForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x49, - MTRKeypadInputCecKeyCodeEject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4A, - MTRKeypadInputCecKeyCodeForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4B, - MTRKeypadInputCecKeyCodeBackward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4C, - MTRKeypadInputCecKeyCodeStopRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4D, - MTRKeypadInputCecKeyCodePauseRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4E, - MTRKeypadInputCecKeyCodeReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4F, - MTRKeypadInputCecKeyCodeAngle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x50, - MTRKeypadInputCecKeyCodeSubPicture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x51, - MTRKeypadInputCecKeyCodeVideoOnDemand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x52, - MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x53, - MTRKeypadInputCecKeyCodeTimerProgramming MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x54, - MTRKeypadInputCecKeyCodeInitialConfiguration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x55, - MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x56, - MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x57, - MTRKeypadInputCecKeyCodePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x60, - MTRKeypadInputCecKeyCodePausePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x61, - MTRKeypadInputCecKeyCodeRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x62, - MTRKeypadInputCecKeyCodePauseRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x63, - MTRKeypadInputCecKeyCodeStopFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x64, - MTRKeypadInputCecKeyCodeMuteFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x65, - MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x66, - MTRKeypadInputCecKeyCodeTuneFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x67, - MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x68, - MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x69, - MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6A, - MTRKeypadInputCecKeyCodePowerToggleFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6B, - MTRKeypadInputCecKeyCodePowerOffFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6C, - MTRKeypadInputCecKeyCodePowerOnFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6D, - MTRKeypadInputCecKeyCodeF1Blue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x71, - MTRKeypadInputCecKeyCodeF2Red MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x72, - MTRKeypadInputCecKeyCodeF3Green MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x73, - MTRKeypadInputCecKeyCodeF4Yellow MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x74, - MTRKeypadInputCecKeyCodeF5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x75, - MTRKeypadInputCecKeyCodeData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x76, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRKeypadInputCecKeyCodeSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelect") + = 0x00, + MTRKeypadInputCecKeyCodeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeUp") + = 0x01, + MTRKeypadInputCecKeyCodeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDown") + = 0x02, + MTRKeypadInputCecKeyCodeLeft MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeft") + = 0x03, + MTRKeypadInputCecKeyCodeRight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRight") + = 0x04, + MTRKeypadInputCecKeyCodeRightUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightUp") + = 0x05, + MTRKeypadInputCecKeyCodeRightDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightDown") + = 0x06, + MTRKeypadInputCecKeyCodeLeftUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftUp") + = 0x07, + MTRKeypadInputCecKeyCodeLeftDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftDown") + = 0x08, + MTRKeypadInputCecKeyCodeRootMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRootMenu") + = 0x09, + MTRKeypadInputCecKeyCodeSetupMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSetupMenu") + = 0x0A, + MTRKeypadInputCecKeyCodeContentsMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeContentsMenu") + = 0x0B, + MTRKeypadInputCecKeyCodeFavoriteMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFavoriteMenu") + = 0x0C, + MTRKeypadInputCecKeyCodeExit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeExit") + = 0x0D, + MTRKeypadInputCecKeyCodeMediaTopMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaTopMenu") + = 0x10, + MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu") + = 0x11, + MTRKeypadInputCecKeyCodeNumberEntryMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumberEntryMode") + = 0x1D, + MTRKeypadInputCecKeyCodeNumber11 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber11") + = 0x1E, + MTRKeypadInputCecKeyCodeNumber12 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber12") + = 0x1F, + MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber0OrNumber10") + = 0x20, + MTRKeypadInputCecKeyCodeNumbers1 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers1") + = 0x21, + MTRKeypadInputCecKeyCodeNumbers2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers2") + = 0x22, + MTRKeypadInputCecKeyCodeNumbers3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers3") + = 0x23, + MTRKeypadInputCecKeyCodeNumbers4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers4") + = 0x24, + MTRKeypadInputCecKeyCodeNumbers5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers5") + = 0x25, + MTRKeypadInputCecKeyCodeNumbers6 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers6") + = 0x26, + MTRKeypadInputCecKeyCodeNumbers7 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers7") + = 0x27, + MTRKeypadInputCecKeyCodeNumbers8 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers8") + = 0x28, + MTRKeypadInputCecKeyCodeNumbers9 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers9") + = 0x29, + MTRKeypadInputCecKeyCodeDot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDot") + = 0x2A, + MTRKeypadInputCecKeyCodeEnter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEnter") + = 0x2B, + MTRKeypadInputCecKeyCodeClear MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeClear") + = 0x2C, + MTRKeypadInputCecKeyCodeNextFavorite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNextFavorite") + = 0x2F, + MTRKeypadInputCecKeyCodeChannelUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelUp") + = 0x30, + MTRKeypadInputCecKeyCodeChannelDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelDown") + = 0x31, + MTRKeypadInputCecKeyCodePreviousChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePreviousChannel") + = 0x32, + MTRKeypadInputCecKeyCodeSoundSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSoundSelect") + = 0x33, + MTRKeypadInputCecKeyCodeInputSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInputSelect") + = 0x34, + MTRKeypadInputCecKeyCodeDisplayInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDisplayInformation") + = 0x35, + MTRKeypadInputCecKeyCodeHelp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeHelp") + = 0x36, + MTRKeypadInputCecKeyCodePageUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageUp") + = 0x37, + MTRKeypadInputCecKeyCodePageDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageDown") + = 0x38, + MTRKeypadInputCecKeyCodePower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePower") + = 0x40, + MTRKeypadInputCecKeyCodeVolumeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeUp") + = 0x41, + MTRKeypadInputCecKeyCodeVolumeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeDown") + = 0x42, + MTRKeypadInputCecKeyCodeMute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMute") + = 0x43, + MTRKeypadInputCecKeyCodePlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlay") + = 0x44, + MTRKeypadInputCecKeyCodeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStop") + = 0x45, + MTRKeypadInputCecKeyCodePause MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePause") + = 0x46, + MTRKeypadInputCecKeyCodeRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecord") + = 0x47, + MTRKeypadInputCecKeyCodeRewind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRewind") + = 0x48, + MTRKeypadInputCecKeyCodeFastForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFastForward") + = 0x49, + MTRKeypadInputCecKeyCodeEject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEject") + = 0x4A, + MTRKeypadInputCecKeyCodeForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeForward") + = 0x4B, + MTRKeypadInputCecKeyCodeBackward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeBackward") + = 0x4C, + MTRKeypadInputCecKeyCodeStopRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopRecord") + = 0x4D, + MTRKeypadInputCecKeyCodePauseRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecord") + = 0x4E, + MTRKeypadInputCecKeyCodeReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeReserved") + = 0x4F, + MTRKeypadInputCecKeyCodeAngle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeAngle") + = 0x50, + MTRKeypadInputCecKeyCodeSubPicture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSubPicture") + = 0x51, + MTRKeypadInputCecKeyCodeVideoOnDemand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVideoOnDemand") + = 0x52, + MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeElectronicProgramGuide") + = 0x53, + MTRKeypadInputCecKeyCodeTimerProgramming MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTimerProgramming") + = 0x54, + MTRKeypadInputCecKeyCodeInitialConfiguration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInitialConfiguration") + = 0x55, + MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectBroadcastType") + = 0x56, + MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectSoundPresentation") + = 0x57, + MTRKeypadInputCecKeyCodePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlayFunction") + = 0x60, + MTRKeypadInputCecKeyCodePausePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePausePlayFunction") + = 0x61, + MTRKeypadInputCecKeyCodeRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecordFunction") + = 0x62, + MTRKeypadInputCecKeyCodePauseRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecordFunction") + = 0x63, + MTRKeypadInputCecKeyCodeStopFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopFunction") + = 0x64, + MTRKeypadInputCecKeyCodeMuteFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMuteFunction") + = 0x65, + MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRestoreVolumeFunction") + = 0x66, + MTRKeypadInputCecKeyCodeTuneFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTuneFunction") + = 0x67, + MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectMediaFunction") + = 0x68, + MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAvInputFunction") + = 0x69, + MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAudioInputFunction") + = 0x6A, + MTRKeypadInputCecKeyCodePowerToggleFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerToggleFunction") + = 0x6B, + MTRKeypadInputCecKeyCodePowerOffFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOffFunction") + = 0x6C, + MTRKeypadInputCecKeyCodePowerOnFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOnFunction") + = 0x6D, + MTRKeypadInputCecKeyCodeF1Blue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF1Blue") + = 0x71, + MTRKeypadInputCecKeyCodeF2Red MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF2Red") + = 0x72, + MTRKeypadInputCecKeyCodeF3Green MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF3Green") + = 0x73, + MTRKeypadInputCecKeyCodeF4Yellow MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF4Yellow") + = 0x74, + MTRKeypadInputCecKeyCodeF5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF5") + = 0x75, + MTRKeypadInputCecKeyCodeData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeData") + = 0x76, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCode"); typedef NS_ENUM(uint8_t, MTRKeypadInputStatus) { - MTRKeypadInputStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRKeypadInputStatusUnsupportedKey MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRKeypadInputStatusInvalidKeyInCurrentState MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; + MTRKeypadInputStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRKeypadInputStatusUnsupportedKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRKeypadInputStatusInvalidKeyInCurrentState MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRKeypadInputFeature) { MTRKeypadInputFeatureNavigationKeyCodes MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, @@ -16669,6 +18967,27 @@ typedef NS_OPTIONS(uint32_t, MTRKeypadInputFeature) { MTRKeypadInputFeatureNumberKeys MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRContentLauncherCharacteristic) { + MTRContentLauncherCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRContentLauncherCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRContentLauncherCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRContentLauncherCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRContentLauncherCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRContentLauncherCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRContentLauncherCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRContentLauncherCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRContentLauncherCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRContentLauncherCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRContentLauncherCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRContentLauncherCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRContentLauncherCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRContentLauncherCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRContentLauncherCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRContentLauncherCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRContentLauncherCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRContentLauncherCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRContentLauncherMetricType) { MTRContentLauncherMetricTypePixels MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRContentLauncherMetricTypePIXELS MTR_DEPRECATED("Please use MTRContentLauncherMetricTypePixels", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, @@ -16691,12 +19010,17 @@ typedef NS_ENUM(uint8_t, MTRContentLauncherParameter) { MTRContentLauncherParameterSportsTeam MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, MTRContentLauncherParameterType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, MTRContentLauncherParameterVideo MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0D, + MTRContentLauncherParameterSeason MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRContentLauncherParameterEpisode MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRContentLauncherParameterAny MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRContentLauncherStatus) { MTRContentLauncherStatusSuccess MTR_NEWLY_AVAILABLE = 0x00, MTRContentLauncherStatusURLNotAvailable MTR_NEWLY_AVAILABLE = 0x01, MTRContentLauncherStatusAuthFailed MTR_NEWLY_AVAILABLE = 0x02, + MTRContentLauncherStatusTextTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRContentLauncherStatusAudioTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRContentLauncherContentLaunchStatus) { @@ -16715,11 +19039,15 @@ typedef NS_ENUM(uint8_t, MTRContentLauncherContentLaunchStatus) { typedef NS_OPTIONS(uint32_t, MTRContentLauncherFeature) { MTRContentLauncherFeatureContentSearch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRContentLauncherFeatureURLPlayback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRContentLauncherFeatureAdvancedSeek MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRContentLauncherFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentLauncherFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x5, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedProtocolsBitmap) { MTRContentLauncherSupportedProtocolsBitmapDASH MTR_NEWLY_AVAILABLE = 0x1, MTRContentLauncherSupportedProtocolsBitmapHLS MTR_NEWLY_AVAILABLE = 0x2, + MTRContentLauncherSupportedProtocolsBitmapWebRTC MTR_PROVISIONALLY_AVAILABLE = 0x2, } MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedStreamingProtocol) { @@ -16764,6 +19092,19 @@ typedef NS_ENUM(uint8_t, MTRApplicationBasicApplicationStatus) { MTRApplicationBasicApplicationStatusActiveVisibleNotFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRContentControlFeature) { + MTRContentControlFeatureScreenTime MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRContentControlFeaturePINManagement MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRContentControlFeatureBlockUnrated MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRContentControlFeatureOnDemandContentRating MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentControlFeatureScheduledContentRating MTR_PROVISIONALLY_AVAILABLE = 0x5, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) { + MTRContentAppObserverStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRContentAppObserverStatusUnexpectedData MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRUnitTestingSimple) { MTRUnitTestingSimpleUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRUnitTestingSimpleValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, @@ -23501,12 +25842,8 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { MTR_DEPRECATED("Please use nextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use rewindWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use rewindWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use fastForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use fastForwardWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use skipForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -24067,8 +26404,6 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { MTR_DEPRECATED("Please use loginWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use logoutWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use logoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index bf7f56fc1eede9..4aab1586c4932c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1872,22 +1872,22 @@ + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1897,9 +1897,9 @@ - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -11752,6 +11752,78 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } +- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::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 = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; @@ -38172,11 +38244,11 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam queue:self.callbackQueue completion:responseHandler]; } -- (void)stayActiveRequestWithCompletion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stayActiveRequestWithParams:nil completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRICDManagementClusterStayActiveRequestParams @@ -38184,7 +38256,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -38196,7 +38268,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRICDManagementClusterStayActiveResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -38707,72 +38779,445 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOvenOperationalState +@implementation MTRBaseClusterTimer -- (void)pauseWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion { - [self pauseWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRTimerClusterSetTimerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::SetTimer::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resetTimerWithCompletion:(MTRStatusCompletion)completion +{ + [self resetTimerWithParams:nil completion:completion]; } -- (void)pauseWithParams:(MTROvenOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterPauseParams + params = [[MTRTimerClusterResetTimerParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Pause::Type; + using RequestType = Timer::Commands::ResetTimer::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion { - [self stopWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRTimerClusterAddTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::AddTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)stopWithParams:(MTROvenOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterStopParams + params = [[MTRTimerClusterReduceTimeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Stop::Type; + using RequestType = Timer::Commands::ReduceTime::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self startWithParams:nil completion:completion]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::TimerState::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 = Timer::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterOvenCavityOperationalState + +- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self pauseWithParams:nil completion:completion]; +} +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterStartParams + params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; } @@ -38782,25 +39227,25 @@ - (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)p auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Start::Type; + using RequestType = OvenCavityOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithCompletion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self resumeWithParams:nil completion:completion]; + [self stopWithParams:nil completion:completion]; } -- (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterResumeParams + params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; } @@ -38810,21 +39255,77 @@ - (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Resume::Type; + using RequestType = OvenCavityOperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self startWithParams:nil completion:completion]; +} +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterStartParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenCavityOperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resumeWithParams:nil completion:completion]; +} +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenCavityOperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38837,7 +39338,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38849,7 +39350,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38860,7 +39361,7 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38873,7 +39374,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38885,7 +39386,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38896,7 +39397,7 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38909,7 +39410,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38921,7 +39422,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38932,7 +39433,7 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38945,7 +39446,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38957,7 +39458,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38968,7 +39469,7 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38981,7 +39482,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38993,7 +39494,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39002,9 +39503,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39015,9 +39516,9 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenOperational - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39027,9 +39528,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39040,7 +39541,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39053,7 +39554,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39065,7 +39566,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39076,7 +39577,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39089,7 +39590,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39101,7 +39602,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39112,7 +39613,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39125,7 +39626,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39137,7 +39638,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39148,7 +39649,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39161,7 +39662,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39173,7 +39674,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39184,7 +39685,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39197,7 +39698,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39209,7 +39710,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39220,7 +39721,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39233,7 +39734,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39245,7 +39746,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39256,108 +39757,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterModeSelect +@implementation MTRBaseClusterOvenMode -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRModeSelectClusterChangeToModeParams + params = [[MTROvenModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ModeSelect::Commands::ChangeToMode::Type; + using RequestType = OvenMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39370,7 +39799,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39382,7 +39811,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39393,7 +39822,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39406,7 +39835,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39418,7 +39847,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39429,7 +39858,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39457,7 +39886,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39475,7 +39904,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39487,7 +39916,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39498,7 +39927,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39526,7 +39955,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39544,7 +39973,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39556,7 +39985,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39567,7 +39996,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39580,7 +40009,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39592,7 +40021,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39603,7 +40032,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39616,7 +40045,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39628,7 +40057,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39639,7 +40068,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39652,7 +40081,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39664,7 +40093,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39675,7 +40104,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39688,7 +40117,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39700,7 +40129,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39711,7 +40140,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39724,7 +40153,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39736,7 +40165,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39747,7 +40176,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39760,7 +40189,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39772,7 +40201,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39783,454 +40212,433 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterModeSelect (Deprecated) +@implementation MTRBaseClusterLaundryDryerControls -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self changeToModeWithParams:params completion: - completionHandler]; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self readAttributeStandardNamespaceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStandardNamespaceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeStandardNamespaceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSupportedModesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedModesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSupportedModesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCurrentModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStartUpModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStartUpModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStartUpModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOnModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOnModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } @end -@implementation MTRBaseClusterLaundryWasherMode +@implementation MTRBaseClusterModeSelect -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRLaundryWasherModeClusterChangeToModeParams + params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + using RequestType = ModeSelect::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40243,7 +40651,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40255,7 +40663,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40266,7 +40674,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40279,7 +40687,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40291,7 +40699,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40302,7 +40710,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40330,7 +40738,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40348,7 +40756,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40360,7 +40768,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40371,7 +40779,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40399,7 +40807,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40417,7 +40825,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40429,7 +40837,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40440,7 +40848,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40453,7 +40861,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40465,7 +40873,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40476,7 +40884,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40489,7 +40897,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40501,7 +40909,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40512,7 +40920,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40525,7 +40933,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40537,7 +40945,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40548,7 +40956,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40561,7 +40969,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40573,7 +40981,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40584,7 +40992,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40597,7 +41005,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40609,7 +41017,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40620,7 +41028,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40633,7 +41041,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40645,7 +41053,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40656,109 +41064,527 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode +@implementation MTRBaseClusterModeSelect (Deprecated) -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - if (params == nil) { - params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self changeToModeWithParams:params completion: + completionHandler]; } -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeStandardNamespaceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStandardNamespaceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeStandardNamespaceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + [self readAttributeSupportedModesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedModesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedModesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartUpModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOnModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterLaundryWasherMode + +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRLaundryWasherModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil @@ -40785,7 +41611,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40803,7 +41629,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40815,7 +41641,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40826,7 +41652,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40854,7 +41680,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40872,7 +41698,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40884,7 +41710,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40895,7 +41721,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40908,7 +41734,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40920,7 +41746,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40931,7 +41757,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40944,7 +41770,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40956,7 +41782,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40967,7 +41793,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40980,7 +41806,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40992,7 +41818,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41003,7 +41829,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41016,7 +41842,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41028,7 +41854,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41039,7 +41865,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41052,7 +41878,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41064,7 +41890,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41075,7 +41901,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41088,7 +41914,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41100,7 +41926,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41111,24 +41937,49 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLaundryWasherControls +@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + alloc] init]; + } -- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41138,9 +41989,9 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41149,9 +42000,9 @@ + (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41160,11 +42011,47 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -41179,7 +42066,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value para } ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -41193,11 +42080,11 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value para std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41207,9 +42094,9 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41218,9 +42105,9 @@ + (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41229,11 +42116,11 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -41248,56 +42135,25 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params: } ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41307,9 +42163,9 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41320,7 +42176,7 @@ + (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41333,7 +42189,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41345,7 +42201,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41356,7 +42212,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41369,7 +42225,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41381,7 +42237,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41392,7 +42248,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41405,7 +42261,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41417,7 +42273,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41428,7 +42284,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41441,7 +42297,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41453,7 +42309,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41464,7 +42320,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41477,7 +42333,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41489,7 +42345,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41500,7 +42356,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41513,7 +42369,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41525,7 +42381,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41536,36 +42392,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCRunMode - -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCRunModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcRunMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterLaundryWasherControls -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41574,11 +42405,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41588,9 +42419,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41599,9 +42430,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41610,11 +42441,44 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41624,9 +42488,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41635,9 +42499,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41646,11 +42510,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -41665,25 +42529,20 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41693,9 +42552,45 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41706,7 +42601,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41719,7 +42614,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41731,7 +42626,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41742,7 +42637,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41755,7 +42650,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41767,7 +42662,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41778,7 +42673,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41791,7 +42686,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41803,7 +42698,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41814,7 +42709,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41827,7 +42722,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41839,7 +42734,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41850,7 +42745,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41863,7 +42758,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41875,7 +42770,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41886,7 +42781,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41899,7 +42794,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41911,7 +42806,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41922,12 +42817,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCCleanMode +@implementation MTRBaseClusterRVCRunMode -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCCleanModeClusterChangeToModeParams + params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; } @@ -41937,21 +42832,21 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; + using RequestType = RvcRunMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41964,7 +42859,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41976,7 +42871,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41987,7 +42882,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42000,7 +42895,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42012,7 +42907,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42023,7 +42918,393 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::OnMode::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 = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterRVCCleanMode + +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCCleanModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47801,66 +49082,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDoorLock - -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterLockDoorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::LockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterUnlockDoorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } +@implementation MTRBaseClusterBooleanStateConfiguration - using RequestType = DoorLock::Commands::UnlockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterUnlockWithTimeoutParams + params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -47869,11 +49096,8 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; + using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -47884,10 +49108,10 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * queue:self.callbackQueue completion:responseHandler]; } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterSetWeekDayScheduleParams + params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; } @@ -47897,7 +49121,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; + using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -47908,385 +49132,110 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams queue:self.callbackQueue completion:responseHandler]; } -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetWeekDayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDoorLockClusterClearWeekDayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetYearDayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRDoorLockClusterGetYearDayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRDoorLockClusterClearYearDayScheduleParams - alloc] init]; - } + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; - using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRDoorLockClusterGetHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDoorLockClusterSetUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::SetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetUserResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDoorLockClusterClearUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::ClearUser::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetCredentialParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::SetCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterSetCredentialResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRDoorLockClusterGetCredentialStatusParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetCredentialStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearCredentialParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::ClearCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDoorLockClusterUnboltDoorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::UnboltDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48295,11 +49244,11 @@ - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48309,9 +49258,9 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48320,9 +49269,9 @@ + (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48331,11 +49280,11 @@ - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48345,9 +49294,9 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48356,9 +49305,9 @@ + (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48367,11 +49316,11 @@ - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48381,9 +49330,9 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48392,9 +49341,9 @@ + (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48403,11 +49352,11 @@ - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48417,9 +49366,9 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48428,9 +49377,9 @@ + (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48439,39 +49388,11 @@ - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48481,9 +49402,9 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48492,9 +49413,9 @@ + (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48503,39 +49424,11 @@ - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48545,9 +49438,9 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48556,9 +49449,9 @@ + (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48567,39 +49460,11 @@ - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48609,9 +49474,9 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48620,9 +49485,9 @@ + (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48631,11 +49496,11 @@ - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48645,9 +49510,9 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48656,9 +49521,9 @@ + (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48667,11 +49532,11 @@ - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48681,9 +49546,9 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48692,9 +49557,9 @@ + (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48703,11 +49568,11 @@ - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48717,9 +49582,9 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48728,9 +49593,9 @@ + (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48739,11 +49604,11 @@ - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(voi completion:completion]; } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48753,9 +49618,9 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48764,9 +49629,9 @@ + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCac completion:completion]; } -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48775,11 +49640,11 @@ - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(voi completion:completion]; } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48789,9 +49654,9 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48800,9 +49665,66 @@ + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCac completion:completion]; } -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterValveConfigurationAndControl + +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterOpenParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Open::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)closeWithCompletion:(MTRStatusCompletion)completion +{ + [self closeWithParams:nil completion:completion]; +} +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterCloseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Close::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48811,11 +49733,11 @@ - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(N completion:completion]; } -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48825,9 +49747,9 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48836,9 +49758,9 @@ + (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTR completion:completion]; } -- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48847,11 +49769,44 @@ - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [self writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48861,9 +49816,9 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48872,9 +49827,9 @@ + (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48883,11 +49838,11 @@ - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48897,9 +49852,9 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48908,9 +49863,9 @@ + (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48919,11 +49874,11 @@ - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48933,9 +49888,9 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48944,9 +49899,9 @@ + (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48955,11 +49910,11 @@ - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48969,9 +49924,9 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48980,9 +49935,9 @@ + (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48991,11 +49946,11 @@ - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49005,9 +49960,9 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49016,9 +49971,9 @@ + (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49027,11 +49982,11 @@ - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^) completion:completion]; } -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49041,9 +49996,9 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49052,9 +50007,9 @@ + (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(M completion:completion]; } -- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49063,39 +50018,11 @@ - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49105,9 +50032,9 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49116,9 +50043,9 @@ + (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49127,11 +50054,11 @@ - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49146,7 +50073,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MT } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; @@ -49155,11 +50082,11 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MT std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49169,9 +50096,9 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49180,9 +50107,9 @@ + (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49191,39 +50118,11 @@ - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49233,9 +50132,9 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49244,9 +50143,9 @@ + (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49255,39 +50154,11 @@ - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49297,9 +50168,9 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49308,9 +50179,9 @@ + (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49319,39 +50190,11 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49361,9 +50204,9 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49372,9 +50215,9 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49383,11 +50226,11 @@ - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49397,9 +50240,9 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49408,9 +50251,9 @@ + (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49419,11 +50262,11 @@ - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49433,9 +50276,9 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49444,9 +50287,9 @@ + (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49455,39 +50298,11 @@ - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49497,9 +50312,9 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49508,9 +50323,9 @@ + (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49519,39 +50334,11 @@ - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49561,9 +50348,9 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49572,73 +50359,13 @@ + (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} +@end -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterElectricalEnergyMeasurement -- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49647,39 +50374,11 @@ - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49689,9 +50388,9 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49700,9 +50399,9 @@ + (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49711,167 +50410,11 @@ - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49881,9 +50424,9 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49892,9 +50435,9 @@ + (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49903,39 +50446,11 @@ - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49945,9 +50460,9 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49956,9 +50471,9 @@ + (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49967,39 +50482,11 @@ - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50009,9 +50496,9 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50020,9 +50507,9 @@ + (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50031,39 +50518,11 @@ - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50073,9 +50532,9 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50086,7 +50545,7 @@ + (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50099,7 +50558,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50111,7 +50570,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50122,7 +50581,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50135,7 +50594,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50147,7 +50606,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50158,7 +50617,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50171,7 +50630,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50183,7 +50642,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50194,7 +50653,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50207,7 +50666,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50219,7 +50678,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50230,7 +50689,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50243,7 +50702,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50255,7 +50714,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50266,7 +50725,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50279,7 +50738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50291,7 +50750,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50302,17 +50761,5267 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDoorLock (Deprecated) +@implementation MTRBaseClusterDemandResponseLoadControl -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion { - [self lockDoorWithParams:params completion: - completionHandler]; + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion { - [self unlockDoorWithParams:params completion: - completionHandler]; + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearLoadControlEventsRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self clearLoadControlEventsRequestWithParams:nil completion:completion]; +} +- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDefaultRandomDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::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 = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterDeviceEnergyManagement + +- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)cancelPowerAdjustRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self cancelPowerAdjustRequestWithParams:nil completion:completion]; +} +- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterPauseRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resumeRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self resumeRequestWithParams:nil completion:completion]; +} +- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterResumeRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::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 = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterEnergyEVSE + +- (void)disableWithCompletion:(MTRStatusCompletion)completion +{ + [self disableWithParams:nil completion:completion]; +} +- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterDisableParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::Disable::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterEnableChargingParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::EnableCharging::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterEnableDischargingParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::EnableDischarging::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startDiagnosticsWithCompletion:(MTRStatusCompletion)completion +{ + [self startDiagnosticsWithParams:nil completion:completion]; +} +- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterStartDiagnosticsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterSetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::SetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterGetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::GetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTREnergyEVSEClusterGetTargetsResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearTargetsWithCompletion:(MTRStatusCompletion)completion +{ + [self clearTargetsWithParams:nil completion:completion]; +} +- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterClearTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::ClearTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRandomizationDelayWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNextChargeTargetTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNextChargeTargetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNextChargeRequiredEnergyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNextChargeRequiredEnergyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNextChargeRequiredEnergyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNextChargeTargetSoCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::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 = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterDoorLock + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterLockDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::LockDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnlockDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnlockDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnlockWithTimeoutParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetUserResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterSetCredentialResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetCredentialStatusParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetCredentialStatus::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnboltDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnboltDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::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 = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterDoorLock (Deprecated) + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self lockDoorWithParams:params completion: + completionHandler]; +} +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self unlockDoorWithParams:params completion: + completionHandler]; } - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completionHandler:(MTRStatusCompletion)completionHandler { @@ -58990,7 +64699,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:( ListFreer listFreer; using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -59118,7 +64827,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTR ListFreer listFreer; using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -59326,7 +65035,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu ListFreer listFreer; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -59459,7 +65168,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60013,7 +65722,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWrit ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60141,7 +65850,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value para ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60205,7 +65914,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60269,7 +65978,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MT ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = static_cast>(value.unsignedIntValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60333,7 +66042,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -60433,7 +66142,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64364,7 +70073,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value ListFreer listFreer; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64428,7 +70137,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:( ListFreer listFreer; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64492,7 +70201,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul ListFreer listFreer; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -84189,6 +89898,78 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl queue:self.callbackQueue completion:responseHandler]; } +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRChannelClusterGetProgramGuideParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::GetProgramGuide::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRChannelClusterProgramGuideResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRChannelClusterRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::RecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRChannelClusterCancelRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::CancelRecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { @@ -85578,10 +91359,6 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params com queue:self.callbackQueue completion:responseHandler]; } -- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self rewindWithParams:nil completion:completion]; -} - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { @@ -85606,10 +91383,6 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params queue:self.callbackQueue completion:responseHandler]; } -- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self fastForwardWithParams:nil completion:completion]; -} - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { @@ -85706,6 +91479,82 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completion:(v queue:self.callbackQueue completion:responseHandler]; } +- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterActivateAudioTrackParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterActivateTextTrackParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)deactivateTextTrackWithCompletion:(MTRStatusCompletion)completion +{ + [self deactivateTextTrackWithParams:nil completion:completion]; +} +- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -85959,6 +91808,150 @@ + (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } +- (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAvailableAudioTracksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAvailableAudioTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveTextTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::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 = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; @@ -86259,10 +92252,6 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler(static_cast(data), error); }]; } -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self rewindWithParams:nil completionHandler:completionHandler]; -} - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { [self fastForwardWithParams:params completion: @@ -86271,10 +92260,6 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla completionHandler(static_cast(data), error); }]; } -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self fastForwardWithParams:nil completionHandler:completionHandler]; -} - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { [self skipForwardWithParams:params completion: @@ -87411,40 +93396,481 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterLowPower +@implementation MTRBaseClusterLowPower + +- (void)sleepWithCompletion:(MTRStatusCompletion)completion +{ + [self sleepWithParams:nil completion:completion]; +} +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLowPowerClusterSleepParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LowPower::Commands::Sleep::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterLowPower (Deprecated) + +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:params completion: + completionHandler]; +} +- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:nil completionHandler:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterKeypadInput -- (void)sleepWithCompletion:(MTRStatusCompletion)completion -{ - [self sleepWithParams:nil completion:completion]; -} -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRLowPowerClusterSleepParams + params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LowPower::Commands::Sleep::Type; + using RequestType = KeypadInput::Commands::SendKey::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRKeypadInputClusterSendKeyResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87457,7 +93883,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87469,7 +93895,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87480,7 +93906,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87493,7 +93919,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87505,7 +93931,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87516,7 +93942,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87529,7 +93955,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87541,7 +93967,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87552,7 +93978,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87565,7 +93991,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87577,7 +94003,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87588,7 +94014,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87601,7 +94027,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87613,7 +94039,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87624,7 +94050,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87637,7 +94063,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87649,7 +94075,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87660,16 +94086,15 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLowPower (Deprecated) +@implementation MTRBaseClusterKeypadInput (Deprecated) -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self sleepWithParams:params completion: - completionHandler]; -} -- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self sleepWithParams:nil completionHandler:completionHandler]; + [self sendKeyWithParams:params completion: + ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -87856,12 +94281,12 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterKeypadInput +@implementation MTRBaseClusterContentLauncher -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRKeypadInputClusterSendKeyParams + params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; } @@ -87871,21 +94296,145 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = KeypadInput::Commands::SendKey::Type; + using RequestType = ContentLauncher::Commands::LaunchContent::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRKeypadInputClusterSendKeyResponseParams.class + responseClass:MTRContentLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRContentLauncherClusterLaunchURLParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentLauncher::Commands::LaunchURL::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::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 = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87898,7 +94447,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87910,7 +94459,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87921,7 +94470,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87934,7 +94483,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87946,7 +94495,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87957,7 +94506,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87970,7 +94519,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87982,7 +94531,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87993,7 +94542,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88006,7 +94555,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88018,7 +94567,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88029,7 +94578,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88042,7 +94591,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88054,7 +94603,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88065,7 +94614,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88078,7 +94627,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88090,7 +94639,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88101,15 +94650,101 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterKeypadInput (Deprecated) +@implementation MTRBaseClusterContentLauncher (Deprecated) -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self sendKeyWithParams:params completion: - ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self launchContentWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self launchURLWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptHeaderWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptHeaderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptHeaderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedStreamingProtocolsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedStreamingProtocolsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedStreamingProtocolsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -88296,60 +94931,60 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterContentLauncher +@implementation MTRBaseClusterAudioOutput -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRContentLauncherClusterLaunchContentParams + params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ContentLauncher::Commands::LaunchContent::Type; + using RequestType = AudioOutput::Commands::SelectOutput::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRContentLauncherClusterLaunchURLParams + params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ContentLauncher::Commands::LaunchURL::Type; + using RequestType = AudioOutput::Commands::RenameOutput::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88358,11 +94993,11 @@ - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable va completion:completion]; } -- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88372,9 +95007,9 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88383,9 +95018,9 @@ + (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88394,39 +95029,11 @@ - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88436,9 +95043,9 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88449,7 +95056,7 @@ + (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRCluste - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88462,7 +95069,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88474,7 +95081,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88485,7 +95092,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88498,7 +95105,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88510,7 +95117,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88521,7 +95128,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88534,7 +95141,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88546,7 +95153,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88557,7 +95164,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88570,7 +95177,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88582,7 +95189,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88593,7 +95200,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88606,7 +95213,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88618,7 +95225,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88629,7 +95236,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88642,7 +95249,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88654,7 +95261,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88665,37 +95272,31 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterContentLauncher (Deprecated) +@implementation MTRBaseClusterAudioOutput (Deprecated) -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self launchContentWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self selectOutputWithParams:params completion: + completionHandler]; } -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self launchURLWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self renameOutputWithParams:params completion: + completionHandler]; } -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptHeaderWithCompletion: + [self readAttributeOutputListWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88704,41 +95305,33 @@ - (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptHeaderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOutputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptHeaderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOutputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedStreamingProtocolsWithCompletion: + [self readAttributeCurrentOutputWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88747,19 +95340,19 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSupportedStreamingProtocolsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentOutputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedStreamingProtocolsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentOutputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -88946,60 +95539,84 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterAudioOutput +@implementation MTRBaseClusterApplicationLauncher -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAudioOutputClusterSelectOutputParams + params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = AudioOutput::Commands::SelectOutput::Type; + using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAudioOutputClusterRenameOutputParams + params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = AudioOutput::Commands::RenameOutput::Type; + using RequestType = ApplicationLauncher::Commands::StopApp::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRApplicationLauncherClusterHideAppParams + alloc] init]; + } -- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ApplicationLauncher::Commands::HideApp::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89008,11 +95625,11 @@ - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89022,9 +95639,9 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89033,9 +95650,9 @@ + (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89044,11 +95661,49 @@ - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.application.catalogVendorID = value.application.catalogVendorID.unsignedShortValue; + nonNullValue_0.application.applicationID = AsCharSpan(value.application.applicationID); + if (value.endpoint != nil) { + auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); + definedValue_2 = value.endpoint.unsignedShortValue; + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89058,9 +95713,9 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89071,7 +95726,7 @@ + (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89084,7 +95739,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89096,7 +95751,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89107,7 +95762,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89120,7 +95775,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89132,7 +95787,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89143,7 +95798,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89156,7 +95811,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89168,7 +95823,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89179,7 +95834,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89192,7 +95847,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89204,7 +95859,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89215,7 +95870,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89228,7 +95883,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89240,7 +95895,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89251,7 +95906,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89264,7 +95919,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89276,7 +95931,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89287,31 +95942,88 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterAudioOutput (Deprecated) +@implementation MTRBaseClusterApplicationLauncher (Deprecated) -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self selectOutputWithParams:params completion: - completionHandler]; + [self launchAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self stopAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self hideAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCatalogListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCatalogListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCatalogListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentAppWithCompletion: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self renameOutputWithParams:params completion: - completionHandler]; + [self writeAttributeCurrentAppWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeOutputListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeCurrentAppWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -89320,55 +96032,20 @@ - (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOutputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeCurrentAppWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOutputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentOutputWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentOutputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentAppWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentOutputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -89554,84 +96231,155 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterApplicationLauncher +@implementation MTRBaseClusterApplicationBasic -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRApplicationLauncherClusterLaunchAppParams - alloc] init]; - } + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRApplicationLauncherClusterStopAppParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ApplicationLauncher::Commands::StopApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class +- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRApplicationLauncherClusterHideAppParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ApplicationLauncher::Commands::HideApp::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89640,11 +96388,11 @@ - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable val completion:completion]; } -- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89654,9 +96402,9 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89665,9 +96413,9 @@ + (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89676,49 +96424,83 @@ - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherCl completion:completion]; } -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable) value params:nil completion:completion]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.application.catalogVendorID = value.application.catalogVendorID.unsignedShortValue; - nonNullValue_0.application.applicationID = AsCharSpan(value.application.applicationID); - if (value.endpoint != nil) { - auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); - definedValue_2 = value.endpoint.unsignedShortValue; - } - } +- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89728,9 +96510,9 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89741,7 +96523,7 @@ + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89754,7 +96536,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89766,7 +96548,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89777,7 +96559,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89790,7 +96572,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89802,7 +96584,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89813,7 +96595,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89826,7 +96608,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89838,7 +96620,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89849,7 +96631,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89862,7 +96644,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89874,7 +96656,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89885,7 +96667,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89898,7 +96680,43 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89907,95 +96725,174 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa reportHandler:reportHandler subscriptionEstablished:subscriptionEstablished]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterApplicationBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeApplicationNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeApplicationNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeApplicationNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterApplicationLauncher (Deprecated) - -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self launchAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeProductIDWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self stopAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self hideAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCatalogListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationWithCompletion: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -90004,41 +96901,68 @@ - (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCatalogListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeApplicationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCatalogListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentAppWithCompletion: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeCurrentAppWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeCurrentAppWithValue:value params:params completion:completionHandler]; + [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationVersionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -90047,19 +96971,54 @@ - (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentAppWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeApplicationVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentAppWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeApplicationVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAllowedVendorListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAllowedVendorListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAllowedVendorListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -90163,382 +97122,176 @@ + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterApplicationBasic - -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterAccountLogin + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTRAccountLoginClusterGetSetupPINParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::GetSetupPIN::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRAccountLoginClusterLoginParams + alloc] init]; + } -+ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::Login::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRAccountLoginClusterLogoutParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::Logout::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90551,7 +97304,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90563,7 +97316,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90574,7 +97327,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90587,7 +97340,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90599,7 +97352,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90610,7 +97363,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90623,7 +97376,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90635,7 +97388,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90646,7 +97399,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90659,7 +97412,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90671,7 +97424,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90682,358 +97435,97 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterApplicationBasic (Deprecated) - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationWithCompletion: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeApplicationVersionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeApplicationVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterAccountLogin (Deprecated) + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeAllowedVendorListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self getSetupPINWithParams:params completion: + ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAllowedVendorListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self loginWithParams:params completion: + completionHandler]; } -+ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeAllowedVendorListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self logoutWithParams:params completion: + completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -91211,106 +97703,569 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContain }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterContentControl + +- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterUpdatePINParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::UpdatePIN::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resetPINWithCompletion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resetPINWithParams:nil completion:completion]; +} +- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRContentControlClusterResetPINParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::ResetPIN::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentControlClusterResetPINResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableWithCompletion:(MTRStatusCompletion)completion +{ + [self enableWithParams:nil completion:completion]; +} +- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterEnableParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::Enable::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)disableWithCompletion:(MTRStatusCompletion)completion +{ + [self disableWithParams:nil completion:completion]; +} +- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterDisableParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::Disable::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterAddBonusTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBonusTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterSetScreenDailyTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)blockUnratedContentWithCompletion:(MTRStatusCompletion)completion +{ + [self blockUnratedContentWithParams:nil completion:completion]; +} +- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterBlockUnratedContentParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::BlockUnratedContent::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unblockUnratedContentWithCompletion:(MTRStatusCompletion)completion +{ + [self unblockUnratedContentWithParams:nil completion:completion]; +} +- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterUnblockUnratedContentParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterAccountLogin - -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRAccountLoginClusterGetSetupPINParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AccountLogin::Commands::GetSetupPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAccountLoginClusterLoginParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = AccountLogin::Commands::Login::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)logoutWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self logoutWithParams:nil completion:completion]; + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRAccountLoginClusterLogoutParams - alloc] init]; - } + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } +- (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = AccountLogin::Commands::Logout::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockUnrated::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 = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91323,7 +98278,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91335,7 +98290,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91346,7 +98301,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91359,7 +98314,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91371,7 +98326,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91382,7 +98337,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91395,7 +98350,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91407,7 +98362,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91418,7 +98373,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91431,7 +98386,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91443,7 +98398,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91454,7 +98409,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91467,7 +98422,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91479,7 +98434,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91490,7 +98445,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91503,7 +98458,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -91515,7 +98470,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -91526,211 +98481,247 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterAccountLogin (Deprecated) +@implementation MTRBaseClusterContentAppObserver -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getSetupPINWithParams:params completion: - ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self loginWithParams:params completion: - completionHandler]; + if (params == nil) { + params = [[MTRContentAppObserverClusterContentAppMessageParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentAppObserverClusterContentAppMessageResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self logoutWithParams:params completion: - completionHandler]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self logoutWithParams:nil completionHandler:completionHandler]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index c37031dd3e0382..9de74b6645d33a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -126,13 +126,16 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeUserLabelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000041, MTRClusterIDTypeBooleanStateID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRClusterIDTypeICDManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000046, - MTRClusterIDTypeOvenOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000048, + MTRClusterIDTypeTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000047, + MTRClusterIDTypeOvenCavityOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000048, + MTRClusterIDTypeOvenModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000049, + MTRClusterIDTypeLaundryDryerControlsID MTR_PROVISIONALLY_AVAILABLE = 0x0000004A, MTRClusterIDTypeModeSelectID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, MTRClusterIDTypeLaundryWasherModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000051, MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000052, MTRClusterIDTypeLaundryWasherControlsID MTR_PROVISIONALLY_AVAILABLE = 0x00000053, - MTRClusterIDTypeRVCRunModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000054, - MTRClusterIDTypeRVCCleanModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000055, + MTRClusterIDTypeRVCRunModeID MTR_NEWLY_AVAILABLE = 0x00000054, + MTRClusterIDTypeRVCCleanModeID MTR_NEWLY_AVAILABLE = 0x00000055, MTRClusterIDTypeTemperatureControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000056, MTRClusterIDTypeRefrigeratorAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000057, MTRClusterIDTypeDishwasherModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000059, @@ -141,10 +144,16 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeDishwasherAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x0000005D, MTRClusterIDTypeMicrowaveOvenModeID MTR_PROVISIONALLY_AVAILABLE = 0x0000005E, MTRClusterIDTypeMicrowaveOvenControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000005F, - MTRClusterIDTypeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000060, - MTRClusterIDTypeRVCOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000061, + MTRClusterIDTypeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000060, + MTRClusterIDTypeRVCOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000061, MTRClusterIDTypeHEPAFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000071, MTRClusterIDTypeActivatedCarbonFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000072, + MTRClusterIDTypeBooleanStateConfigurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, + MTRClusterIDTypeValveConfigurationAndControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000081, + MTRClusterIDTypeElectricalEnergyMeasurementID MTR_PROVISIONALLY_AVAILABLE = 0x00000091, + MTRClusterIDTypeDemandResponseLoadControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000096, + MTRClusterIDTypeDeviceEnergyManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000098, + MTRClusterIDTypeEnergyEVSEID MTR_PROVISIONALLY_AVAILABLE = 0x00000099, MTRClusterIDTypeDoorLockID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000101, MTRClusterIDTypeWindowCoveringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000102, MTRClusterIDTypeBarrierControlID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000103, @@ -182,6 +191,8 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeApplicationLauncherID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050C, MTRClusterIDTypeApplicationBasicID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050D, MTRClusterIDTypeAccountLoginID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E, + MTRClusterIDTypeContentControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F, + MTRClusterIDTypeContentAppObserverID MTR_PROVISIONALLY_AVAILABLE = 0x00000510, MTRClusterIDTypeElectricalMeasurementID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000B04, MTRClusterIDTypeUnitTestingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05, MTRClusterIDTypeSampleMEIID MTR_PROVISIONALLY_AVAILABLE = 0xFFF1FC20, @@ -320,7 +331,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterScenesAttributeNameSupportID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterScenesAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -828,6 +839,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00000014, + MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000015, + MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID MTR_PROVISIONALLY_AVAILABLE = 0x00000016, MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -1171,7 +1184,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001C, MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001D, MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, - MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_PROVISIONALLY_AVAILABLE = 0x0000001F, + MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_NEWLY_AVAILABLE = 0x0000001F, MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterPowerSourceAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -2251,19 +2264,52 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster OvenOperationalState attributes - MTRAttributeIDTypeClusterOvenOperationalStateAttributePhaseListID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeCurrentPhaseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeCountdownTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalStateListID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOvenOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster Timer attributes + MTRAttributeIDTypeClusterTimerAttributeSetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterTimerAttributeTimerStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTimerAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterTimerAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterTimerAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster OvenCavityOperationalState attributes + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster OvenMode attributes + MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterOvenModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOvenModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster LaundryDryerControls attributes + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster ModeSelect deprecated attribute names MTRClusterModeSelectAttributeDescriptionID @@ -2351,26 +2397,26 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RVCRunMode attributes - MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RVCCleanMode attributes - MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster TemperatureControl attributes MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2475,32 +2521,32 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster OperationalState attributes - MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RVCOperationalState attributes - MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster HEPAFilterMonitoring attributes MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2530,6 +2576,117 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster BooleanStateConfiguration attributes + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ValveConfigurationAndControl attributes + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ElectricalEnergyMeasurement attributes + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAccuracyID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyImportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyExportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyImportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyExportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster DemandResponseLoadControl attributes + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster DeviceEnergyManagement attributes + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESATypeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESACanGenerateID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESAStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMinPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMaxPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributePowerAdjustmentCapabilityID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster EnergyEVSE attributes + MTRAttributeIDTypeClusterEnergyEVSEAttributeStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterEnergyEVSEAttributeSupplyStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterEnergyEVSEAttributeFaultStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterEnergyEVSEAttributeChargingEnabledUntilID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterEnergyEVSEAttributeDischargingEnabledUntilID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterEnergyEVSEAttributeCircuitCapacityID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterEnergyEVSEAttributeMinimumChargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumChargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000021, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000022, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000023, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000024, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID MTR_PROVISIONALLY_AVAILABLE = 0x00000025, + MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetSoCID MTR_PROVISIONALLY_AVAILABLE = 0x00000026, + MTRAttributeIDTypeClusterEnergyEVSEAttributeApproximateEVEfficiencyID MTR_PROVISIONALLY_AVAILABLE = 0x00000027, + MTRAttributeIDTypeClusterEnergyEVSEAttributeStateOfChargeID MTR_PROVISIONALLY_AVAILABLE = 0x00000030, + MTRAttributeIDTypeClusterEnergyEVSEAttributeBatteryCapacityID MTR_PROVISIONALLY_AVAILABLE = 0x00000031, + MTRAttributeIDTypeClusterEnergyEVSEAttributeVehicleIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000032, + MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000040, + MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000041, + MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyChargedID MTR_PROVISIONALLY_AVAILABLE = 0x00000042, + MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyDischargedID MTR_PROVISIONALLY_AVAILABLE = 0x00000043, + MTRAttributeIDTypeClusterEnergyEVSEAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterEnergyEVSEAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterEnergyEVSEAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterEnergyEVSEAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster DoorLock deprecated attribute names MTRClusterDoorLockAttributeLockStateID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterDoorLockAttributeLockStateID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -4274,6 +4431,10 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, + MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveAudioTrackID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableAudioTracksID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveTextTrackID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableTextTracksID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -4545,6 +4706,30 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ContentControl attributes + MTRAttributeIDTypeClusterContentControlAttributeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterContentControlAttributeScreenDailyTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterContentControlAttributeRemainingScreenTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterContentControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterContentControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterContentControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterContentControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ContentAppObserver attributes + MTRAttributeIDTypeClusterContentAppObserverAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ElectricalMeasurement deprecated attribute names MTRClusterElectricalMeasurementAttributeMeasurementTypeID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -5984,13 +6169,24 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + + // Cluster Timer commands + MTRCommandIDTypeClusterTimerCommandSetTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterTimerCommandResetTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterTimerCommandAddTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterTimerCommandReduceTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + + // Cluster OvenCavityOperationalState commands + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandPauseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandResumeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterOvenCavityOperationalStateCommandOperationalCommandResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - // Cluster OvenOperationalState commands - MTRCommandIDTypeClusterOvenOperationalStateCommandPauseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOvenOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterOvenOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterOvenOperationalStateCommandResumeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterOvenOperationalStateCommandOperationalCommandResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + // Cluster OvenMode commands + MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID @@ -6009,12 +6205,12 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster RVCRunMode commands - MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster RVCCleanMode commands - MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeResponseID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster TemperatureControl commands MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6035,18 +6231,18 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterMicrowaveOvenControlCommandAddMoreTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster OperationalState commands - MTRCommandIDTypeClusterOperationalStateCommandPauseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterOperationalStateCommandResumeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterOperationalStateCommandOperationalCommandResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterOperationalStateCommandPauseID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOperationalStateCommandStopID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterOperationalStateCommandStartID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterOperationalStateCommandResumeID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterOperationalStateCommandOperationalCommandResponseID MTR_NEWLY_AVAILABLE = 0x00000004, // Cluster RVCOperationalState commands - MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID MTR_NEWLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterRVCOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterRVCOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_NEWLY_AVAILABLE = 0x00000004, // Cluster HEPAFilterMonitoring commands MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6054,6 +6250,40 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster ActivatedCarbonFilterMonitoring commands MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster BooleanStateConfiguration commands + MTRCommandIDTypeClusterBooleanStateConfigurationCommandSuppressAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterBooleanStateConfigurationCommandEnableDisableAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster ValveConfigurationAndControl commands + MTRCommandIDTypeClusterValveConfigurationAndControlCommandOpenID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterValveConfigurationAndControlCommandCloseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster DemandResponseLoadControl commands + MTRCommandIDTypeClusterDemandResponseLoadControlCommandRegisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterDemandResponseLoadControlCommandUnregisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDemandResponseLoadControlCommandAddLoadControlEventRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterDemandResponseLoadControlCommandRemoveLoadControlEventRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterDemandResponseLoadControlCommandClearLoadControlEventsRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + + // Cluster DeviceEnergyManagement commands + MTRCommandIDTypeClusterDeviceEnergyManagementCommandPowerAdjustRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandCancelPowerAdjustRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandStartTimeAdjustRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandPauseRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandResumeRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandModifyForecastRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterDeviceEnergyManagementCommandRequestConstraintBasedForecastID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + + // Cluster EnergyEVSE commands + MTRCommandIDTypeClusterEnergyEVSECommandGetTargetsResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterEnergyEVSECommandDisableID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterEnergyEVSECommandEnableChargingID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterEnergyEVSECommandEnableDischargingID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterEnergyEVSECommandStartDiagnosticsID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterEnergyEVSECommandSetTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterEnergyEVSECommandGetTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterEnergyEVSECommandClearTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + // Cluster DoorLock deprecated command id names MTRClusterDoorLockCommandLockDoorID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterDoorLockCommandLockDoorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -6327,6 +6557,10 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterChannelCommandChangeChannelResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRCommandIDTypeClusterChannelCommandSkipChannelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, + MTRCommandIDTypeClusterChannelCommandGetProgramGuideID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterChannelCommandProgramGuideResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterChannelCommandRecordProgramID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterChannelCommandCancelRecordProgramID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, // Cluster TargetNavigator deprecated command id names MTRClusterTargetNavigatorCommandNavigateTargetID @@ -6391,6 +6625,9 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, MTRCommandIDTypeClusterMediaPlaybackCommandPlaybackResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000A, MTRCommandIDTypeClusterMediaPlaybackCommandSeekID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000B, + MTRCommandIDTypeClusterMediaPlaybackCommandActivateAudioTrackID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, + MTRCommandIDTypeClusterMediaPlaybackCommandActivateTextTrackID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, + MTRCommandIDTypeClusterMediaPlaybackCommandDeactivateTextTrackID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, // Cluster MediaInput deprecated command id names MTRClusterMediaInputCommandSelectInputID @@ -6500,6 +6737,23 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterAccountLoginCommandLoginID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRCommandIDTypeClusterAccountLoginCommandLogoutID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, + // Cluster ContentControl commands + MTRCommandIDTypeClusterContentControlCommandUpdatePINID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterContentControlCommandResetPINID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterContentControlCommandResetPINResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterContentControlCommandEnableID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterContentControlCommandDisableID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterContentControlCommandAddBonusTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterContentControlCommandSetScreenDailyTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterContentControlCommandBlockUnratedContentID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRCommandIDTypeClusterContentControlCommandUnblockUnratedContentID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRCommandIDTypeClusterContentControlCommandSetOnDemandRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRCommandIDTypeClusterContentControlCommandSetScheduledContentRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + + // Cluster ContentAppObserver commands + MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster ElectricalMeasurement deprecated command id names MTRClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -6863,9 +7117,9 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster BooleanState events MTREventIDTypeClusterBooleanStateEventStateChangeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - // Cluster OvenOperationalState events - MTREventIDTypeClusterOvenOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterOvenOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster OvenCavityOperationalState events + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster RefrigeratorAlarm events MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6887,12 +7141,41 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterDishwasherAlarmEventNotifyID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, // Cluster OperationalState events - MTREventIDTypeClusterOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, // Cluster RVCOperationalState events - MTREventIDTypeClusterRVCOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterRVCOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterRVCOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterRVCOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, + + // Cluster BooleanStateConfiguration events + MTREventIDTypeClusterBooleanStateConfigurationEventAlarmsStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterBooleanStateConfigurationEventSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster ValveConfigurationAndControl events + MTREventIDTypeClusterValveConfigurationAndControlEventValveStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterValveConfigurationAndControlEventValveFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster ElectricalEnergyMeasurement events + MTREventIDTypeClusterElectricalEnergyMeasurementEventCumulativeEnergyMeasuredID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterElectricalEnergyMeasurementEventPeriodicEnergyMeasuredID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster DemandResponseLoadControl events + MTREventIDTypeClusterDemandResponseLoadControlEventLoadControlEventStatusChangeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + + // Cluster DeviceEnergyManagement events + MTREventIDTypeClusterDeviceEnergyManagementEventPowerAdjustStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterDeviceEnergyManagementEventPowerAdjustEndID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterDeviceEnergyManagementEventPausedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTREventIDTypeClusterDeviceEnergyManagementEventResumedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + + // Cluster EnergyEVSE events + MTREventIDTypeClusterEnergyEVSEEventEVConnectedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterEnergyEVSEEventEVNotDetectedID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterEnergyEVSEEventEnergyTransferStartedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTREventIDTypeClusterEnergyEVSEEventEnergyTransferStoppedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTREventIDTypeClusterEnergyEVSEEventFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTREventIDTypeClusterEnergyEVSEEventRFIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, // Cluster DoorLock deprecated event names MTRClusterDoorLockEventDoorLockAlarmID @@ -6990,6 +7273,24 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterPumpConfigurationAndControlEventAirDetectionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F, MTREventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, + // Cluster TargetNavigator deprecated event names + + // Cluster TargetNavigator events + MTREventIDTypeClusterTargetNavigatorEventTargetUpdatedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + + // Cluster MediaPlayback deprecated event names + + // Cluster MediaPlayback events + MTREventIDTypeClusterMediaPlaybackEventStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + + // Cluster AccountLogin deprecated event names + + // Cluster AccountLogin events + MTREventIDTypeClusterAccountLoginEventLoggedOutID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + + // Cluster ContentControl events + MTREventIDTypeClusterContentControlEventRemainingScreenTimeExpiredID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster TestCluster deprecated event names MTRClusterTestClusterEventTestEventID MTR_DEPRECATED("Please use MTREventIDTypeClusterUnitTestingEventTestEventID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -7002,4 +7303,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterUnitTestingEventTestEventID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTREventIDTypeClusterUnitTestingEventTestFabricScopedEventID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, + // Cluster SampleMEI events + MTREventIDTypeClusterSampleMEIEventPingCountEventID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 8fdafbbce81d14..0da195e4c8bab8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -147,7 +147,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -728,6 +728,10 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +- (NSDictionary * _Nullable)readAttributeSpecificationVersionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxPathsPerInvokeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1089,7 +1093,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2146,8 +2150,8 @@ MTR_PROVISIONALLY_AVAILABLE - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayActiveRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2196,23 +2200,72 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Oven Operational State + * Cluster Timer + * This cluster supports creating a simple timer functionality. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterTimer : MTRGenericCluster + +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetTimerWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSetTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTimeRemainingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTimerStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterTimer (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Oven Cavity Operational State * This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterOvenOperationalState : MTRGenericCluster +@interface MTRClusterOvenCavityOperationalState : MTRGenericCluster -- (void)pauseWithParams:(MTROvenOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithParams:(MTROvenOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2244,7 +2297,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterOvenOperationalState (Availability) +@interface MTRClusterOvenCavityOperationalState (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -2256,6 +2309,99 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Oven Mode + * Attributes and commands for selecting a mode from a list of supported options. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterOvenMode : MTRGenericCluster + +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterOvenMode (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Laundry Dryer Controls + * This cluster supports remotely monitoring and controling the different typs of + functionality available to a drying device, such as a laundry dryer. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterLaundryDryerControls : MTRGenericCluster + +- (NSDictionary * _Nullable)readAttributeSupportedDrynessLevelsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSelectedDrynessLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterLaundryDryerControls (Availability) + +/** + * The queue is currently unused, but may be used in the future for calling completions + * for command invocations if commands are added to this cluster. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Mode Select * Attributes and commands for selecting a mode from a list of supported options. @@ -2462,30 +2608,30 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster RVC Run Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterRVCRunMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2500,7 +2646,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2508,30 +2654,30 @@ MTR_PROVISIONALLY_AVAILABLE * Cluster RVC Clean Mode * Attributes and commands for selecting a mode from a list of supported options. */ -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRClusterRVCCleanMode : MTRGenericCluster -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2546,7 +2692,7 @@ MTR_PROVISIONALLY_AVAILABLE */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; @end @@ -2763,11 +2909,323 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterSmokeCOAlarm (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Dishwasher Alarm + * Attributes and commands for configuring the Dishwasher alarm. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterDishwasherAlarm : MTRGenericCluster + +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterDishwasherAlarm (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Microwave Oven Mode + * Attributes and commands for selecting a mode from a list of supported options. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterMicrowaveOvenMode : MTRGenericCluster + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterMicrowaveOvenMode (Availability) + +/** + * The queue is currently unused, but may be used in the future for calling completions + * for command invocations if commands are added to this cluster. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Microwave Oven Control + * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterMicrowaveOvenControl : MTRGenericCluster + +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterMicrowaveOvenControl (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Operational State + * This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. + */ +MTR_NEWLY_AVAILABLE +@interface MTRClusterOperationalState : MTRGenericCluster + +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterOperationalState (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + +@end + +/** + * Cluster RVC Operational State + * This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. + */ +MTR_NEWLY_AVAILABLE +@interface MTRClusterRVCOperationalState : MTRGenericCluster + +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterRVCOperationalState (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + +@end + +/** + * Cluster HEPA Filter Monitoring + * Attributes and commands for monitoring HEPA filters in a device + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterHEPAFilterMonitoring : MTRGenericCluster + +- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetConditionWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2786,7 +3244,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterSmokeCOAlarm (Availability) +@interface MTRClusterHEPAFilterMonitoring (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -2799,22 +3257,29 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Dishwasher Alarm - * Attributes and commands for configuring the Dishwasher alarm. + * Cluster Activated Carbon Filter Monitoring + * Attributes and commands for monitoring activated carbon filters in a device */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterDishwasherAlarm : MTRGenericCluster +@interface MTRClusterActivatedCarbonFilterMonitoring : MTRGenericCluster -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetConditionWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2833,7 +3298,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterDishwasherAlarm (Availability) +@interface MTRClusterActivatedCarbonFilterMonitoring (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -2846,15 +3311,32 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Microwave Oven Mode - * Attributes and commands for selecting a mode from a list of supported options. + * Cluster Boolean State Configuration + * This cluster is used to configure a boolean sensor. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterMicrowaveOvenMode : MTRGenericCluster +@interface MTRClusterBooleanStateConfiguration : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2873,11 +3355,11 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterMicrowaveOvenMode (Availability) +@interface MTRClusterBooleanStateConfiguration (Availability) /** - * The queue is currently unused, but may be used in the future for calling completions - * for command invocations if commands are added to this cluster. + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID @@ -2886,24 +3368,40 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Microwave Oven Control - * Attributes and commands for configuring the microwave oven control, and reporting cooking stats. + * Cluster Valve Configuration and Control + * This cluster is used to configure a valve. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterMicrowaveOvenControl : MTRGenericCluster +@interface MTRClusterValveConfigurationAndControl : MTRGenericCluster -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeOpenDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeDefaultOpenDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAutoCloseTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeRemainingDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTargetStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTargetLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDefaultOpenLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeValveFaultWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2922,7 +3420,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterMicrowaveOvenControl (Availability) +@interface MTRClusterValveConfigurationAndControl (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -2935,36 +3433,21 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Operational State - * This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. + * Cluster Electrical Energy Measurement + * This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterOperationalState : MTRGenericCluster - -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +@interface MTRClusterElectricalEnergyMeasurement : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAccuracyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCumulativeEnergyImportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCumulativeEnergyExportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePeriodicEnergyImportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePeriodicEnergyExportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2983,11 +3466,11 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterOperationalState (Availability) +@interface MTRClusterElectricalEnergyMeasurement (Availability) /** - * For all instance methods that take a completion (i.e. command invocations), - * the completion will be called on the provided queue. + * The queue is currently unused, but may be used in the future for calling completions + * for command invocations if commands are added to this cluster. */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID @@ -2996,36 +3479,39 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster RVC Operational State - * This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. + * Cluster Demand Response Load Control + * This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterRVCOperationalState : MTRGenericCluster - -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +@interface MTRClusterDemandResponseLoadControl : MTRGenericCluster + +- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearLoadControlEventsRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeEventsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeActiveEventsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfEventsPerProgramWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfTransitionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDefaultRandomStartWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDefaultRandomDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3044,7 +3530,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterRVCOperationalState (Availability) +@interface MTRClusterDemandResponseLoadControl (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -3057,29 +3543,37 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster HEPA Filter Monitoring - * Attributes and commands for monitoring HEPA filters in a device + * Cluster Device Energy Management + * This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterHEPAFilterMonitoring : MTRGenericCluster +@interface MTRClusterDeviceEnergyManagement : MTRGenericCluster -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resetConditionWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPowerAdjustRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resumeRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeESATypeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeESACanGenerateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeESAStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAbsMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeAbsMaxPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributePowerAdjustmentCapabilityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeForecastWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3098,7 +3592,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterHEPAFilterMonitoring (Availability) +@interface MTRClusterDeviceEnergyManagement (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -3111,29 +3605,81 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Activated Carbon Filter Monitoring - * Attributes and commands for monitoring activated carbon filters in a device + * Cluster Energy EVSE + * Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterActivatedCarbonFilterMonitoring : MTRGenericCluster +@interface MTRClusterEnergyEVSE : MTRGenericCluster -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)resetConditionWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)disableWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startDiagnosticsWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearTargetsWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupplyStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFaultStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeChargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeDischargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCircuitCapacityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMinimumChargeCurrentWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaximumDischargeCurrentWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeUserMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeRandomizationDelayWindowWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNextChargeTargetTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNextChargeRequiredEnergyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNextChargeTargetSoCWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeApproximateEVEfficiencyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStateOfChargeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeBatteryCapacityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeVehicleIDWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSessionIDWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSessionDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSessionEnergyChargedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSessionEnergyDischargedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3152,7 +3698,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterActivatedCarbonFilterMonitoring (Availability) +@interface MTRClusterEnergyEVSE (Availability) /** * For all instance methods that take a completion (i.e. command invocations), @@ -5116,6 +5662,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5220,14 +5769,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)nextWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)rewindWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)fastForwardWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)deactivateTextTrackWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5243,6 +5793,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary * _Nullable)readAttributeActiveAudioTrackWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAvailableAudioTracksWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeActiveTextTrackWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAvailableTextTracksWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5595,8 +6153,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)logoutWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5627,6 +6183,117 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Content Control + * This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterContentControl : MTRGenericCluster + +- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)resetPINWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)disableWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)blockUnratedContentWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unblockUnratedContentWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOnDemandRatingsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOnDemandRatingThresholdWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeScheduledContentRatingsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeScheduledContentRatingThresholdWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeScreenDailyTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeRemainingScreenTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeBlockUnratedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterContentControl (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Content App Observer + * This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterContentAppObserver : MTRGenericCluster + +- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterContentAppObserver (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Electrical Measurement * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. @@ -7033,9 +7700,7 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use nextWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)nextWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use nextWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use rewindWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)rewindWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use rewindWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use fastForwardWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)fastForwardWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use fastForwardWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use skipForwardWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use skipBackwardWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use seekWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @@ -7122,7 +7787,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use getSetupPINWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use loginWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use logoutWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)logoutWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use logoutWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end @interface MTRClusterElectricalMeasurement (Deprecated) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 4948df10c44e23..5af8ad258ac25c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -736,9 +736,9 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedVa return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params @@ -2760,6 +2760,16 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; } +- (NSDictionary * _Nullable)readAttributeSpecificationVersionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxPathsPerInvokeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -6469,11 +6479,11 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam completion:responseHandler]; } -- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stayActiveRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRICDManagementClusterStayActiveRequestParams @@ -6481,7 +6491,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -6495,7 +6505,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRICDManagementClusterStayActiveResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -6572,26 +6582,22 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar @end -@implementation MTRClusterOvenOperationalState +@implementation MTRClusterTimer -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTROvenOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterPauseParams + params = [[MTRTimerClusterSetTimerParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Pause::Type; + using RequestType = Timer::Commands::SetTimer::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6600,29 +6606,29 @@ - (void)pauseWithParams:(MTROvenOperationalStateClusterPauseParams * _Nullable)p expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetTimerWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self resetTimerWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)stopWithParams:(MTROvenOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterStopParams + params = [[MTRTimerClusterResetTimerParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Stop::Type; + using RequestType = Timer::Commands::ResetTimer::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6631,29 +6637,25 @@ - (void)stopWithParams:(MTROvenOperationalStateClusterStopParams * _Nullable)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterStartParams + params = [[MTRTimerClusterAddTimeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Start::Type; + using RequestType = Timer::Commands::AddTime::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6662,29 +6664,25 @@ - (void)startWithParams:(MTROvenOperationalStateClusterStartParams * _Nullable)p expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenOperationalStateClusterResumeParams + params = [[MTRTimerClusterReduceTimeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenOperationalState::Commands::Resume::Type; + using RequestType = Timer::Commands::ReduceTime::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6693,89 +6691,78 @@ - (void)resumeWithParams:(MTROvenOperationalStateClusterResumeParams * _Nullable expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributePhaseListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeCurrentPhaseID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeCountdownTimeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSetTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeSetTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTimerStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimerStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterModeSelect +@implementation MTRClusterOvenCavityOperationalState -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRModeSelectClusterChangeToModeParams + params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ModeSelect::Commands::ChangeToMode::Type; + using RequestType = OvenCavityOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6784,115 +6771,81 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; -} + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterStopParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; + using RequestType = OvenCavityOperationalState::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; + [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; -} + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterStartParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRClusterModeSelect (Deprecated) + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using RequestType = OvenCavityOperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self changeToModeWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -@end - -@implementation MTRClusterLaundryWasherMode - -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRLaundryWasherModeClusterChangeToModeParams + params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; } @@ -6902,7 +6855,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + using RequestType = OvenCavityOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6911,91 +6864,79 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID) params:params]; } -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID) params:params]; } -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode +@implementation MTRClusterOvenMode -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + params = [[MTROvenModeClusterChangeToModeParams alloc] init]; } @@ -7005,7 +6946,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + using RequestType = OvenMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7014,24 +6955,24 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + responseClass:MTROvenModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7042,12 +6983,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7058,133 +6999,112 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterLaundryWasherControls +@implementation MTRClusterLaundryDryerControls -- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedDrynessLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedDrynessLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) params:params]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeSelectedDrynessLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID) params:params]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID) params:params]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCRunMode +@implementation MTRClusterModeSelect -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRRVCRunModeClusterChangeToModeParams + params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcRunMode::Commands::ChangeToMode::Type; + using RequestType = ModeSelect::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7193,24 +7113,50 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } +- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7221,47 +7167,61 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCCleanMode +@implementation MTRClusterModeSelect (Deprecated) -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeToModeWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +@end + +@implementation MTRClusterLaundryWasherMode + +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCCleanModeClusterChangeToModeParams + params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; } @@ -7271,7 +7231,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; + using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7280,24 +7240,40 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7308,57 +7284,57 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterTemperatureControl +@implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRTemperatureControlClusterSetTemperatureParams + params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = TemperatureControl::Commands::SetTemperature::Type; + using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7367,128 +7343,167 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRefrigeratorAlarm +@implementation MTRClusterLaundryWasherControls -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; + [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; +} + +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterDishwasherMode +@implementation MTRClusterRVCRunMode -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRDishwasherModeClusterChangeToModeParams + params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; } @@ -7498,7 +7513,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherMode::Commands::ChangeToMode::Type; + using RequestType = RvcRunMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7507,40 +7522,24 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class + responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7551,90 +7550,134 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterAirQuality +@implementation MTRClusterRVCCleanMode -- (NSDictionary * _Nullable)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; + if (params == nil) { + params = [[MTRRVCCleanModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; +} + +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterSmokeCOAlarm +@implementation MTRClusterTemperatureControl -- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self selfTestRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams + params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; } @@ -7644,7 +7687,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; + using RequestType = TemperatureControl::Commands::SetTemperature::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7658,130 +7701,133 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; } -- (NSDictionary * _Nullable)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; } -- (NSDictionary * _Nullable)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +@end + +@implementation MTRClusterRefrigeratorAlarm + +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeSmokeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterDishwasherAlarm +@implementation MTRClusterDishwasherMode -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRDishwasherAlarmClusterResetParams + params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherAlarm::Commands::Reset::Type; + using RequestType = DishwasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7790,140 +7836,134 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedV expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; +} + +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterMicrowaveOvenMode - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; -} +@implementation MTRClusterAirQuality -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterMicrowaveOvenControl +@implementation MTRClusterSmokeCOAlarm -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self selfTestRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; } @@ -7933,7 +7973,7 @@ - (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCooking auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7947,110 +7987,130 @@ - (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCooking completion:responseHandler]; } -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (NSDictionary * _Nullable)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; +} - using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - 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)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; +} + +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSmokeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOperationalState +@implementation MTRClusterDishwasherAlarm -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROperationalStateClusterPauseParams + params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Pause::Type; + using RequestType = DishwasherAlarm::Commands::Reset::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8059,29 +8119,25 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROperationalStateClusterStopParams + params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Stop::Type; + using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8090,60 +8146,123 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; } -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalStateClusterStartParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; +} - using RequestType = OperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; } -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTROperationalStateClusterResumeParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; +} - using RequestType = OperationalState::Commands::Resume::Type; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterMicrowaveOvenMode + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterMicrowaveOvenControl + +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8152,83 +8271,105 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCOperationalState +@implementation MTRClusterOperationalState -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterPauseParams + params = [[MTROperationalStateClusterPauseParams alloc] init]; } @@ -8238,7 +8379,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Pause::Type; + using RequestType = OperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8247,19 +8388,19 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStopParams + params = [[MTROperationalStateClusterStopParams alloc] init]; } @@ -8269,7 +8410,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Stop::Type; + using RequestType = OperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8278,19 +8419,19 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStartParams + params = [[MTROperationalStateClusterStartParams alloc] init]; } @@ -8300,7 +8441,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Start::Type; + using RequestType = OperationalState::Commands::Start::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8309,19 +8450,19 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterResumeParams + params = [[MTROperationalStateClusterResumeParams alloc] init]; } @@ -8331,7 +8472,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Resume::Type; + using RequestType = OperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8340,93 +8481,93 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterHEPAFilterMonitoring +@implementation MTRClusterRVCOperationalState -- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self resetConditionWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRHEPAFilterMonitoringClusterResetConditionParams + params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; + using RequestType = RvcOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8435,34 +8576,222 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; -} + if (params == nil) { + params = [[MTRRVCOperationalStateClusterStopParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; + [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterStartParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterHEPAFilterMonitoring + +- (void)resetConditionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self resetConditionWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRHEPAFilterMonitoringClusterResetConditionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; } - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -8619,12 +8948,12 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d @end -@implementation MTRClusterDoorLock +@implementation MTRClusterBooleanStateConfiguration -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterLockDoorParams + params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -8633,11 +8962,8 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::LockDoor::Type; + using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8651,10 +8977,10 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:responseHandler]; } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterUnlockDoorParams + params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; } @@ -8663,11 +8989,8 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::UnlockDoor::Type; + using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8681,10 +9004,95 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par completion:responseHandler]; } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) params:params]; +} + +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeCurrentSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterValveConfigurationAndControl + +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterUnlockWithTimeoutParams + params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; } @@ -8693,11 +9101,8 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; + using RequestType = ValveConfigurationAndControl::Commands::Open::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8711,10 +9116,14 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * completion:responseHandler]; } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)closeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRDoorLockClusterSetWeekDayScheduleParams + [self closeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; } @@ -8724,7 +9133,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; + using RequestType = ValveConfigurationAndControl::Commands::Close::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8738,20 +9147,185 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams completion:responseHandler]; } -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeOpenDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultOpenDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) params:params]; +} + +- (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultOpenDurationWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDefaultOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenDurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAutoCloseTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRemainingDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTargetStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTargetLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultOpenLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) params:params]; +} + +- (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultOpenLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeDefaultOpenLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeValveFaultWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterElectricalEnergyMeasurement + +- (NSDictionary * _Nullable)readAttributeAccuracyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAccuracyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCumulativeEnergyImportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyImportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCumulativeEnergyExportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyExportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePeriodicEnergyImportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyImportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePeriodicEnergyExportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributePeriodicEnergyExportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterDemandResponseLoadControl + +- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterGetWeekDayScheduleParams + params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; + using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8760,15 +9334,15 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterClearWeekDayScheduleParams + params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; } @@ -8778,7 +9352,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; + using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8792,10 +9366,10 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa completion:responseHandler]; } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterSetYearDayScheduleParams + params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; } @@ -8805,7 +9379,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; + using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8819,20 +9393,20 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams completion:responseHandler]; } -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterGetYearDayScheduleParams + params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; + using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8841,15 +9415,19 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)clearLoadControlEventsRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self clearLoadControlEventsRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterClearYearDayScheduleParams + params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; } @@ -8859,7 +9437,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; + using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8873,10 +9451,106 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa completion:responseHandler]; } -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActiveEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfEventsPerProgramWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfTransitionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultRandomStartWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) params:params]; +} + +- (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultRandomStartWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultRandomDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID) params:params]; +} + +- (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultRandomDurationWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterDeviceEnergyManagement + +- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterSetHolidayScheduleParams + params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; } @@ -8886,7 +9560,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; + using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8900,20 +9574,24 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams completion:responseHandler]; } -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)cancelPowerAdjustRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self cancelPowerAdjustRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterGetHolidayScheduleParams + params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; + using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8922,15 +9600,15 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterClearHolidayScheduleParams + params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; } @@ -8940,7 +9618,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; + using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8954,10 +9632,10 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa completion:responseHandler]; } -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterSetUserParams + params = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; } @@ -8966,11 +9644,8 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValu }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::SetUser::Type; + using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8984,20 +9659,24 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValu completion:responseHandler]; } -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self resumeRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterGetUserParams + params = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DoorLock::Commands::GetUser::Type; + using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9006,15 +9685,15 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValu expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetUserResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterClearUserParams + params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; } @@ -9023,11 +9702,8 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expected }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::ClearUser::Type; + using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9041,23 +9717,20 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expected completion:responseHandler]; } -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterSetCredentialParams + params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = DoorLock::Commands::SetCredential::Type; + using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9066,25 +9739,101 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterSetCredentialResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeESATypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESATypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeESACanGenerateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESACanGenerateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeESAStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeESAStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAbsMinPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMinPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAbsMaxPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAbsMaxPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerAdjustmentCapabilityWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributePowerAdjustmentCapabilityID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeForecastWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeForecastID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterEnergyEVSE + +- (void)disableWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self disableWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterGetCredentialStatusParams + params = [[MTREnergyEVSEClusterDisableParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = DoorLock::Commands::GetCredentialStatus::Type; + using RequestType = EnergyEvse::Commands::Disable::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9093,15 +9842,15 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterClearCredentialParams + params = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; } @@ -9114,7 +9863,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); } - using RequestType = DoorLock::Commands::ClearCredential::Type; + using RequestType = EnergyEvse::Commands::EnableCharging::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9128,10 +9877,10 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par completion:responseHandler]; } -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDoorLockClusterUnboltDoorParams + params = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; } @@ -9144,7 +9893,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); } - using RequestType = DoorLock::Commands::UnboltDoor::Type; + using RequestType = EnergyEvse::Commands::EnableDischarging::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9158,192 +9907,1049 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params +- (void)startDiagnosticsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; + [self startDiagnosticsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params +- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; -} + if (params == nil) { + params = [[MTREnergyEVSEClusterStartDiagnosticsParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params +- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; + if (params == nil) { + params = [[MTREnergyEVSEClusterSetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::SetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; + if (params == nil) { + params = [[MTREnergyEVSEClusterGetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::GetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTREnergyEVSEClusterGetTargetsResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)clearTargetsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self writeAttributeDoorOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self clearTargetsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + if (params == nil) { + params = [[MTREnergyEVSEClusterClearTargetsParams + alloc] init]; + } - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::ClearTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateID) params:params]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeSupplyStateWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeDoorClosedEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSupplyStateID) params:params]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeFaultStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFaultStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeChargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeChargingEnabledUntilID) params:params]; } -- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeDischargingEnabledUntilWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeDischargingEnabledUntilID) params:params]; } -- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeCircuitCapacityWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeCircuitCapacityID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinimumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMinimumChargeCurrentID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumChargeCurrentID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaximumDischargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeUserMaximumChargeCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; + [self writeAttributeUserMaximumChargeCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeRandomizationDelayWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; + [self writeAttributeRandomizationDelayWindowWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNextChargeTargetTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID) params:params]; } -- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeNextChargeRequiredEnergyWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeLanguageWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID) params:params]; } -- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeNextChargeTargetSoCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetSoCID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeApproximateEVEfficiencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeApproximateEVEfficiencyID) params:params]; } -- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeLEDSettingsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeApproximateEVEfficiencyWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeApproximateEVEfficiencyID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStateOfChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeStateOfChargeID) params:params]; } -- (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeBatteryCapacityWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeAutoRelockTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeBatteryCapacityID) params:params]; } -- (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeVehicleIDWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeVehicleIDID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSessionIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionIDID) params:params]; } -- (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeSessionDurationWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeSoundVolumeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionDurationID) params:params]; } -- (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeSessionEnergyChargedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyChargedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSessionEnergyDischargedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyDischargedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterDoorLock + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterLockDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::LockDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnlockDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnlockDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnlockWithTimeoutParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearWeekDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearYearDayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetUserResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearUser::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterSetCredentialResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetCredentialStatusParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetCredentialStatus::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnboltDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnboltDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; +} + +- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDoorOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; +} + +- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDoorClosedEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; +} + +- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; +} + +- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLanguageWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; +} + +- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLEDSettingsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; +} + +- (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAutoRelockTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; +} + +- (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSoundVolumeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; @@ -13147,1244 +14753,1891 @@ @implementation MTRClusterRelativeHumidityMeasurement - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterRelativeHumidityMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterOccupancySensing + +- (NSDictionary * _Nullable)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; +} + +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; +} + +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; +} + +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; +} + +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; +} + +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRelativeHumidityMeasurement (Deprecated) +@implementation MTRClusterOccupancySensing (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -@end - -@implementation MTRClusterOccupancySensing - -- (NSDictionary * _Nullable)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; + return [self readAttributePIROccupiedToUnoccupiedDelayWithParams:params]; } - -- (NSDictionary * _Nullable)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; } - -- (NSDictionary * _Nullable)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; } - -- (NSDictionary * _Nullable)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; + return [self readAttributePIRUnoccupiedToOccupiedDelayWithParams:params]; } - -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; } - -- (NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; + return [self readAttributePIRUnoccupiedToOccupiedThresholdWithParams:params]; } - -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; } +@end -- (NSDictionary * _Nullable)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +@implementation MTRClusterCarbonMonoxideConcentrationMeasurement + +- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } -- (NSDictionary * _Nullable)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +@end + +@implementation MTRClusterCarbonDioxideConcentrationMeasurement + +- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } -- (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } -- (NSDictionary * _Nullable)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOccupancySensing (Deprecated) +@implementation MTRClusterNitrogenDioxideConcentrationMeasurement -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; } -- (NSDictionary *)readAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self readAttributePIROccupiedToUnoccupiedDelayWithParams:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; } -- (NSDictionary *)readAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self readAttributePIRUnoccupiedToOccupiedDelayWithParams:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; } -- (NSDictionary *)readAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self readAttributePIRUnoccupiedToOccupiedThresholdWithParams:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; } + @end -@implementation MTRClusterCarbonMonoxideConcentrationMeasurement +@implementation MTRClusterOzoneConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterCarbonDioxideConcentrationMeasurement +@implementation MTRClusterPM25ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterNitrogenDioxideConcentrationMeasurement +@implementation MTRClusterFormaldehydeConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOzoneConcentrationMeasurement +@implementation MTRClusterPM1ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterPM25ConcentrationMeasurement +@implementation MTRClusterPM10ConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterFormaldehydeConcentrationMeasurement +@implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterPM1ConcentrationMeasurement +@implementation MTRClusterRadonConcentrationMeasurement - (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; } - (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; } - (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; } - (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterPM10ConcentrationMeasurement +@implementation MTRClusterWakeOnLAN -- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeLinkLocalAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeLinkLocalAddressID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +@end +@implementation MTRClusterWakeOnLan +@end + +@implementation MTRClusterWakeOnLan (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterChannel + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterChangeChannelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::ChangeChannel::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRChannelClusterChangeChannelResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterChangeChannelByNumberParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::ChangeChannelByNumber::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterSkipChannelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::SkipChannel::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterGetProgramGuideParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::GetProgramGuide::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRChannelClusterProgramGuideResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::RecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; + if (params == nil) { + params = [[MTRChannelClusterCancelRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::CancelRecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; } -@end +- (NSDictionary * _Nullable)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; +} -@implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; +} -- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; } -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; } -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterChannel (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + [self changeChannelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) params:params]; + [self changeChannelByNumberWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self skipChannelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } +@end -- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +@implementation MTRClusterTargetNavigator + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + if (params == nil) { + params = [[MTRTargetNavigatorClusterNavigateTargetParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TargetNavigator::Commands::NavigateTarget::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRTargetNavigatorClusterNavigateTargetResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRadonConcentrationMeasurement +@implementation MTRClusterTargetNavigator (Deprecated) -- (NSDictionary * _Nullable)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (NSDictionary * _Nullable)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; + [self navigateTargetWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } +@end -- (NSDictionary * _Nullable)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params +@implementation MTRClusterMediaPlayback + +- (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; + [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; + if (params == nil) { + params = [[MTRMediaPlaybackClusterPlayParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Play::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; + if (params == nil) { + params = [[MTRMediaPlaybackClusterPauseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; + if (params == nil) { + params = [[MTRMediaPlaybackClusterStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params +- (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; + [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterStartOverParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::StartOver::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; + [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterPreviousParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Previous::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params +- (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; + [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterNextParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; + using RequestType = MediaPlayback::Commands::Next::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; + if (params == nil) { + params = [[MTRMediaPlaybackClusterRewindParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Rewind::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterFastForwardParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRClusterWakeOnLAN + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; + using RequestType = MediaPlayback::Commands::FastForward::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeLinkLocalAddressWithParams:(MTRReadParams * _Nullable)params +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeLinkLocalAddressID) params:params]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSkipForwardParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; + using RequestType = MediaPlayback::Commands::SkipForward::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSkipBackwardParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::SkipBackward::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSeekParams + alloc] init]; + } -@end -@implementation MTRClusterWakeOnLan -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRClusterWakeOnLan (Deprecated) + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using RequestType = MediaPlayback::Commands::Seek::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -@end - -@implementation MTRClusterChannel - -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRChannelClusterChangeChannelParams + params = [[MTRMediaPlaybackClusterActivateAudioTrackParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Channel::Commands::ChangeChannel::Type; + using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14393,15 +16646,15 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params e expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRChannelClusterChangeChannelResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRChannelClusterChangeChannelByNumberParams + params = [[MTRMediaPlaybackClusterActivateTextTrackParams alloc] init]; } @@ -14411,7 +16664,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Channel::Commands::ChangeChannelByNumber::Type; + using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14425,10 +16678,14 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP completion:responseHandler]; } -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)deactivateTextTrackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self deactivateTextTrackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRChannelClusterSkipChannelParams + params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams alloc] init]; } @@ -14438,264 +16695,244 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expec auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Channel::Commands::SkipChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActiveAudioTrackWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveAudioTrackID) params:params]; } -- (NSDictionary * _Nullable)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAvailableAudioTracksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableAudioTracksID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeActiveTextTrackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeActiveTextTrackID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAvailableTextTracksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableTextTracksID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterChannel (Deprecated) +@implementation MTRClusterMediaPlayback (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self changeChannelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self changeChannelByNumberWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self skipChannelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self playWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -@end - -@implementation MTRClusterTargetNavigator - -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)playWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - if (params == nil) { - params = [[MTRTargetNavigatorClusterNavigateTargetParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = TargetNavigator::Commands::NavigateTarget::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTargetNavigatorClusterNavigateTargetResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; + [self pauseWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (NSDictionary * _Nullable)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params +- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; + [self stopWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)stopPlaybackWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; + [self stopPlaybackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; + [self startOverWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)startOverWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; + [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; + [self previousWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)previousWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; + [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } - -@end - -@implementation MTRClusterTargetNavigator (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self nextWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)nextWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self navigateTargetWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } -@end - -@implementation MTRClusterMediaPlayback - -- (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self rewindWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - if (params == nil) { - params = [[MTRMediaPlaybackClusterPlayParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Play::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self fastForwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self skipForwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - if (params == nil) { - params = [[MTRMediaPlaybackClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self skipBackwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self seekWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +@end + +@implementation MTRClusterMediaInput + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterStopParams + params = [[MTRMediaInputClusterSelectInputParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::Stop::Type; + using RequestType = MediaInput::Commands::SelectInput::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14704,29 +16941,29 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params exp expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterStartOverParams + params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::StartOver::Type; + using RequestType = MediaInput::Commands::ShowInputStatus::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14735,29 +16972,29 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterPreviousParams + params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::Previous::Type; + using RequestType = MediaInput::Commands::HideInputStatus::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14766,29 +17003,25 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterNextParams + params = [[MTRMediaInputClusterRenameInputParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::Next::Type; + using RequestType = MediaInput::Commands::RenameInput::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14797,60 +17030,110 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params exp expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)rewindWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { - [self rewindWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; } -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (NSDictionary * _Nullable)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRMediaPlaybackClusterRewindParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; +} - using RequestType = MediaPlayback::Commands::Rewind::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; } -- (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - [self fastForwardWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; } -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterMediaInput (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectInputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)showInputStatusWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)hideInputStatusWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +} +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameInputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +@end + +@implementation MTRClusterLowPower + +- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterFastForwardParams + params = [[MTRLowPowerClusterSleepParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::FastForward::Type; + using RequestType = LowPower::Commands::Sleep::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14859,15 +17142,67 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterLowPower (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)sleepWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +} +@end + +@implementation MTRClusterKeypadInput + +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterSkipForwardParams + params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; } @@ -14877,7 +17212,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::SkipForward::Type; + using RequestType = KeypadInput::Commands::SendKey::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14886,15 +17221,66 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:MTRKeypadInputClusterSendKeyResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterKeypadInput (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self sendKeyWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +@end + +@implementation MTRClusterContentLauncher + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterSkipBackwardParams + params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; } @@ -14904,7 +17290,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::SkipBackward::Type; + using RequestType = ContentLauncher::Commands::LaunchContent::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14913,15 +17299,15 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:MTRContentLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaPlaybackClusterSeekParams + params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; } @@ -14931,7 +17317,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValue auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::Seek::Type; + using RequestType = ContentLauncher::Commands::LaunchURL::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -14940,223 +17326,222 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValue expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + responseClass:MTRContentLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; } -- (NSDictionary * _Nullable)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; + [self writeAttributeSupportedStreamingProtocolsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterMediaPlayback (Deprecated) +@implementation MTRClusterContentLauncher (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self playWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)playWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self pauseWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self stopWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)stopPlaybackWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self stopPlaybackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + [self launchContentWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self startOverWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + [self launchURLWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); + completionHandler(static_cast(data), error); }]; } -- (void)startOverWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +@end + +@implementation MTRClusterAudioOutput + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + if (params == nil) { + params = [[MTRAudioOutputClusterSelectOutputParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = AudioOutput::Commands::SelectOutput::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self previousWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + if (params == nil) { + params = [[MTRAudioOutputClusterRenameOutputParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = AudioOutput::Commands::RenameOutput::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)previousWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { - [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; } -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { - [self nextWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; } -- (void)nextWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; } -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self rewindWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; } -- (void)rewindWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - [self rewindWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; } -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - [self fastForwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; } -- (void)fastForwardWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - [self fastForwardWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; } -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - [self skipForwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; } -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +@end + +@implementation MTRClusterAudioOutput (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - [self skipBackwardWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectOutputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self seekWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self renameOutputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } @end -@implementation MTRClusterMediaInput +@implementation MTRClusterApplicationLauncher -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaInputClusterSelectInputParams + params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaInput::Commands::SelectInput::Type; + using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15165,29 +17550,25 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params ex expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaInputClusterShowInputStatusParams + params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaInput::Commands::ShowInputStatus::Type; + using RequestType = ApplicationLauncher::Commands::StopApp::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15196,29 +17577,25 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMediaInputClusterHideInputStatusParams + params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaInput::Commands::HideInputStatus::Type; + using RequestType = ApplicationLauncher::Commands::HideApp::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15227,216 +17604,259 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRMediaInputClusterRenameInputParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaInput::Commands::RenameInput::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; + [self writeAttributeCurrentAppWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterMediaInput (Deprecated) +@implementation MTRClusterApplicationLauncher (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self selectInputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self launchAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self showInputStatusWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self stopAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)showInputStatusWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + [self hideAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +@end + +@implementation MTRClusterApplicationBasic + +- (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - [self hideInputStatusWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; } -- (void)hideInputStatusWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler + +- (NSDictionary * _Nullable)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler + +- (NSDictionary * _Nullable)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { - [self renameInputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; } -@end -@implementation MTRClusterLowPower - -- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; } -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + +- (NSDictionary * _Nullable)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRLowPowerClusterSleepParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (NSDictionary * _Nullable)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; +} - using RequestType = LowPower::Commands::Sleep::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - 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)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterLowPower (Deprecated) +@implementation MTRClusterApplicationBasic (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self sleepWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)sleepWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +@end + +@implementation MTRClusterAccountLogin + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRAccountLoginClusterGetSetupPINParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::GetSetupPIN::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAccountLoginClusterLoginParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::Login::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -@end - -@implementation MTRClusterKeypadInput -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRKeypadInputClusterSendKeyParams + params = [[MTRAccountLoginClusterLogoutParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = KeypadInput::Commands::SendKey::Type; + using RequestType = AccountLogin::Commands::Logout::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15445,76 +17865,86 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedV expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRKeypadInputClusterSendKeyResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterKeypadInput (Deprecated) +@implementation MTRClusterAccountLogin (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self sendKeyWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self getSetupPINWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self loginWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self logoutWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } @end -@implementation MTRClusterContentLauncher +@implementation MTRClusterContentControl -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRContentLauncherClusterLaunchContentParams + params = [[MTRContentControlClusterUpdatePINParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ContentLauncher::Commands::LaunchContent::Type; + using RequestType = ContentControl::Commands::UpdatePIN::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15523,15 +17953,19 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetPINWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resetPINWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRContentLauncherClusterLaunchURLParams + params = [[MTRContentControlClusterResetPINParams alloc] init]; } @@ -15541,7 +17975,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ContentLauncher::Commands::LaunchURL::Type; + using RequestType = ContentControl::Commands::ResetPIN::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15550,95 +17984,50 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params e expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class + responseClass:MTRContentControlClusterResetPINResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; -} - -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)enableWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; + [self enableWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; -} + if (params == nil) { + params = [[MTRContentControlClusterEnableParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -@implementation MTRClusterContentLauncher (Deprecated) + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using RequestType = ContentControl::Commands::Enable::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self launchContentWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)disableWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self launchURLWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self disableWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -@end - -@implementation MTRClusterAudioOutput - -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRAudioOutputClusterSelectOutputParams + params = [[MTRContentControlClusterDisableParams alloc] init]; } @@ -15648,7 +18037,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = AudioOutput::Commands::SelectOutput::Type; + using RequestType = ContentControl::Commands::Disable::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15662,10 +18051,10 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:responseHandler]; } -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRAudioOutputClusterRenameOutputParams + params = [[MTRContentControlClusterAddBonusTimeParams alloc] init]; } @@ -15675,7 +18064,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = AudioOutput::Commands::RenameOutput::Type; + using RequestType = ContentControl::Commands::AddBonusTime::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15689,83 +18078,82 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; -} + if (params == nil) { + params = [[MTRContentControlClusterSetScreenDailyTimeParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; + using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)blockUnratedContentWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; + [self blockUnratedContentWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; -} - -@end + if (params == nil) { + params = [[MTRContentControlClusterBlockUnratedContentParams + alloc] init]; + } -@implementation MTRClusterAudioOutput (Deprecated) + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self selectOutputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + using RequestType = ContentControl::Commands::BlockUnratedContent::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + 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)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler + +- (void)unblockUnratedContentWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self renameOutputWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self unblockUnratedContentWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -@end - -@implementation MTRClusterApplicationLauncher - -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRApplicationLauncherClusterLaunchAppParams + params = [[MTRContentControlClusterUnblockUnratedContentParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; + using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15774,25 +18162,25 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRApplicationLauncherClusterStopAppParams + params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ApplicationLauncher::Commands::StopApp::Type; + using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15801,25 +18189,25 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRApplicationLauncherClusterHideAppParams + params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ApplicationLauncher::Commands::HideApp::Type; + using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -15828,186 +18216,89 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; -} - -- (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeCurrentAppWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterApplicationLauncher (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self launchAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self stopAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self hideAppWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -@end - -@implementation MTRClusterApplicationBasic - -- (NSDictionary * _Nullable)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEnabledID) params:params]; } -- (NSDictionary * _Nullable)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnDemandRatingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnDemandRatingThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeOnDemandRatingThresholdID) params:params]; } -- (NSDictionary * _Nullable)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeScheduledContentRatingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeScheduledContentRatingThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScheduledContentRatingThresholdID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeScreenDailyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeScreenDailyTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeRemainingScreenTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeRemainingScreenTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeBlockUnratedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterApplicationBasic (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterAccountLogin +@implementation MTRClusterContentAppObserver -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAccountLoginClusterGetSetupPINParams + params = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; } @@ -16016,75 +18307,8 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AccountLogin::Commands::GetSetupPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAccountLoginClusterLoginParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AccountLogin::Commands::Login::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - 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)logoutWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self logoutWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAccountLoginClusterLogoutParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = AccountLogin::Commands::Logout::Type; + using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -16093,72 +18317,41 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRContentAppObserverClusterContentAppMessageResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterAccountLogin (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID) params:params]; } -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getSetupPINWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self loginWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self logoutWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)logoutWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self logoutWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} @end @implementation MTRClusterElectricalMeasurement diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 0c1563ff949b36..a59c89efbeacd1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -3344,9 +3344,9 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull systemTimeUs MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull systemTimeMs MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable utcTimeUs MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable posixTimeMs MTR_PROVISIONALLY_AVAILABLE; /** * Initialize an MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams with a response-value dictionary @@ -4490,7 +4490,172 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterPauseParams : NSObject +@interface MTRICDManagementClusterStayActiveResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterSetTimerParams : NSObject + +@property (nonatomic, copy, getter=getNewTime) NSNumber * _Nonnull newTime 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 MTRTimerClusterResetTimerParams : 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_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterAddTimeParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull additionalTime 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 MTRTimerClusterReduceTimeParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull timeReduction 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 MTROvenCavityOperationalStateClusterPauseParams : 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_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4518,7 +4683,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterStopParams : NSObject +@interface MTROvenCavityOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4546,7 +4711,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterStartParams : NSObject +@interface MTROvenCavityOperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4574,7 +4739,28 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterResumeParams : NSObject +@interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject + +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTROvenCavityOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4602,12 +4788,14 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterOperationalCommandResponseParams : NSObject +@interface MTROvenModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) MTROvenOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTROvenOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary + * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -4752,10 +4940,10 @@ MTR_PROVISIONALLY_AVAILABLE error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCRunModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4782,12 +4970,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCRunModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTRRVCRunModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4800,13 +4988,13 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCCleanModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4833,12 +5021,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCCleanModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable statusText MTR_NEWLY_AVAILABLE; /** * Initialize an MTRRVCCleanModeClusterChangeToModeResponseParams with a response-value dictionary @@ -4851,7 +5039,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -5089,7 +5277,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5117,7 +5305,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5145,7 +5333,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5173,7 +5361,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5201,10 +5389,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_NEWLY_AVAILABLE; /** * Initialize an MTROperationalStateClusterOperationalCommandResponseParams with a response-value dictionary @@ -5217,10 +5405,10 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5304,7 +5492,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). @@ -5332,10 +5520,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_NEWLY_AVAILABLE; /** * Initialize an MTRRVCOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary @@ -5348,7 +5536,7 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -5407,10 +5595,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterLockDoorParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanStateConfigurationClusterSuppressAlarmParams : NSObject -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull alarmsToSuppress MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5437,10 +5625,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterUnlockDoorParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanStateConfigurationClusterEnableDisableAlarmParams : NSObject -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull alarmsToEnableDisable MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5467,12 +5655,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterOpenParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable openDuration MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable targetLevel MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5499,22 +5687,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull daysMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull startHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull startMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull endHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull endMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterCloseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5541,12 +5715,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterLoadControlProgramStruct * _Nonnull loadControlProgram MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5573,24 +5745,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable daysMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable startHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable startMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable endHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable endMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull loadControlProgramID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5605,11 +5763,1195 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRDoorLockClusterGetWeekDayScheduleResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * 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 MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams : NSObject + +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterLoadControlEventStruct * _Nonnull event 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 MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull eventID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull cancelControl 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 MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams : 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_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterPowerAdjustRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull power MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull duration 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 MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams : 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_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull requestedStartTime 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 MTRDeviceEnergyManagementClusterPauseRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull duration 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 MTRDeviceEnergyManagementClusterResumeRequestParams : 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_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterModifyForecastRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull forecastId MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull slotAdjustments 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 MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull constraints 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 MTREnergyEVSEClusterGetTargetsResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTREnergyEVSEClusterGetTargetsResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterDisableParams : 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_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterEnableChargingParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nullable chargingEnabledUntil MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull minimumChargeCurrent MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull maximumChargeCurrent 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 MTREnergyEVSEClusterEnableDischargingParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nullable dischargingEnabledUntil MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull maximumDischargeCurrent 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 MTREnergyEVSEClusterStartDiagnosticsParams : 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_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterSetTargetsParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull chargingTargets 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 MTREnergyEVSEClusterGetTargetsParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn 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 MTREnergyEVSEClusterClearTargetsParams : 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterLockDoorParams : NSObject + +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterUnlockDoorParams : NSObject + +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull timeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull daysMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull startHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull startMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull endHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull endMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable daysMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable startHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable startMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable endHour MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable endMinute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRDoorLockClusterGetWeekDayScheduleResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRDoorLockClusterGetYearDayScheduleResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull operatingMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable operatingMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRDoorLockClusterGetHolidayScheduleResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterSetUserParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull operationType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable userName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userUniqueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable credentialRule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 + +@interface MTRDoorLockClusterSetUserParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId MTR_DEPRECATED("Please use userUniqueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetUserParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetUserResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable userName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userUniqueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable credentialRule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSArray * _Nullable credentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable nextUserIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRDoorLockClusterGetUserResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not * a command data response or is not the right command response. @@ -5621,10 +6963,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterGetUserResponseParams (Deprecated) -@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId MTR_DEPRECATED("Please use userUniqueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterClearUserParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -5654,15 +6999,19 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetCredentialParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull operationType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nonnull credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull credentialData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5690,11 +7039,47 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRDoorLockClusterSetCredentialResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject + +@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nonnull credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5722,17 +7107,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull credentialExists MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5750,7 +7135,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTRDoorLockClusterGetYearDayScheduleResponseParams with a response-value dictionary + * Initialize an MTRDoorLockClusterGetCredentialStatusResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -5764,11 +7149,39 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterClearCredentialParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nullable credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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; -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 MTRDoorLockClusterUnboltDoorParams : NSObject + +@property (nonatomic, copy) NSData * _Nullable pinCode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5796,15 +7209,63 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject +@interface MTRWindowCoveringClusterUpOrOpenParams : 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; -@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 -@property (nonatomic, copy) NSNumber * _Nonnull localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRWindowCoveringClusterDownOrCloseParams : 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; -@property (nonatomic, copy) NSNumber * _Nonnull localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 -@property (nonatomic, copy) NSNumber * _Nonnull operatingMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRWindowCoveringClusterStopMotionParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5832,9 +7293,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull liftValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5862,17 +7323,69 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull liftPercent100thsValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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; -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 -@property (nonatomic, copy) NSNumber * _Nullable localStartTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable localEndTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull tiltValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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; -@property (nonatomic, copy) NSNumber * _Nullable operatingMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull tiltPercent100thsValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5887,26 +7400,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRDoorLockClusterGetHolidayScheduleResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject +@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull percentOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5934,21 +7443,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetUserParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull operationType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nullable userName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userUniqueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable credentialRule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5975,15 +7470,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRDoorLockClusterSetUserParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nullable userUniqueId MTR_DEPRECATED("Please use userUniqueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetUserParams : NSObject +@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull amount MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6011,27 +7503,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetUserResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nullable userName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userUniqueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable credentialRule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject -@property (nonatomic, copy) NSArray * _Nullable credentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable nextUserIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6049,7 +7529,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTRDoorLockClusterGetUserResponseParams with a response-value dictionary + * Initialize an MTRThermostatClusterGetWeeklyScheduleResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -6062,15 +7542,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -@interface MTRDoorLockClusterGetUserResponseParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable userUniqueId MTR_DEPRECATED("Please use userUniqueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterClearUserParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6098,19 +7579,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetCredentialParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull operationType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nonnull credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nonnull credentialData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable userStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable userType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull modeToReturn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6138,13 +7611,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6159,26 +7626,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRDoorLockClusterSetCredentialResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRFanControlClusterStepParams : NSObject -@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nonnull credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable wrap MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable lowestOff MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6206,51 +7673,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull credentialExists MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable userIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRColorControlClusterMoveToHueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull hue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Initialize an MTRDoorLockClusterGetCredentialStatusResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDoorLockClusterClearCredentialParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) MTRDoorLockClusterCredentialStruct * _Nullable credential MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6277,10 +7710,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRDoorLockClusterUnboltDoorParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRColorControlClusterMoveHueParams : NSObject -@property (nonatomic, copy) NSData * _Nullable pinCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6308,7 +7747,17 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterUpOrOpenParams : NSObject +@interface MTRColorControlClusterStepHueParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6336,7 +7785,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterDownOrCloseParams : NSObject +@interface MTRColorControlClusterMoveToSaturationParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6364,7 +7821,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterStopMotionParams : NSObject +@interface MTRColorControlClusterMoveSaturationParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6392,9 +7857,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject +@interface MTRColorControlClusterStepSaturationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull liftValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6422,9 +7895,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject +@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull liftPercent100thsValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull hue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6452,9 +7933,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject +@interface MTRColorControlClusterMoveToColorParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull tiltValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull colorX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull colorY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6482,9 +7971,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject +@interface MTRColorControlClusterMoveColorParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull tiltPercent100thsValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull rateX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull rateY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6511,10 +8006,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRColorControlClusterStepColorParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull stepX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull stepY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull percentOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6542,7 +8045,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject +@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMireds MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6569,12 +8080,23 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +@interface MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature MTR_DEPRECATED("Please use colorTemperatureMireds", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull amount MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6602,15 +8124,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject +@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6625,32 +8147,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRThermostatClusterGetWeeklyScheduleResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject +@interface MTRColorControlClusterEnhancedStepHueParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6678,11 +8198,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull modeToReturn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6710,7 +8236,21 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject +@interface MTRColorControlClusterColorLoopSetParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull updateFlags MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull action MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull time MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull startHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6737,14 +8277,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRFanControlClusterStepParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRColorControlClusterStopMoveStepParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable wrap MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable lowestOff MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6772,13 +8310,15 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveToHueParams : NSObject +@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull hue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6810,11 +8350,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveHueParams : NSObject +@interface MTRColorControlClusterStepColorTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6846,17 +8392,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterStepHueParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRChannelClusterChangeChannelParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull match MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6884,15 +8422,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveToSaturationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRChannelClusterChangeChannelResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6907,28 +8441,28 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRChannelClusterChangeChannelResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveSaturationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRChannelClusterChangeChannelByNumberParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6956,17 +8490,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterStepSaturationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRChannelClusterSkipChannelParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6993,18 +8519,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterGetProgramGuideParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull hue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable startTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable endTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nullable channelList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRChannelClusterPageTokenStruct * _Nullable pageToken MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable recordingFlag MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nullable externalIDList MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7031,18 +8561,37 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveToColorParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterProgramGuideResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull colorX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull channelPagingStruct MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull colorY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nonnull programList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * Initialize an MTRChannelClusterProgramGuideResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterRecordProgramParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull programIdentifier MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull shouldRecordSeries MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull externalIDList MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7069,16 +8618,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveColorParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterCancelRecordProgramParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull rateX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull programIdentifier MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull rateY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull shouldRecordSeries MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nonnull externalIDList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7106,17 +8655,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterStepColorParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepX MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull target MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7144,15 +8687,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMireds MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7167,35 +8706,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRTargetNavigatorClusterNavigateTargetResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -@interface MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature MTR_DEPRECATED("Please use colorTemperatureMireds", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterPlayParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7223,15 +8751,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7258,18 +8778,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterEnhancedStepHueParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTRMediaPlaybackClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7296,18 +8806,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull saturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_DEPRECATED("Please use MTRMediaPlaybackClusterStopParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRMediaPlaybackClusterStopPlaybackParams : MTRMediaPlaybackClusterStopParams /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7335,21 +8835,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterColorLoopSetParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull updateFlags MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull action MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull direction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull time MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull startHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterStartOverParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7377,11 +8863,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterStopMoveStepParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterPreviousParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7409,19 +8891,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterNextParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7449,21 +8919,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRColorControlClusterStepColorTemperatureParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterRewindParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable audioAdvanceUnmuted MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7491,9 +8949,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRChannelClusterChangeChannelParams : NSObject +@interface MTRMediaPlaybackClusterFastForwardParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull match MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable audioAdvanceUnmuted MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7521,11 +8979,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRChannelClusterChangeChannelResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7540,28 +8996,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRChannelClusterChangeChannelResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRChannelClusterChangeChannelByNumberParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull majorNumber MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull minorNumber MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7589,9 +9039,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRChannelClusterSkipChannelParams : NSObject +@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject -@property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7606,24 +9058,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRMediaPlaybackClusterPlaybackResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull target MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRMediaPlaybackClusterSeekParams : NSObject -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull position MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7650,12 +9104,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterActivateAudioTrackParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull trackID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7670,24 +9124,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRTargetNavigatorClusterNavigateTargetResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterPlayParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterActivateTextTrackParams : NSObject + +@property (nonatomic, copy) NSString * _Nonnull trackID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7714,8 +9166,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterPauseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterDeactivateTextTrackParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7742,8 +9194,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRMediaPlaybackClusterStopParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRMediaInputClusterSelectInputParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7770,8 +9224,8 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_DEPRECATED("Please use MTRMediaPlaybackClusterStopParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRMediaPlaybackClusterStopPlaybackParams : MTRMediaPlaybackClusterStopParams +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRMediaInputClusterShowInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7799,7 +9253,7 @@ MTR_DEPRECATED("Please use MTRMediaPlaybackClusterStopParams", ios(16.1, 16.4), @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterStartOverParams : NSObject +@interface MTRMediaInputClusterHideInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7827,7 +9281,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterPreviousParams : NSObject +@interface MTRMediaInputClusterRenameInputParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nonnull name MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7855,7 +9313,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterNextParams : NSObject +@interface MTRLowPowerClusterSleepParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7883,7 +9341,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterRewindParams : NSObject +@interface MTRKeypadInputClusterSendKeyParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull keyCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7911,7 +9371,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterFastForwardParams : NSObject +@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7926,22 +9388,34 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRKeypadInputClusterSendKeyResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject +@interface MTRContentLauncherClusterLaunchContentParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRContentLauncherClusterContentSearchStruct * _Nonnull search MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull autoPlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) MTRContentLauncherClusterPlaybackPreferencesStruct * _Nullable playbackPreferences MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable useCurrentContext MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7969,9 +9443,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject +@interface MTRContentLauncherClusterLaunchURLParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull contentURL MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable displayString MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) MTRContentLauncherClusterBrandingInformationStruct * _Nullable brandingInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7998,12 +9476,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTRContentLauncherClusterLauncherResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8021,7 +9499,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTRMediaPlaybackClusterPlaybackResponseParams with a response-value dictionary + * Initialize an MTRContentLauncherClusterLauncherResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -8034,10 +9512,33 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end +MTR_DEPRECATED("Please use MTRContentLauncherClusterLauncherResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRContentLauncherClusterLaunchResponseParams : MTRContentLauncherClusterLauncherResponseParams + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_DEPRECATED("The status field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSString * _Nullable data MTR_DEPRECATED("The data field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +/** + * 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 MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterSeekParams : NSObject +@interface MTRAudioOutputClusterSelectOutputParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull position MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8065,9 +9566,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaInputClusterSelectInputParams : NSObject +@interface MTRAudioOutputClusterRenameOutputParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nonnull name MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8095,7 +9598,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaInputClusterShowInputStatusParams : NSObject +@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject + +@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8123,7 +9630,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaInputClusterHideInputStatusParams : NSObject +@interface MTRApplicationLauncherClusterStopAppParams : NSObject + +@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8151,11 +9660,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaInputClusterRenameInputParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRApplicationLauncherClusterHideAppParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull name MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8183,7 +9690,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLowPowerClusterSleepParams : NSObject +@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8198,22 +9709,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRApplicationLauncherClusterLauncherResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRKeypadInputClusterSendKeyParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull keyCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8241,9 +9756,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8261,7 +9776,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTRKeypadInputClusterSendKeyResponseParams with a response-value dictionary + * Initialize an MTRAccountLoginClusterGetSetupPINResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -8275,13 +9790,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRContentLauncherClusterLaunchContentParams : NSObject +@interface MTRAccountLoginClusterLoginParams : NSObject -@property (nonatomic, copy) MTRContentLauncherClusterContentSearchStruct * _Nonnull search MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull autoPlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable node MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8309,13 +9824,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRContentLauncherClusterLaunchURLParams : NSObject - -@property (nonatomic, copy) NSString * _Nonnull contentURL MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nullable displayString MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRAccountLoginClusterLogoutParams : NSObject -@property (nonatomic, copy) MTRContentLauncherClusterBrandingInformationStruct * _Nullable brandingInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable node MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8342,12 +9853,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRContentLauncherClusterLauncherResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterUpdatePINParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSString * _Nullable oldPIN MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable data MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy, getter=getNewPIN) NSString * _Nonnull newPIN MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8362,49 +9873,20 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -/** - * Initialize an MTRContentLauncherClusterLauncherResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -MTR_DEPRECATED("Please use MTRContentLauncherClusterLauncherResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRContentLauncherClusterLaunchResponseParams : MTRContentLauncherClusterLauncherResponseParams - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_DEPRECATED("The status field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; -@property (nonatomic, copy) NSString * _Nullable data MTR_DEPRECATED("The data field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * 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. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * 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. + * 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 * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAudioOutputClusterSelectOutputParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterResetPINParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8431,12 +9913,27 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAudioOutputClusterRenameOutputParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterResetPINResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull pinCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull name MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * Initialize an MTRContentControlClusterResetPINResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterEnableParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8463,12 +9960,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject - -@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterDisableParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8495,10 +9988,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRApplicationLauncherClusterStopAppParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterAddBonusTimeParams : NSObject -@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable pinCode MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable bonusTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8525,10 +10020,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRApplicationLauncherClusterHideAppParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterSetScreenDailyTimeParams : NSObject -@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nullable application MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull screenTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8555,12 +10050,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable data MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterBlockUnratedContentParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8575,26 +10066,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRApplicationLauncherClusterLauncherResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccountLoginClusterGetSetupPINParams : NSObject - -@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterUnblockUnratedContentParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8621,10 +10106,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterSetOnDemandRatingThresholdParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull rating MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8639,28 +10124,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRAccountLoginClusterGetSetupPINResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccountLoginClusterLoginParams : NSObject - -@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterSetScheduledContentRatingThresholdParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull rating MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8687,8 +10166,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAccountLoginClusterLogoutParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentAppObserverClusterContentAppMessageParams : NSObject + +@property (nonatomic, copy) NSString * _Nullable data MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull encodingHint MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8715,6 +10198,29 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentAppObserverClusterContentAppMessageResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nullable status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull encodingHint MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRContentAppObserverClusterContentAppMessageResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index e57079b92946f2..b82bb7872fbb24 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -8831,9 +8831,9 @@ - (instancetype)init { if (self = [super init]) { - _systemTimeUs = @(0); + _systemTimeMs = @(0); - _utcTimeUs = nil; + _posixTimeMs = nil; } return self; } @@ -8842,15 +8842,15 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams alloc] init]; - other.systemTimeUs = self.systemTimeUs; - other.utcTimeUs = self.utcTimeUs; + other.systemTimeMs = self.systemTimeMs; + other.posixTimeMs = self.posixTimeMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeUs:%@; utcTimeUs:%@; >", NSStringFromClass([self class]), _systemTimeUs, _utcTimeUs]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeMs:%@; posixTimeMs:%@; >", NSStringFromClass([self class]), _systemTimeMs, _posixTimeMs]; return descriptionString; } @@ -8901,13 +8901,13 @@ @implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams (Internal - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType &)decodableStruct { { - self.systemTimeUs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeUs]; + self.systemTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeMs]; } { - if (decodableStruct.UTCTimeUs.IsNull()) { - self.utcTimeUs = nil; + if (decodableStruct.posixTimeMs.IsNull()) { + self.posixTimeMs = nil; } else { - self.utcTimeUs = [NSNumber numberWithUnsignedLongLong:decodableStruct.UTCTimeUs.Value()]; + self.posixTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.posixTimeMs.Value()]; } } return CHIP_NO_ERROR; @@ -12065,10 +12065,91 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenOperationalStateClusterPauseParams +@implementation MTRICDManagementClusterStayActiveResponseParams - (instancetype)init { if (self = [super init]) { + + _promisedActiveDuration = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; + + other.promisedActiveDuration = self.promisedActiveDuration; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRICDManagementClusterStayActiveResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct +{ + { + self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRTimerClusterSetTimerParams +- (instancetype)init +{ + if (self = [super init]) { + + _newTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12077,8 +12158,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenOperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRTimerClusterSetTimerParams alloc] init]; + other.newTime = self.newTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12087,18 +12169,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newTime:%@; >", NSStringFromClass([self class]), _newTime]; return descriptionString; } @end -@implementation MTROvenOperationalStateClusterPauseParams (InternalMethods) +@implementation MTRTimerClusterSetTimerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenOperationalState::Commands::Pause::Type encodableStruct; + chip::app::Clusters::Timer::Commands::SetTimer::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.newTime = self.newTime.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12138,7 +12223,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenOperationalStateClusterStopParams +@implementation MTRTimerClusterResetTimerParams - (instancetype)init { if (self = [super init]) { @@ -12150,7 +12235,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenOperationalStateClusterStopParams alloc] init]; + auto other = [[MTRTimerClusterResetTimerParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12166,11 +12251,11 @@ - (NSString *)description @end -@implementation MTROvenOperationalStateClusterStopParams (InternalMethods) +@implementation MTRTimerClusterResetTimerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenOperationalState::Commands::Stop::Type encodableStruct; + chip::app::Clusters::Timer::Commands::ResetTimer::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12211,10 +12296,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenOperationalStateClusterStartParams +@implementation MTRTimerClusterAddTimeParams - (instancetype)init { if (self = [super init]) { + + _additionalTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12223,8 +12310,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenOperationalStateClusterStartParams alloc] init]; + auto other = [[MTRTimerClusterAddTimeParams alloc] init]; + other.additionalTime = self.additionalTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12233,18 +12321,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: additionalTime:%@; >", NSStringFromClass([self class]), _additionalTime]; return descriptionString; } @end -@implementation MTROvenOperationalStateClusterStartParams (InternalMethods) +@implementation MTRTimerClusterAddTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenOperationalState::Commands::Start::Type encodableStruct; + chip::app::Clusters::Timer::Commands::AddTime::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.additionalTime = self.additionalTime.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12284,10 +12375,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenOperationalStateClusterResumeParams +@implementation MTRTimerClusterReduceTimeParams - (instancetype)init { if (self = [super init]) { + + _timeReduction = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12296,8 +12389,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenOperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRTimerClusterReduceTimeParams alloc] init]; + other.timeReduction = self.timeReduction; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12306,18 +12400,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeReduction:%@; >", NSStringFromClass([self class]), _timeReduction]; return descriptionString; } @end -@implementation MTROvenOperationalStateClusterResumeParams (InternalMethods) +@implementation MTRTimerClusterReduceTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenOperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::Timer::Commands::ReduceTime::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.timeReduction = self.timeReduction.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12357,110 +12454,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenOperationalStateClusterOperationalCommandResponseParams +@implementation MTROvenCavityOperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _commandResponseState = [MTROvenOperationalStateClusterErrorStateStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenOperationalStateClusterOperationalCommandResponseParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - other.commandResponseState = self.commandResponseState; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTROvenOperationalStateClusterOperationalCommandResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.commandResponseState = [MTROvenOperationalStateClusterErrorStateStruct new]; - self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; - if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { - self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); - if (self.commandResponseState.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateLabel = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } - if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { - self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); - if (self.commandResponseState.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateDetails = nil; + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRModeSelectClusterChangeToModeParams +@implementation MTROvenCavityOperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12469,9 +12539,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12480,21 +12549,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12534,12 +12600,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLaundryWasherModeClusterChangeToModeParams +@implementation MTROvenCavityOperationalStateClusterStartParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12548,9 +12612,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12559,21 +12622,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterStartParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12613,92 +12673,170 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams +@implementation MTROvenCavityOperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _statusText = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLaundryWasherModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - other.status = self.status; - other.statusText = self.statusText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; + 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 MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams +- (instancetype)init +{ + if (self = [super init]) { -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct + _commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + auto other = [[MTROvenCavityOperationalStateClusterOperationalCommandResponseParams alloc] init]; + + other.commandResponseState = self.commandResponseState; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; } + return nil; +} + +@end + +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct +{ { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { + self.commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; + self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; + if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { + self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); + if (self.commandResponseState.errorStateLabel == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } } else { - self.statusText = nil; + self.commandResponseState.errorStateLabel = nil; + } + if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { + self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); + if (self.commandResponseState.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.commandResponseState.errorStateDetails = nil; } } return CHIP_NO_ERROR; @@ -12706,7 +12844,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryW @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams +@implementation MTROvenModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { @@ -12720,7 +12858,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -12737,11 +12875,11 @@ - (NSString *)description @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { encodableStruct.newMode = self.newMode.unsignedCharValue; @@ -12785,7 +12923,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams +@implementation MTROvenModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { @@ -12799,7 +12937,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -12820,7 +12958,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -12855,9 +12993,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; @@ -12878,7 +13016,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Refriger @end -@implementation MTRRVCRunModeClusterChangeToModeParams +@implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { @@ -12892,7 +13030,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -12909,11 +13047,11 @@ - (NSString *)description @end -@implementation MTRRVCRunModeClusterChangeToModeParams (InternalMethods) +@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { encodableStruct.newMode = self.newMode.unsignedCharValue; @@ -12957,7 +13095,86 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams +@implementation MTRLaundryWasherModeClusterChangeToModeParams +- (instancetype)init +{ + if (self = [super init]) { + + _newMode = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + + other.newMode = self.newMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + return descriptionString; +} + +@end + +@implementation MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.newMode = self.newMode.unsignedCharValue; + } + + 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 MTRLaundryWasherModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { @@ -12971,7 +13188,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRLaundryWasherModeClusterChangeToModeResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -12992,7 +13209,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13027,9 +13244,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; @@ -13050,7 +13267,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMo @end -@implementation MTRRVCCleanModeClusterChangeToModeParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { @@ -13064,7 +13281,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -13081,11 +13298,11 @@ - (NSString *)description @end -@implementation MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { encodableStruct.newMode = self.newMode.unsignedCharValue; @@ -13129,7 +13346,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { @@ -13143,7 +13360,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -13164,7 +13381,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13199,9 +13416,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; @@ -13222,14 +13439,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcClean @end -@implementation MTRTemperatureControlClusterSetTemperatureParams +@implementation MTRRVCRunModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _targetTemperature = nil; - - _targetTemperatureLevel = nil; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13238,10 +13453,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; - other.targetTemperature = self.targetTemperature; - other.targetTemperatureLevel = self.targetTemperatureLevel; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13250,29 +13464,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) +@implementation MTRRVCRunModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - if (self.targetTemperature != nil) { - auto & definedValue_0 = encodableStruct.targetTemperature.Emplace(); - definedValue_0 = self.targetTemperature.shortValue; - } - } - { - if (self.targetTemperatureLevel != nil) { - auto & definedValue_0 = encodableStruct.targetTemperatureLevel.Emplace(); - definedValue_0 = self.targetTemperatureLevel.unsignedCharValue; - } + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13313,7 +13518,100 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherModeClusterChangeToModeParams +@implementation MTRRVCRunModeClusterChangeToModeResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _statusText = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRRVCRunModeClusterChangeToModeResponseParams alloc] init]; + + other.status = self.status; + other.statusText = self.statusText; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRRVCRunModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRRVCCleanModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { @@ -13327,7 +13625,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -13344,11 +13642,11 @@ - (NSString *)description @end -@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) +@implementation MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { encodableStruct.newMode = self.newMode.unsignedCharValue; @@ -13392,7 +13690,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { @@ -13406,7 +13704,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRRVCCleanModeClusterChangeToModeResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -13427,7 +13725,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13462,9 +13760,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; @@ -13485,10 +13783,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Dishwash @end -@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams +@implementation MTRTemperatureControlClusterSetTemperatureParams - (instancetype)init { if (self = [super init]) { + + _targetTemperature = nil; + + _targetTemperatureLevel = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13497,8 +13799,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; + auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + other.targetTemperature = self.targetTemperature; + other.targetTemperatureLevel = self.targetTemperatureLevel; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13507,18 +13811,30 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; return descriptionString; } @end -@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams (InternalMethods) +@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type encodableStruct; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; ListFreer listFreer; + { + if (self.targetTemperature != nil) { + auto & definedValue_0 = encodableStruct.targetTemperature.Emplace(); + definedValue_0 = self.targetTemperature.shortValue; + } + } + { + if (self.targetTemperatureLevel != nil) { + auto & definedValue_0 = encodableStruct.targetTemperatureLevel.Emplace(); + definedValue_0 = self.targetTemperatureLevel.unsignedCharValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -13558,12 +13874,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherAlarmClusterResetParams +@implementation MTRDishwasherModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _alarms = @(0); + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13572,9 +13888,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; - other.alarms = self.alarms; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13583,20 +13899,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) +@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.alarms = static_cast>(self.alarms.unsignedIntValue); + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13637,91 +13953,336 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams +@implementation MTRDishwasherModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _mask = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + auto other = [[MTRDishwasherModeClusterChangeToModeResponseParams alloc] init]; - other.mask = self.mask; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } -@end - -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.mask = static_cast>(self.mask.unsignedIntValue); + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - 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)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams +@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams - (instancetype)init { if (self = [super init]) { - - _cookMode = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams 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 MTRSmokeCOAlarmClusterSelfTestRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::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 MTRDishwasherAlarmClusterResetParams +- (instancetype)init +{ + if (self = [super init]) { + + _alarms = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + + other.alarms = self.alarms; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; + return descriptionString; +} + +@end + +@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.alarms = static_cast>(self.alarms.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 MTRDishwasherAlarmClusterModifyEnabledAlarmsParams +- (instancetype)init +{ + if (self = [super init]) { + + _mask = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + + other.mask = self.mask; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; + return descriptionString; +} + +@end + +@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.mask = static_cast>(self.mask.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 MTRMicrowaveOvenControlClusterSetCookingParametersParams +- (instancetype)init +{ + if (self = [super init]) { + + _cookMode = nil; _cookTime = nil; @@ -14821,12 +15382,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterLockDoorParams +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _alarmsToSuppress = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14835,9 +15396,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; - other.pinCode = self.pinCode; + other.alarmsToSuppress = self.alarmsToSuppress; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14846,23 +15407,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToSuppress:%@; >", NSStringFromClass([self class]), _alarmsToSuppress]; return descriptionString; } @end -@implementation MTRDoorLockClusterLockDoorParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::LockDoor::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type encodableStruct; ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14903,12 +15461,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterUnlockDoorParams +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _alarmsToEnableDisable = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14917,9 +15475,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; - other.pinCode = self.pinCode; + other.alarmsToEnableDisable = self.alarmsToEnableDisable; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14928,23 +15486,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToEnableDisable:%@; >", NSStringFromClass([self class]), _alarmsToEnableDisable]; return descriptionString; } @end -@implementation MTRDoorLockClusterUnlockDoorParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.alarmsToEnableDisable = static_cast>(self.alarmsToEnableDisable.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14985,14 +15540,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterUnlockWithTimeoutParams +@implementation MTRValveConfigurationAndControlClusterOpenParams - (instancetype)init { if (self = [super init]) { - _timeout = @(0); + _openDuration = nil; - _pinCode = nil; + _targetLevel = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15001,10 +15556,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; - other.timeout = self.timeout; - other.pinCode = self.pinCode; + other.openDuration = self.openDuration; + other.targetLevel = self.targetLevel; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15013,25 +15568,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), _timeout, [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: openDuration:%@; targetLevel:%@; >", NSStringFromClass([self class]), _openDuration, _targetLevel]; return descriptionString; } @end -@implementation MTRDoorLockClusterUnlockWithTimeoutParams (InternalMethods) +@implementation MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type encodableStruct; + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type encodableStruct; ListFreer listFreer; { - encodableStruct.timeout = self.timeout.unsignedShortValue; + if (self.openDuration != nil) { + auto & definedValue_0 = encodableStruct.openDuration.Emplace(); + if (self.openDuration == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.openDuration.unsignedIntValue; + } + } } { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); + if (self.targetLevel != nil) { + auto & definedValue_0 = encodableStruct.targetLevel.Emplace(); + definedValue_0 = self.targetLevel.unsignedCharValue; } } @@ -15073,24 +15636,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetWeekDayScheduleParams +@implementation MTRValveConfigurationAndControlClusterCloseParams - (instancetype)init { if (self = [super init]) { - - _weekDayIndex = @(0); - - _userIndex = @(0); - - _daysMask = @(0); - - _startHour = @(0); - - _startMinute = @(0); - - _endHour = @(0); - - _endMinute = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15099,15 +15648,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; - other.userIndex = self.userIndex; - other.daysMask = self.daysMask; - other.startHour = self.startHour; - other.startMinute = self.startMinute; - other.endHour = self.endHour; - other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15116,39 +15658,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetWeekDayScheduleParams (InternalMethods) +@implementation MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; - } - { - encodableStruct.daysMask = static_cast>(self.daysMask.unsignedCharValue); - } - { - encodableStruct.startHour = self.startHour.unsignedCharValue; - } - { - encodableStruct.startMinute = self.startMinute.unsignedCharValue; - } - { - encodableStruct.endHour = self.endHour.unsignedCharValue; - } - { - encodableStruct.endMinute = self.endMinute.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15188,14 +15709,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleParams +@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); - - _userIndex = @(0); + _loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15204,10 +15723,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; - other.userIndex = self.userIndex; + other.loadControlProgram = self.loadControlProgram; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15216,23 +15734,39 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgram:%@; >", NSStringFromClass([self class]), _loadControlProgram]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.loadControlProgram.programID = AsByteSpan(self.loadControlProgram.programID); + encodableStruct.loadControlProgram.name = AsCharSpan(self.loadControlProgram.name); + if (self.loadControlProgram.enrollmentGroup == nil) { + encodableStruct.loadControlProgram.enrollmentGroup.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.enrollmentGroup.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.enrollmentGroup.unsignedCharValue; + } + if (self.loadControlProgram.randomStartMinutes == nil) { + encodableStruct.loadControlProgram.randomStartMinutes.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomStartMinutes.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.randomStartMinutes.unsignedCharValue; + } + if (self.loadControlProgram.randomDurationMinutes == nil) { + encodableStruct.loadControlProgram.randomDurationMinutes.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomDurationMinutes.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.randomDurationMinutes.unsignedCharValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15273,157 +15807,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _weekDayIndex = @(0); - - _userIndex = @(0); - - _status = @(0); - - _daysMask = nil; - - _startHour = nil; - - _startMinute = nil; - - _endHour = nil; - - _endMinute = nil; - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; - - other.weekDayIndex = self.weekDayIndex; - other.userIndex = self.userIndex; - other.status = self.status; - other.daysMask = self.daysMask; - other.startHour = self.startHour; - other.startMinute = self.startMinute; - other.endHour = self.endHour; - other.endMinute = self.endMinute; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _status, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &)decodableStruct -{ - { - self.weekDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.weekDayIndex]; - } - { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; - } - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.daysMask.HasValue()) { - self.daysMask = [NSNumber numberWithUnsignedChar:decodableStruct.daysMask.Value().Raw()]; - } else { - self.daysMask = nil; - } - } - { - if (decodableStruct.startHour.HasValue()) { - self.startHour = [NSNumber numberWithUnsignedChar:decodableStruct.startHour.Value()]; - } else { - self.startHour = nil; - } - } - { - if (decodableStruct.startMinute.HasValue()) { - self.startMinute = [NSNumber numberWithUnsignedChar:decodableStruct.startMinute.Value()]; - } else { - self.startMinute = nil; - } - } - { - if (decodableStruct.endHour.HasValue()) { - self.endHour = [NSNumber numberWithUnsignedChar:decodableStruct.endHour.Value()]; - } else { - self.endHour = nil; - } - } - { - if (decodableStruct.endMinute.HasValue()) { - self.endMinute = [NSNumber numberWithUnsignedChar:decodableStruct.endMinute.Value()]; - } else { - self.endMinute = nil; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRDoorLockClusterClearWeekDayScheduleParams +@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); - - _userIndex = @(0); + _loadControlProgramID = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15432,10 +15821,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; - other.userIndex = self.userIndex; + other.loadControlProgramID = self.loadControlProgramID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15444,23 +15832,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgramID:%@; >", NSStringFromClass([self class]), [_loadControlProgramID base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearWeekDayScheduleParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.loadControlProgramID = AsByteSpan(self.loadControlProgramID); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15501,18 +15886,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetYearDayScheduleParams +@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); - - _userIndex = @(0); - - _localStartTime = @(0); - - _localEndTime = @(0); + _event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15521,12 +15900,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; + other.event = self.event; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15535,29 +15911,117 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _localStartTime, _localEndTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: event:%@; >", NSStringFromClass([self class]), _event]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetYearDayScheduleParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; - } - { - encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; - } - { - encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; + encodableStruct.event.eventID = AsByteSpan(self.event.eventID); + if (self.event.programID == nil) { + encodableStruct.event.programID.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.event.programID.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.event.programID); + } + encodableStruct.event.control = static_cast>(self.event.control.unsignedShortValue); + encodableStruct.event.deviceClass = static_cast>(self.event.deviceClass.unsignedIntValue); + if (self.event.enrollmentGroup != nil) { + auto & definedValue_1 = encodableStruct.event.enrollmentGroup.Emplace(); + definedValue_1 = self.event.enrollmentGroup.unsignedCharValue; + } + encodableStruct.event.criticality = static_cast>(self.event.criticality.unsignedCharValue); + if (self.event.startTime == nil) { + encodableStruct.event.startTime.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.event.startTime.SetNonNull(); + nonNullValue_1 = self.event.startTime.unsignedIntValue; + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.event.transitions.count != 0) { + auto * listHolder_1 = new ListHolder(self.event.transitions.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.event.transitions.count; ++i_1) { + if (![self.event.transitions[i_1] isKindOfClass:[MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct *) self.event.transitions[i_1]; + listHolder_1->mList[i_1].duration = element_1.duration.unsignedShortValue; + listHolder_1->mList[i_1].control = static_castmList[i_1].control)>>(element_1.control.unsignedShortValue); + if (element_1.temperatureControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].temperatureControl.Emplace(); + if (element_1.temperatureControl.coolingTempOffset != nil) { + auto & definedValue_5 = definedValue_3.coolingTempOffset.Emplace(); + if (element_1.temperatureControl.coolingTempOffset == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.coolingTempOffset.unsignedShortValue; + } + } + if (element_1.temperatureControl.heatingtTempOffset != nil) { + auto & definedValue_5 = definedValue_3.heatingtTempOffset.Emplace(); + if (element_1.temperatureControl.heatingtTempOffset == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.heatingtTempOffset.unsignedShortValue; + } + } + if (element_1.temperatureControl.coolingTempSetpoint != nil) { + auto & definedValue_5 = definedValue_3.coolingTempSetpoint.Emplace(); + if (element_1.temperatureControl.coolingTempSetpoint == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.coolingTempSetpoint.shortValue; + } + } + if (element_1.temperatureControl.heatingTempSetpoint != nil) { + auto & definedValue_5 = definedValue_3.heatingTempSetpoint.Emplace(); + if (element_1.temperatureControl.heatingTempSetpoint == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.heatingTempSetpoint.shortValue; + } + } + } + if (element_1.averageLoadControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].averageLoadControl.Emplace(); + definedValue_3.loadAdjustment = element_1.averageLoadControl.loadAdjustment.charValue; + } + if (element_1.dutyCycleControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].dutyCycleControl.Emplace(); + definedValue_3.dutyCycle = element_1.dutyCycleControl.dutyCycle.unsignedCharValue; + } + if (element_1.powerSavingsControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].powerSavingsControl.Emplace(); + definedValue_3.powerSavings = element_1.powerSavingsControl.powerSavings.unsignedCharValue; + } + if (element_1.heatingSourceControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].heatingSourceControl.Emplace(); + definedValue_3.heatingSource = static_cast>(element_1.heatingSourceControl.heatingSource.unsignedCharValue); + } + } + encodableStruct.event.transitions = ListType_1(listHolder_1->mList, self.event.transitions.count); + } else { + encodableStruct.event.transitions = ListType_1(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15598,14 +16062,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetYearDayScheduleParams +@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); + _eventID = [NSData data]; - _userIndex = @(0); + _cancelControl = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15614,10 +16078,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.eventID = self.eventID; + other.cancelControl = self.cancelControl; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15626,23 +16090,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: eventID:%@; cancelControl:%@; >", NSStringFromClass([self class]), [_eventID base64EncodedStringWithOptions:0], _cancelControl]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetYearDayScheduleParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; + encodableStruct.eventID = AsByteSpan(self.eventID); } { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.cancelControl = static_cast>(self.cancelControl.unsignedShortValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15683,127 +16147,87 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams +@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams - (instancetype)init { if (self = [super init]) { - - _yearDayIndex = @(0); - - _userIndex = @(0); - - _status = @(0); - - _localStartTime = nil; - - _localEndTime = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; - other.status = self.status; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _status, _localStartTime, _localEndTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.yearDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.yearDayIndex]; - } - { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; - } - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.localStartTime.HasValue()) { - self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; - } else { - self.localStartTime = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.localEndTime.HasValue()) { - self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; - } else { - self.localEndTime = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRDoorLockClusterClearYearDayScheduleParams +@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); + _power = @(0); - _userIndex = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15812,10 +16236,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.power = self.power; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15824,23 +16248,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: power:%@; duration:%@; >", NSStringFromClass([self class]), _power, _duration]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearYearDayScheduleParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; + encodableStruct.power = self.power.longLongValue; } { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15881,18 +16305,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetHolidayScheduleParams +@implementation MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams - (instancetype)init { if (self = [super init]) { - - _holidayIndex = @(0); - - _localStartTime = @(0); - - _localEndTime = @(0); - - _operatingMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15901,12 +16317,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; - other.holidayIndex = self.holidayIndex; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; - other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15915,30 +16327,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _localStartTime, _localEndTime, _operatingMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetHolidayScheduleParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; - } - { - encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; - } - { - encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; - } - { - encodableStruct.operatingMode = static_cast>(self.operatingMode.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15978,12 +16378,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetHolidayScheduleParams +@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); + _requestedStartTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15992,9 +16392,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; - other.holidayIndex = self.holidayIndex; + other.requestedStartTime = self.requestedStartTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16003,20 +16403,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestedStartTime:%@; >", NSStringFromClass([self class]), _requestedStartTime]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetHolidayScheduleParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; + encodableStruct.requestedStartTime = self.requestedStartTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16057,129 +16457,89 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams +@implementation MTRDeviceEnergyManagementClusterPauseRequestParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); - - _status = @(0); - - _localStartTime = nil; - - _localEndTime = nil; - - _operatingMode = nil; + _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; - other.holidayIndex = self.holidayIndex; - other.status = self.status; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; - other.operatingMode = self.operatingMode; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _status, _localStartTime, _localEndTime, _operatingMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; >", NSStringFromClass([self class]), _duration]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRDeviceEnergyManagementClusterPauseRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.duration = self.duration.unsignedIntValue; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.holidayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.holidayIndex]; - } - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.localStartTime.HasValue()) { - self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; - } else { - self.localStartTime = nil; - } - } - { - if (decodableStruct.localEndTime.HasValue()) { - self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; - } else { - self.localEndTime = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.operatingMode.HasValue()) { - self.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.operatingMode.Value())]; - } else { - self.operatingMode = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRDoorLockClusterClearHolidayScheduleParams +@implementation MTRDeviceEnergyManagementClusterResumeRequestParams - (instancetype)init { if (self = [super init]) { - - _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16188,9 +16548,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; - other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16199,21 +16558,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearHolidayScheduleParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterResumeRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16253,24 +16609,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetUserParams +@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams - (instancetype)init { if (self = [super init]) { - _operationType = @(0); - - _userIndex = @(0); - - _userName = nil; - - _userUniqueID = nil; - - _userStatus = nil; - - _userType = nil; + _forecastId = @(0); - _credentialRule = nil; + _slotAdjustments = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16279,15 +16625,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; - other.operationType = self.operationType; - other.userIndex = self.userIndex; - other.userName = self.userName; - other.userUniqueID = self.userUniqueID; - other.userStatus = self.userStatus; - other.userType = self.userType; - other.credentialRule = self.credentialRule; + other.forecastId = self.forecastId; + other.slotAdjustments = self.slotAdjustments; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16296,62 +16637,45 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; >", NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; slotAdjustments:%@; >", NSStringFromClass([self class]), _forecastId, _slotAdjustments]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetUserParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetUser::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; - } - { - if (self.userName == nil) { - encodableStruct.userName.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userName.SetNonNull(); - nonNullValue_0 = AsCharSpan(self.userName); - } - } - { - if (self.userUniqueID == nil) { - encodableStruct.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userUniqueID.SetNonNull(); - nonNullValue_0 = self.userUniqueID.unsignedIntValue; - } - } - { - if (self.userStatus == nil) { - encodableStruct.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); - nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); - } - } - { - if (self.userType == nil) { - encodableStruct.userType.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); - nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); - } + encodableStruct.forecastId = self.forecastId.unsignedIntValue; } { - if (self.credentialRule == nil) { - encodableStruct.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.credentialRule.SetNonNull(); - nonNullValue_0 = static_cast>(self.credentialRule.unsignedCharValue); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.slotAdjustments.count != 0) { + auto * listHolder_0 = new ListHolder(self.slotAdjustments.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.slotAdjustments.count; ++i_0) { + if (![self.slotAdjustments[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterSlotAdjustmentStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRDeviceEnergyManagementClusterSlotAdjustmentStruct *) self.slotAdjustments[i_0]; + listHolder_0->mList[i_0].slotIndex = element_0.slotIndex.unsignedCharValue; + listHolder_0->mList[i_0].nominalPower = element_0.nominalPower.longLongValue; + listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; + } + encodableStruct.slotAdjustments = ListType_0(listHolder_0->mList, self.slotAdjustments.count); + } else { + encodableStruct.slotAdjustments = ListType_0(); + } } } @@ -16393,24 +16717,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetUserParams (Deprecated) - -- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId -{ - self.userUniqueID = userUniqueId; -} - -- (NSNumber * _Nullable)userUniqueId -{ - return self.userUniqueID; -} -@end -@implementation MTRDoorLockClusterGetUserParams +@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams - (instancetype)init { if (self = [super init]) { - _userIndex = @(0); + _constraints = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16419,9 +16731,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; - other.userIndex = self.userIndex; + other.constraints = self.constraints; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16430,20 +16742,54 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: constraints:%@; >", NSStringFromClass([self class]), _constraints]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetUserParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetUser::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type encodableStruct; ListFreer listFreer; { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.constraints.count != 0) { + auto * listHolder_0 = new ListHolder(self.constraints.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.constraints.count; ++i_0) { + if (![self.constraints[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterConstraintsStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRDeviceEnergyManagementClusterConstraintsStruct *) self.constraints[i_0]; + listHolder_0->mList[i_0].startTime = element_0.startTime.unsignedIntValue; + listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; + if (element_0.nominalPower != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nominalPower.Emplace(); + definedValue_2 = element_0.nominalPower.longLongValue; + } + if (element_0.maximumEnergy != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].maximumEnergy.Emplace(); + definedValue_2 = element_0.maximumEnergy.longLongValue; + } + if (element_0.loadControl != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].loadControl.Emplace(); + definedValue_2 = element_0.loadControl.charValue; + } + } + encodableStruct.constraints = ListType_0(listHolder_0->mList, self.constraints.count); + } else { + encodableStruct.constraints = ListType_0(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16484,57 +16830,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetUserResponseParams +@implementation MTREnergyEVSEClusterGetTargetsResponseParams - (instancetype)init { if (self = [super init]) { - _userIndex = @(0); - - _userName = nil; - - _userUniqueID = nil; - - _userStatus = nil; - - _userType = nil; - - _credentialRule = nil; - - _credentials = nil; - - _creatorFabricIndex = nil; - - _lastModifiedFabricIndex = nil; + _dayOfWeekforSequence = @(0); - _nextUserIndex = nil; - _timedInvokeTimeoutMs = nil; + _chargingTargets = [NSArray array]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; + auto other = [[MTREnergyEVSEClusterGetTargetsResponseParams alloc] init]; - other.userIndex = self.userIndex; - other.userName = self.userName; - other.userUniqueID = self.userUniqueID; - other.userStatus = self.userStatus; - other.userType = self.userType; - other.credentialRule = self.credentialRule; - other.credentials = self.credentials; - other.creatorFabricIndex = self.creatorFabricIndex; - other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; - other.nextUserIndex = self.nextUserIndex; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.chargingTargets = self.chargingTargets; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", NSStringFromClass([self class]), _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule, _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; return descriptionString; } @@ -16545,7 +16865,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType; + using DecodableType = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -16580,94 +16900,39 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDoorLockClusterGetUserResponseParams (InternalMethods) +@implementation MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct { { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; + self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; } { - if (decodableStruct.userName.IsNull()) { - self.userName = nil; - } else { - self.userName = AsString(decodableStruct.userName.Value()); - if (self.userName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.chargingTargets.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTREnergyEVSEClusterChargingTargetStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; + if (entry_0.targetSoC.HasValue()) { + newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; + } else { + newElement_0.targetSoC = nil; + } + if (entry_0.addedEnergy.HasValue()) { + newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; + } else { + newElement_0.addedEnergy = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { return err; } - } - } - { - if (decodableStruct.userUniqueID.IsNull()) { - self.userUniqueID = nil; - } else { - self.userUniqueID = [NSNumber numberWithUnsignedInt:decodableStruct.userUniqueID.Value()]; - } - } - { - if (decodableStruct.userStatus.IsNull()) { - self.userStatus = nil; - } else { - self.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userStatus.Value())]; - } - } - { - if (decodableStruct.userType.IsNull()) { - self.userType = nil; - } else { - self.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userType.Value())]; - } - } - { - if (decodableStruct.credentialRule.IsNull()) { - self.credentialRule = nil; - } else { - self.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.credentialRule.Value())]; - } - } - { - if (decodableStruct.credentials.IsNull()) { - self.credentials = nil; - } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.credentials.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRDoorLockClusterCredentialStruct * newElement_1; - newElement_1 = [MTRDoorLockClusterCredentialStruct new]; - newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; - newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.credentials = array_1; - } - } - } - { - if (decodableStruct.creatorFabricIndex.IsNull()) { - self.creatorFabricIndex = nil; - } else { - self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; - } - } - { - if (decodableStruct.lastModifiedFabricIndex.IsNull()) { - self.lastModifiedFabricIndex = nil; - } else { - self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; - } - } - { - if (decodableStruct.nextUserIndex.IsNull()) { - self.nextUserIndex = nil; - } else { - self.nextUserIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextUserIndex.Value()]; + self.chargingTargets = array_0; } } return CHIP_NO_ERROR; @@ -16675,24 +16940,10 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock @end -@implementation MTRDoorLockClusterGetUserResponseParams (Deprecated) - -- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId -{ - self.userUniqueID = userUniqueId; -} - -- (NSNumber * _Nullable)userUniqueId -{ - return self.userUniqueID; -} -@end -@implementation MTRDoorLockClusterClearUserParams +@implementation MTREnergyEVSEClusterDisableParams - (instancetype)init { if (self = [super init]) { - - _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16701,9 +16952,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; + auto other = [[MTREnergyEVSEClusterDisableParams alloc] init]; - other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16712,21 +16962,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearUserParams (InternalMethods) +@implementation MTREnergyEVSEClusterDisableParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearUser::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::Disable::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16766,22 +17013,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetCredentialParams +@implementation MTREnergyEVSEClusterEnableChargingParams - (instancetype)init { if (self = [super init]) { - _operationType = @(0); - - _credential = [MTRDoorLockClusterCredentialStruct new]; - - _credentialData = [NSData data]; - - _userIndex = nil; + _chargingEnabledUntil = nil; - _userStatus = nil; + _minimumChargeCurrent = @(0); - _userType = nil; + _maximumChargeCurrent = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16790,14 +17031,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + auto other = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; - other.operationType = self.operationType; - other.credential = self.credential; - other.credentialData = self.credentialData; - other.userIndex = self.userIndex; - other.userStatus = self.userStatus; - other.userType = self.userType; + other.chargingEnabledUntil = self.chargingEnabledUntil; + other.minimumChargeCurrent = self.minimumChargeCurrent; + other.maximumChargeCurrent = self.maximumChargeCurrent; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16806,51 +17044,31 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], _userIndex, _userStatus, _userType]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingEnabledUntil:%@; minimumChargeCurrent:%@; maximumChargeCurrent:%@; >", NSStringFromClass([self class]), _chargingEnabledUntil, _minimumChargeCurrent, _maximumChargeCurrent]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetCredentialParams (InternalMethods) +@implementation MTREnergyEVSEClusterEnableChargingParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetCredential::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type encodableStruct; ListFreer listFreer; { - encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); - } - { - encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; - } - { - encodableStruct.credentialData = AsByteSpan(self.credentialData); - } - { - if (self.userIndex == nil) { - encodableStruct.userIndex.SetNull(); + if (self.chargingEnabledUntil == nil) { + encodableStruct.chargingEnabledUntil.SetNull(); } else { - auto & nonNullValue_0 = encodableStruct.userIndex.SetNonNull(); - nonNullValue_0 = self.userIndex.unsignedShortValue; + auto & nonNullValue_0 = encodableStruct.chargingEnabledUntil.SetNonNull(); + nonNullValue_0 = self.chargingEnabledUntil.unsignedIntValue; } } { - if (self.userStatus == nil) { - encodableStruct.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); - nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); - } + encodableStruct.minimumChargeCurrent = self.minimumChargeCurrent.longLongValue; } { - if (self.userType == nil) { - encodableStruct.userType.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); - nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); - } + encodableStruct.maximumChargeCurrent = self.maximumChargeCurrent.longLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16891,113 +17109,100 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetCredentialResponseParams +@implementation MTREnergyEVSEClusterEnableDischargingParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _userIndex = nil; + _dischargingEnabledUntil = nil; - _nextCredentialIndex = nil; + _maximumDischargeCurrent = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; + auto other = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; - other.status = self.status; - other.userIndex = self.userIndex; - other.nextCredentialIndex = self.nextCredentialIndex; + other.dischargingEnabledUntil = self.dischargingEnabledUntil; + other.maximumDischargeCurrent = self.maximumDischargeCurrent; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _status, _userIndex, _nextCredentialIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dischargingEnabledUntil:%@; maximumDischargeCurrent:%@; >", NSStringFromClass([self class]), _dischargingEnabledUntil, _maximumDischargeCurrent]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTREnergyEVSEClusterEnableDischargingParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type encodableStruct; + ListFreer listFreer; + { + if (self.dischargingEnabledUntil == nil) { + encodableStruct.dischargingEnabledUntil.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.dischargingEnabledUntil.SetNonNull(); + nonNullValue_0 = self.dischargingEnabledUntil.unsignedIntValue; + } + } + { + encodableStruct.maximumDischargeCurrent = self.maximumDischargeCurrent.longLongValue; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRDoorLockClusterSetCredentialResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.userIndex.IsNull()) { - self.userIndex = nil; - } else { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.nextCredentialIndex.IsNull()) { - self.nextCredentialIndex = nil; - } else { - self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRDoorLockClusterGetCredentialStatusParams +@implementation MTREnergyEVSEClusterStartDiagnosticsParams - (instancetype)init { if (self = [super init]) { - - _credential = [MTRDoorLockClusterCredentialStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17006,9 +17211,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + auto other = [[MTREnergyEVSEClusterStartDiagnosticsParams alloc] init]; - other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17017,22 +17221,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetCredentialStatusParams (InternalMethods) +@implementation MTREnergyEVSEClusterStartDiagnosticsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17072,144 +17272,26 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetCredentialStatusResponseParams +@implementation MTREnergyEVSEClusterSetTargetsParams - (instancetype)init { if (self = [super init]) { - _credentialExists = @(0); - - _userIndex = nil; - - _creatorFabricIndex = nil; - - _lastModifiedFabricIndex = nil; + _dayOfWeekforSequence = @(0); - _nextCredentialIndex = nil; + _chargingTargets = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + auto other = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; - other.credentialExists = self.credentialExists; - other.userIndex = self.userIndex; - other.creatorFabricIndex = self.creatorFabricIndex; - other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; - other.nextCredentialIndex = self.nextCredentialIndex; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, _nextCredentialIndex]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRDoorLockClusterGetCredentialStatusResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &)decodableStruct -{ - { - self.credentialExists = [NSNumber numberWithBool:decodableStruct.credentialExists]; - } - { - if (decodableStruct.userIndex.IsNull()) { - self.userIndex = nil; - } else { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; - } - } - { - if (decodableStruct.creatorFabricIndex.IsNull()) { - self.creatorFabricIndex = nil; - } else { - self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; - } - } - { - if (decodableStruct.lastModifiedFabricIndex.IsNull()) { - self.lastModifiedFabricIndex = nil; - } else { - self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; - } - } - { - if (decodableStruct.nextCredentialIndex.IsNull()) { - self.nextCredentialIndex = nil; - } else { - self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRDoorLockClusterClearCredentialParams -- (instancetype)init -{ - if (self = [super init]) { - - _credential = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - - other.credential = self.credential; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.chargingTargets = self.chargingTargets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17218,25 +17300,51 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearCredentialParams (InternalMethods) +@implementation MTREnergyEVSEClusterSetTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type encodableStruct; ListFreer listFreer; { - if (self.credential == nil) { - encodableStruct.credential.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = self.credential.credentialIndex.unsignedShortValue; + encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.chargingTargets.count != 0) { + auto * listHolder_0 = new ListHolder(self.chargingTargets.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.chargingTargets.count; ++i_0) { + if (![self.chargingTargets[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTREnergyEVSEClusterChargingTargetStruct *) self.chargingTargets[i_0]; + listHolder_0->mList[i_0].targetTimeMinutesPastMidnight = element_0.targetTimeMinutesPastMidnight.unsignedShortValue; + if (element_0.targetSoC != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].targetSoC.Emplace(); + definedValue_2 = element_0.targetSoC.unsignedCharValue; + } + if (element_0.addedEnergy != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].addedEnergy.Emplace(); + definedValue_2 = element_0.addedEnergy.longLongValue; + } + } + encodableStruct.chargingTargets = ListType_0(listHolder_0->mList, self.chargingTargets.count); + } else { + encodableStruct.chargingTargets = ListType_0(); + } } } @@ -17278,12 +17386,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterUnboltDoorParams +@implementation MTREnergyEVSEClusterGetTargetsParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _daysToReturn = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17292,9 +17400,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; + auto other = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; - other.pinCode = self.pinCode; + other.daysToReturn = self.daysToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17303,23 +17411,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn]; return descriptionString; } @end -@implementation MTRDoorLockClusterUnboltDoorParams (InternalMethods) +@implementation MTREnergyEVSEClusterGetTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type encodableStruct; ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17360,7 +17465,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterUpOrOpenParams +@implementation MTREnergyEVSEClusterClearTargetsParams - (instancetype)init { if (self = [super init]) { @@ -17372,7 +17477,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + auto other = [[MTREnergyEVSEClusterClearTargetsParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17388,11 +17493,11 @@ - (NSString *)description @end -@implementation MTRWindowCoveringClusterUpOrOpenParams (InternalMethods) +@implementation MTREnergyEVSEClusterClearTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17433,10 +17538,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterDownOrCloseParams +@implementation MTRDoorLockClusterLockDoorParams - (instancetype)init { if (self = [super init]) { + + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17445,8 +17552,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17455,18 +17563,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterDownOrCloseParams (InternalMethods) +@implementation MTRDoorLockClusterLockDoorParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type encodableStruct; ListFreer listFreer; + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17506,10 +17620,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterStopMotionParams +@implementation MTRDoorLockClusterUnlockDoorParams - (instancetype)init { if (self = [super init]) { + + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17518,8 +17634,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17528,18 +17645,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterStopMotionParams (InternalMethods) +@implementation MTRDoorLockClusterUnlockDoorParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type encodableStruct; ListFreer listFreer; + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17579,12 +17702,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToLiftValueParams +@implementation MTRDoorLockClusterUnlockWithTimeoutParams - (instancetype)init { if (self = [super init]) { - _liftValue = @(0); + _timeout = @(0); + + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17593,9 +17718,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - other.liftValue = self.liftValue; + other.timeout = self.timeout; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17604,20 +17730,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), _timeout, [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToLiftValueParams (InternalMethods) +@implementation MTRDoorLockClusterUnlockWithTimeoutParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type encodableStruct; ListFreer listFreer; { - encodableStruct.liftValue = self.liftValue.unsignedShortValue; + encodableStruct.timeout = self.timeout.unsignedShortValue; + } + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17658,12 +17790,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToLiftPercentageParams +@implementation MTRDoorLockClusterSetWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { - _liftPercent100thsValue = @(0); + _weekDayIndex = @(0); + + _userIndex = @(0); + + _daysMask = @(0); + + _startHour = @(0); + + _startMinute = @(0); + + _endHour = @(0); + + _endMinute = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17672,9 +17816,15 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - other.liftPercent100thsValue = self.liftPercent100thsValue; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17683,24 +17833,42 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftPercent100thsValue:%@; >", NSStringFromClass([self class]), _liftPercent100thsValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToLiftPercentageParams (InternalMethods) +@implementation MTRDoorLockClusterSetWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.liftPercent100thsValue = self.liftPercent100thsValue.unsignedShortValue; + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; + } + { + encodableStruct.daysMask = static_cast>(self.daysMask.unsignedCharValue); + } + { + encodableStruct.startHour = self.startHour.unsignedCharValue; + } + { + encodableStruct.startMinute = self.startMinute.unsignedCharValue; + } + { + encodableStruct.endHour = self.endHour.unsignedCharValue; + } + { + encodableStruct.endMinute = self.endMinute.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { return CHIP_ERROR_NO_MEMORY; } @@ -17737,12 +17905,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToTiltValueParams +@implementation MTRDoorLockClusterGetWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { - _tiltValue = @(0); + _weekDayIndex = @(0); + + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17751,9 +17921,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - other.tiltValue = self.tiltValue; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17762,20 +17933,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToTiltValueParams (InternalMethods) +@implementation MTRDoorLockClusterGetWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.tiltValue = self.tiltValue.unsignedShortValue; + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + } + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17816,91 +17990,157 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToTiltPercentageParams +@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _tiltPercent100thsValue = @(0); + _weekDayIndex = @(0); + + _userIndex = @(0); + + _status = @(0); + + _daysMask = nil; + + _startHour = nil; + + _startMinute = nil; + + _endHour = nil; + + _endMinute = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; - other.tiltPercent100thsValue = self.tiltPercent100thsValue; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltPercent100thsValue:%@; >", NSStringFromClass([self class]), _tiltPercent100thsValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _status, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; return descriptionString; } -@end - -@implementation MTRWindowCoveringClusterGoToTiltPercentageParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.tiltPercent100thsValue = self.tiltPercent100thsValue.unsignedShortValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - 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)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.weekDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.weekDayIndex]; + } + { + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; + } + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.daysMask.HasValue()) { + self.daysMask = [NSNumber numberWithUnsignedChar:decodableStruct.daysMask.Value().Raw()]; + } else { + self.daysMask = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.startHour.HasValue()) { + self.startHour = [NSNumber numberWithUnsignedChar:decodableStruct.startHour.Value()]; + } else { + self.startHour = nil; } } - return decodedObj; + { + if (decodableStruct.startMinute.HasValue()) { + self.startMinute = [NSNumber numberWithUnsignedChar:decodableStruct.startMinute.Value()]; + } else { + self.startMinute = nil; + } + } + { + if (decodableStruct.endHour.HasValue()) { + self.endHour = [NSNumber numberWithUnsignedChar:decodableStruct.endHour.Value()]; + } else { + self.endHour = nil; + } + } + { + if (decodableStruct.endMinute.HasValue()) { + self.endMinute = [NSNumber numberWithUnsignedChar:decodableStruct.endMinute.Value()]; + } else { + self.endMinute = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams +@implementation MTRDoorLockClusterClearWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { - _percentOpen = @(0); + _weekDayIndex = @(0); + + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17909,9 +18149,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - other.percentOpen = self.percentOpen; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17920,20 +18161,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) +@implementation MTRDoorLockClusterClearWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + } + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17974,10 +18218,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBarrierControlClusterBarrierControlStopParams +@implementation MTRDoorLockClusterSetYearDayScheduleParams - (instancetype)init { if (self = [super init]) { + + _yearDayIndex = @(0); + + _userIndex = @(0); + + _localStartTime = @(0); + + _localEndTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17986,8 +18238,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; + auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17996,18 +18252,30 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _localStartTime, _localEndTime]; return descriptionString; } @end -@implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) +@implementation MTRDoorLockClusterSetYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; + } + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; + } + { + encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; + } + { + encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -18047,14 +18315,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterSetpointRaiseLowerParams +@implementation MTRDoorLockClusterGetYearDayScheduleParams - (instancetype)init { if (self = [super init]) { - _mode = @(0); + _yearDayIndex = @(0); - _amount = @(0); + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18063,10 +18331,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - other.mode = self.mode; - other.amount = self.amount; + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18075,23 +18343,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; amount:%@; >", NSStringFromClass([self class]), _mode, _amount]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRThermostatClusterSetpointRaiseLowerParams (InternalMethods) +@implementation MTRDoorLockClusterGetYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; } { - encodableStruct.amount = self.amount.charValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18132,18 +18400,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetWeeklyScheduleResponseParams +@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _numberOfTransitionsForSequence = @(0); + _yearDayIndex = @(0); - _dayOfWeekForSequence = @(0); + _userIndex = @(0); - _modeForSequence = @(0); + _status = @(0); - _transitions = [NSArray array]; + _localStartTime = nil; + + _localEndTime = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -18151,12 +18421,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; - other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; - other.modeForSequence = self.modeForSequence; - other.transitions = self.transitions; + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -18164,7 +18435,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _status, _localStartTime, _localEndTime]; return descriptionString; } @@ -18175,7 +18446,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -18210,45 +18481,31 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRThermostatClusterGetWeeklyScheduleResponseParams (InternalMethods) +@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &)decodableStruct { { - self.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; + self.yearDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.yearDayIndex]; } { - self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; } { - self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.transitions.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.transitions = array_0; + if (decodableStruct.localStartTime.HasValue()) { + self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; + } else { + self.localStartTime = nil; + } + } + { + if (decodableStruct.localEndTime.HasValue()) { + self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; + } else { + self.localEndTime = nil; } } return CHIP_NO_ERROR; @@ -18256,18 +18513,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost @end -@implementation MTRThermostatClusterSetWeeklyScheduleParams +@implementation MTRDoorLockClusterClearYearDayScheduleParams - (instancetype)init { if (self = [super init]) { - _numberOfTransitionsForSequence = @(0); - - _dayOfWeekForSequence = @(0); - - _modeForSequence = @(0); + _yearDayIndex = @(0); - _transitions = [NSArray array]; + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18276,12 +18529,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; - other.modeForSequence = self.modeForSequence; - other.transitions = self.transitions; + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18290,62 +18541,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRThermostatClusterSetWeeklyScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterClearYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; - } - { - encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); - } - { - encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; } { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(self.transitions.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.transitions.count; ++i_0) { - if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) self.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); - } else { - encodableStruct.transitions = ListType_0(); - } - } + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18386,14 +18598,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetWeeklyScheduleParams +@implementation MTRDoorLockClusterSetHolidayScheduleParams - (instancetype)init { if (self = [super init]) { - _daysToReturn = @(0); + _holidayIndex = @(0); - _modeToReturn = @(0); + _localStartTime = @(0); + + _localEndTime = @(0); + + _operatingMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18402,10 +18618,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - other.daysToReturn = self.daysToReturn; - other.modeToReturn = self.modeToReturn; + other.holidayIndex = self.holidayIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18414,23 +18632,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn, _modeToReturn]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _localStartTime, _localEndTime, _operatingMode]; return descriptionString; } @end -@implementation MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterSetHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; } { - encodableStruct.modeToReturn = static_cast>(self.modeToReturn.unsignedCharValue); + encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; + } + { + encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; + } + { + encodableStruct.operatingMode = static_cast>(self.operatingMode.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18471,10 +18695,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterClearWeeklyScheduleParams +@implementation MTRDoorLockClusterGetHolidayScheduleParams - (instancetype)init { if (self = [super init]) { + + _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18483,8 +18709,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18493,18 +18720,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; return descriptionString; } @end -@implementation MTRThermostatClusterClearWeeklyScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterGetHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -18544,117 +18774,129 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRFanControlClusterStepParams +@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _direction = @(0); + _holidayIndex = @(0); - _wrap = nil; + _status = @(0); - _lowestOff = nil; + _localStartTime = nil; + + _localEndTime = nil; + + _operatingMode = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRFanControlClusterStepParams alloc] init]; + auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; - other.direction = self.direction; - other.wrap = self.wrap; - other.lowestOff = self.lowestOff; + other.holidayIndex = self.holidayIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: direction:%@; wrap:%@; lowestOff:%@; >", NSStringFromClass([self class]), _direction, _wrap, _lowestOff]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _status, _localStartTime, _localEndTime, _operatingMode]; return descriptionString; } -@end - -@implementation MTRFanControlClusterStepParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::FanControl::Commands::Step::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); - } - { - if (self.wrap != nil) { - auto & definedValue_0 = encodableStruct.wrap.Emplace(); - definedValue_0 = self.wrap.boolValue; - } - } - { - if (self.lowestOff != nil) { - auto & definedValue_0 = encodableStruct.lowestOff.Emplace(); - definedValue_0 = self.lowestOff.boolValue; - } + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - 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)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.holidayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.holidayIndex]; + } + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.localStartTime.HasValue()) { + self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; + } else { + self.localStartTime = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.localEndTime.HasValue()) { + self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; + } else { + self.localEndTime = nil; } } - return decodedObj; + { + if (decodableStruct.operatingMode.HasValue()) { + self.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.operatingMode.Value())]; + } else { + self.operatingMode = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRColorControlClusterMoveToHueParams +@implementation MTRDoorLockClusterClearHolidayScheduleParams - (instancetype)init { if (self = [super init]) { - _hue = @(0); - - _direction = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); + _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18663,13 +18905,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; + auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - other.hue = self.hue; - other.direction = self.direction; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18678,32 +18916,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: hue:%@; direction:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _hue, _direction, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveToHueParams (InternalMethods) +@implementation MTRDoorLockClusterClearHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.hue = self.hue.unsignedCharValue; - } - { - encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18744,18 +18970,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveHueParams +@implementation MTRDoorLockClusterSetUserParams - (instancetype)init { if (self = [super init]) { - _moveMode = @(0); + _operationType = @(0); - _rate = @(0); + _userIndex = @(0); - _optionsMask = @(0); + _userName = nil; - _optionsOverride = @(0); + _userUniqueID = nil; + + _userStatus = nil; + + _userType = nil; + + _credentialRule = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18764,12 +18996,15 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; + auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.operationType = self.operationType; + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueID = self.userUniqueID; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18778,29 +19013,63 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; >", NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveHueParams (InternalMethods) +@implementation MTRDoorLockClusterSetUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveHue::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); } { - encodableStruct.rate = self.rate.unsignedCharValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + if (self.userName == nil) { + encodableStruct.userName.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userName.SetNonNull(); + nonNullValue_0 = AsCharSpan(self.userName); + } } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (self.userUniqueID == nil) { + encodableStruct.userUniqueID.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userUniqueID.SetNonNull(); + nonNullValue_0 = self.userUniqueID.unsignedIntValue; + } + } + { + if (self.userStatus == nil) { + encodableStruct.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); + } + } + { + if (self.userType == nil) { + encodableStruct.userType.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); + nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); + } + } + { + if (self.credentialRule == nil) { + encodableStruct.credentialRule.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.credentialRule.SetNonNull(); + nonNullValue_0 = static_cast>(self.credentialRule.unsignedCharValue); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18841,20 +19110,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterStepHueParams +@implementation MTRDoorLockClusterSetUserParams (Deprecated) + +- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId +{ + self.userUniqueID = userUniqueId; +} + +- (NSNumber * _Nullable)userUniqueId +{ + return self.userUniqueID; +} +@end +@implementation MTRDoorLockClusterGetUserParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18863,13 +19136,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterStepHueParams alloc] init]; + auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18878,32 +19147,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; return descriptionString; } @end -@implementation MTRColorControlClusterStepHueParams (InternalMethods) +@implementation MTRDoorLockClusterGetUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::StepHue::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); - } - { - encodableStruct.stepSize = self.stepSize.unsignedCharValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18944,115 +19201,215 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveToSaturationParams +@implementation MTRDoorLockClusterGetUserResponseParams - (instancetype)init { if (self = [super init]) { - _saturation = @(0); + _userIndex = @(0); - _transitionTime = @(0); + _userName = nil; - _optionsMask = @(0); + _userUniqueID = nil; - _optionsOverride = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} + _userStatus = nil; -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + _userType = nil; - other.saturation = self.saturation; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + _credentialRule = nil; + + _credentials = nil; + + _creatorFabricIndex = nil; + + _lastModifiedFabricIndex = nil; + + _nextUserIndex = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; + + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueID = self.userUniqueID; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.credentials = self.credentials; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextUserIndex = self.nextUserIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _saturation, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", NSStringFromClass([self class]), _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule, _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; return descriptionString; } +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + @end -@implementation MTRColorControlClusterMoveToSaturationParams (InternalMethods) +@implementation MTRDoorLockClusterGetUserResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &)decodableStruct { - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.saturation = self.saturation.unsignedCharValue; + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; } { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + if (decodableStruct.userName.IsNull()) { + self.userName = nil; + } else { + self.userName = AsString(decodableStruct.userName.Value()); + if (self.userName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + if (decodableStruct.userUniqueID.IsNull()) { + self.userUniqueID = nil; + } else { + self.userUniqueID = [NSNumber numberWithUnsignedInt:decodableStruct.userUniqueID.Value()]; + } } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (decodableStruct.userStatus.IsNull()) { + self.userStatus = nil; + } else { + self.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userStatus.Value())]; + } } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + { + if (decodableStruct.userType.IsNull()) { + self.userType = nil; + } else { + self.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userType.Value())]; + } } + { + if (decodableStruct.credentialRule.IsNull()) { + self.credentialRule = nil; + } else { + self.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.credentialRule.Value())]; + } + } + { + if (decodableStruct.credentials.IsNull()) { + self.credentials = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.credentials.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRDoorLockClusterCredentialStruct * newElement_1; + newElement_1 = [MTRDoorLockClusterCredentialStruct new]; + newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; + newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.credentials = array_1; + } + } + } + { + if (decodableStruct.creatorFabricIndex.IsNull()) { + self.creatorFabricIndex = nil; + } else { + self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; + } + } + { + if (decodableStruct.lastModifiedFabricIndex.IsNull()) { + self.lastModifiedFabricIndex = nil; + } else { + self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; + } + } + { + if (decodableStruct.nextUserIndex.IsNull()) { + self.nextUserIndex = nil; + } else { + self.nextUserIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextUserIndex.Value()]; + } + } + return CHIP_NO_ERROR; +} - 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)); +@end - ReturnErrorOnFailure(writer.Finalize(&buffer)); +@implementation MTRDoorLockClusterGetUserResponseParams (Deprecated) - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId +{ + self.userUniqueID = userUniqueId; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +- (NSNumber * _Nullable)userUniqueId { - 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; + return self.userUniqueID; } @end - -@implementation MTRColorControlClusterMoveSaturationParams +@implementation MTRDoorLockClusterClearUserParams - (instancetype)init { if (self = [super init]) { - _moveMode = @(0); - - _rate = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19061,12 +19418,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19075,29 +19429,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveSaturationParams (InternalMethods) +@implementation MTRDoorLockClusterClearUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); - } - { - encodableStruct.rate = self.rate.unsignedCharValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19138,20 +19483,22 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterStepSaturationParams +@implementation MTRDoorLockClusterSetCredentialParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); + _operationType = @(0); - _stepSize = @(0); + _credential = [MTRDoorLockClusterCredentialStruct new]; - _transitionTime = @(0); + _credentialData = [NSData data]; - _optionsMask = @(0); + _userIndex = nil; - _optionsOverride = @(0); + _userStatus = nil; + + _userType = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19160,14 +19507,15 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; + auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.operationType = self.operationType; + other.credential = self.credential; + other.credentialData = self.credentialData; + other.userIndex = self.userIndex; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; @@ -19175,32 +19523,51 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], _userIndex, _userStatus, _userType]; return descriptionString; } @end -@implementation MTRColorControlClusterStepSaturationParams (InternalMethods) +@implementation MTRDoorLockClusterSetCredentialParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type encodableStruct; ListFreer listFreer; { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); } { - encodableStruct.stepSize = self.stepSize.unsignedCharValue; + encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; } { - encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; + encodableStruct.credentialData = AsByteSpan(self.credentialData); } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + if (self.userIndex == nil) { + encodableStruct.userIndex.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userIndex.SetNonNull(); + nonNullValue_0 = self.userIndex.unsignedShortValue; + } } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (self.userStatus == nil) { + encodableStruct.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); + } + } + { + if (self.userType == nil) { + encodableStruct.userType.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); + nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19241,69 +19608,147 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveToHueAndSaturationParams +@implementation MTRDoorLockClusterSetCredentialResponseParams - (instancetype)init { if (self = [super init]) { - _hue = @(0); - - _saturation = @(0); - - _transitionTime = @(0); + _status = @(0); - _optionsMask = @(0); + _userIndex = nil; - _optionsOverride = @(0); + _nextCredentialIndex = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; - other.hue = self.hue; - other.saturation = self.saturation; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.status = self.status; + other.userIndex = self.userIndex; + other.nextCredentialIndex = self.nextCredentialIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: hue:%@; saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _hue, _saturation, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _status, _userIndex, _nextCredentialIndex]; return descriptionString; } +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + @end -@implementation MTRColorControlClusterMoveToHueAndSaturationParams (InternalMethods) +@implementation MTRDoorLockClusterSetCredentialResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &)decodableStruct { - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.hue = self.hue.unsignedCharValue; + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - encodableStruct.saturation = self.saturation.unsignedCharValue; + if (decodableStruct.userIndex.IsNull()) { + self.userIndex = nil; + } else { + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; + } } { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + if (decodableStruct.nextCredentialIndex.IsNull()) { + self.nextCredentialIndex = nil; + } else { + self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; + } } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRDoorLockClusterGetCredentialStatusParams +- (instancetype)init +{ + if (self = [super init]) { + + _credential = [MTRDoorLockClusterCredentialStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterGetCredentialStatusParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type encodableStruct; + ListFreer listFreer; { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19340,24 +19785,4464 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return decodedObj; + return decodedObj; +} +@end + +@implementation MTRDoorLockClusterGetCredentialStatusResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _credentialExists = @(0); + + _userIndex = nil; + + _creatorFabricIndex = nil; + + _lastModifiedFabricIndex = nil; + + _nextCredentialIndex = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + + other.credentialExists = self.credentialExists; + other.userIndex = self.userIndex; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, _nextCredentialIndex]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRDoorLockClusterGetCredentialStatusResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &)decodableStruct +{ + { + self.credentialExists = [NSNumber numberWithBool:decodableStruct.credentialExists]; + } + { + if (decodableStruct.userIndex.IsNull()) { + self.userIndex = nil; + } else { + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; + } + } + { + if (decodableStruct.creatorFabricIndex.IsNull()) { + self.creatorFabricIndex = nil; + } else { + self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; + } + } + { + if (decodableStruct.lastModifiedFabricIndex.IsNull()) { + self.lastModifiedFabricIndex = nil; + } else { + self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; + } + } + { + if (decodableStruct.nextCredentialIndex.IsNull()) { + self.nextCredentialIndex = nil; + } else { + self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRDoorLockClusterClearCredentialParams +- (instancetype)init +{ + if (self = [super init]) { + + _credential = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterClearCredentialParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type encodableStruct; + ListFreer listFreer; + { + if (self.credential == nil) { + encodableStruct.credential.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.credential.SetNonNull(); + nonNullValue_0.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + nonNullValue_0.credentialIndex = self.credential.credentialIndex.unsignedShortValue; + } + } + + 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 MTRDoorLockClusterUnboltDoorParams +- (instancetype)init +{ + if (self = [super init]) { + + _pinCode = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; + + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterUnboltDoorParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type encodableStruct; + ListFreer listFreer; + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } + } + + 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 MTRWindowCoveringClusterUpOrOpenParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterUpOrOpenParams 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 MTRWindowCoveringClusterUpOrOpenParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::UpOrOpen::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 MTRWindowCoveringClusterDownOrCloseParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterDownOrCloseParams 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 MTRWindowCoveringClusterDownOrCloseParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::DownOrClose::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 MTRWindowCoveringClusterStopMotionParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterStopMotionParams 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 MTRWindowCoveringClusterStopMotionParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::StopMotion::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 MTRWindowCoveringClusterGoToLiftValueParams +- (instancetype)init +{ + if (self = [super init]) { + + _liftValue = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + + other.liftValue = self.liftValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; + return descriptionString; +} + +@end + +@implementation MTRWindowCoveringClusterGoToLiftValueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.liftValue = self.liftValue.unsignedShortValue; + } + + 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 MTRWindowCoveringClusterGoToLiftPercentageParams +- (instancetype)init +{ + if (self = [super init]) { + + _liftPercent100thsValue = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + + other.liftPercent100thsValue = self.liftPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftPercent100thsValue:%@; >", NSStringFromClass([self class]), _liftPercent100thsValue]; + return descriptionString; +} + +@end + +@implementation MTRWindowCoveringClusterGoToLiftPercentageParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.liftPercent100thsValue = self.liftPercent100thsValue.unsignedShortValue; + } + + 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 MTRWindowCoveringClusterGoToTiltValueParams +- (instancetype)init +{ + if (self = [super init]) { + + _tiltValue = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + + other.tiltValue = self.tiltValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; + return descriptionString; +} + +@end + +@implementation MTRWindowCoveringClusterGoToTiltValueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.tiltValue = self.tiltValue.unsignedShortValue; + } + + 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 MTRWindowCoveringClusterGoToTiltPercentageParams +- (instancetype)init +{ + if (self = [super init]) { + + _tiltPercent100thsValue = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + + other.tiltPercent100thsValue = self.tiltPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltPercent100thsValue:%@; >", NSStringFromClass([self class]), _tiltPercent100thsValue]; + return descriptionString; +} + +@end + +@implementation MTRWindowCoveringClusterGoToTiltPercentageParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.tiltPercent100thsValue = self.tiltPercent100thsValue.unsignedShortValue; + } + + 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 MTRBarrierControlClusterBarrierControlGoToPercentParams +- (instancetype)init +{ + if (self = [super init]) { + + _percentOpen = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + + other.percentOpen = self.percentOpen; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; + return descriptionString; +} + +@end + +@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; + } + + 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 MTRBarrierControlClusterBarrierControlStopParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlStopParams 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 MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::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 MTRThermostatClusterSetpointRaiseLowerParams +- (instancetype)init +{ + if (self = [super init]) { + + _mode = @(0); + + _amount = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + + other.mode = self.mode; + other.amount = self.amount; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; amount:%@; >", NSStringFromClass([self class]), _mode, _amount]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterSetpointRaiseLowerParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); + } + { + encodableStruct.amount = self.amount.charValue; + } + + 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 MTRThermostatClusterGetWeeklyScheduleResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _numberOfTransitionsForSequence = @(0); + + _dayOfWeekForSequence = @(0); + + _modeForSequence = @(0); + + _transitions = [NSArray array]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRThermostatClusterGetWeeklyScheduleResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType &)decodableStruct +{ + { + self.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; + } + { + self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; + } + { + self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.transitions.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.transitions = array_0; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRThermostatClusterSetWeeklyScheduleParams +- (instancetype)init +{ + if (self = [super init]) { + + _numberOfTransitionsForSequence = @(0); + + _dayOfWeekForSequence = @(0); + + _modeForSequence = @(0); + + _transitions = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterSetWeeklyScheduleParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; + } + { + encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); + } + { + encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.transitions.count != 0) { + auto * listHolder_0 = new ListHolder(self.transitions.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.transitions.count; ++i_0) { + if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterWeeklyScheduleTransitionStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; + listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; + if (element_0.heatSetpoint == nil) { + listHolder_0->mList[i_0].heatSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); + nonNullValue_2 = element_0.heatSetpoint.shortValue; + } + if (element_0.coolSetpoint == nil) { + listHolder_0->mList[i_0].coolSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); + nonNullValue_2 = element_0.coolSetpoint.shortValue; + } + } + encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); + } else { + encodableStruct.transitions = ListType_0(); + } + } + } + + 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 MTRThermostatClusterGetWeeklyScheduleParams +- (instancetype)init +{ + if (self = [super init]) { + + _daysToReturn = @(0); + + _modeToReturn = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + + other.daysToReturn = self.daysToReturn; + other.modeToReturn = self.modeToReturn; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn, _modeToReturn]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); + } + { + encodableStruct.modeToReturn = static_cast>(self.modeToReturn.unsignedCharValue); + } + + 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 MTRThermostatClusterClearWeeklyScheduleParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterClearWeeklyScheduleParams 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 MTRThermostatClusterClearWeeklyScheduleParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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 MTRFanControlClusterStepParams +- (instancetype)init +{ + if (self = [super init]) { + + _direction = @(0); + + _wrap = nil; + + _lowestOff = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRFanControlClusterStepParams alloc] init]; + + other.direction = self.direction; + other.wrap = self.wrap; + other.lowestOff = self.lowestOff; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: direction:%@; wrap:%@; lowestOff:%@; >", NSStringFromClass([self class]), _direction, _wrap, _lowestOff]; + return descriptionString; +} + +@end + +@implementation MTRFanControlClusterStepParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::FanControl::Commands::Step::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); + } + { + if (self.wrap != nil) { + auto & definedValue_0 = encodableStruct.wrap.Emplace(); + definedValue_0 = self.wrap.boolValue; + } + } + { + if (self.lowestOff != nil) { + auto & definedValue_0 = encodableStruct.lowestOff.Emplace(); + definedValue_0 = self.lowestOff.boolValue; + } + } + + 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 MTRColorControlClusterMoveToHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _hue = @(0); + + _direction = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; + + other.hue = self.hue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: hue:%@; direction:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _hue, _direction, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveToHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.hue = self.hue.unsignedCharValue; + } + { + encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _moveMode = @(0); + + _rate = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + } + { + encodableStruct.rate = self.rate.unsignedCharValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterStepHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _stepMode = @(0); + + _stepSize = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterStepHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::StepHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + } + { + encodableStruct.stepSize = self.stepSize.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveToSaturationParams +- (instancetype)init +{ + if (self = [super init]) { + + _saturation = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _saturation, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveToSaturationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.saturation = self.saturation.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveSaturationParams +- (instancetype)init +{ + if (self = [super init]) { + + _moveMode = @(0); + + _rate = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveSaturationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + } + { + encodableStruct.rate = self.rate.unsignedCharValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterStepSaturationParams +- (instancetype)init +{ + if (self = [super init]) { + + _stepMode = @(0); + + _stepSize = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterStepSaturationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + } + { + encodableStruct.stepSize = self.stepSize.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveToHueAndSaturationParams +- (instancetype)init +{ + if (self = [super init]) { + + _hue = @(0); + + _saturation = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + + other.hue = self.hue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: hue:%@; saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _hue, _saturation, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveToHueAndSaturationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.hue = self.hue.unsignedCharValue; + } + { + encodableStruct.saturation = self.saturation.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveToColorParams +- (instancetype)init +{ + if (self = [super init]) { + + _colorX = @(0); + + _colorY = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; + + other.colorX = self.colorX; + other.colorY = self.colorY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: colorX:%@; colorY:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _colorX, _colorY, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveToColorParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.colorX = self.colorX.unsignedShortValue; + } + { + encodableStruct.colorY = self.colorY.unsignedShortValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveColorParams +- (instancetype)init +{ + if (self = [super init]) { + + _rateX = @(0); + + _rateY = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; + + other.rateX = self.rateX; + other.rateY = self.rateY; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rateX:%@; rateY:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _rateX, _rateY, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveColorParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveColor::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.rateX = self.rateX.shortValue; + } + { + encodableStruct.rateY = self.rateY.shortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterStepColorParams +- (instancetype)init +{ + if (self = [super init]) { + + _stepX = @(0); + + _stepY = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterStepColorParams alloc] init]; + + other.stepX = self.stepX; + other.stepY = self.stepY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepX:%@; stepY:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepX, _stepY, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterStepColorParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::StepColor::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.stepX = self.stepX.shortValue; + } + { + encodableStruct.stepY = self.stepY.shortValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveToColorTemperatureParams +- (instancetype)init +{ + if (self = [super init]) { + + _colorTemperatureMireds = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + + other.colorTemperatureMireds = self.colorTemperatureMireds; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: colorTemperatureMireds:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _colorTemperatureMireds, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveToColorTemperatureParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.colorTemperatureMireds = self.colorTemperatureMireds.unsignedShortValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) + +- (void)setColorTemperature:(NSNumber * _Nonnull)colorTemperature +{ + self.colorTemperatureMireds = colorTemperature; +} + +- (NSNumber * _Nonnull)colorTemperature +{ + return self.colorTemperatureMireds; +} +@end +@implementation MTRColorControlClusterEnhancedMoveToHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _enhancedHue = @(0); + + _direction = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enhancedHue:%@; direction:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _enhancedHue, _direction, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterEnhancedMoveToHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.enhancedHue = self.enhancedHue.unsignedShortValue; + } + { + encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterEnhancedMoveHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _moveMode = @(0); + + _rate = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterEnhancedMoveHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + } + { + encodableStruct.rate = self.rate.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterEnhancedStepHueParams +- (instancetype)init +{ + if (self = [super init]) { + + _stepMode = @(0); + + _stepSize = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterEnhancedStepHueParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + } + { + encodableStruct.stepSize = self.stepSize.unsignedShortValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterEnhancedMoveToHueAndSaturationParams +- (instancetype)init +{ + if (self = [super init]) { + + _enhancedHue = @(0); + + _saturation = @(0); + + _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enhancedHue:%@; saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _enhancedHue, _saturation, _transitionTime, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterEnhancedMoveToHueAndSaturationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.enhancedHue = self.enhancedHue.unsignedShortValue; + } + { + encodableStruct.saturation = self.saturation.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterColorLoopSetParams +- (instancetype)init +{ + if (self = [super init]) { + + _updateFlags = @(0); + + _action = @(0); + + _direction = @(0); + + _time = @(0); + + _startHue = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + + other.updateFlags = self.updateFlags; + other.action = self.action; + other.direction = self.direction; + other.time = self.time; + other.startHue = self.startHue; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateFlags:%@; action:%@; direction:%@; time:%@; startHue:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _updateFlags, _action, _direction, _time, _startHue, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterColorLoopSetParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.updateFlags = static_cast>(self.updateFlags.unsignedCharValue); + } + { + encodableStruct.action = static_cast>(self.action.unsignedCharValue); + } + { + encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); + } + { + encodableStruct.time = self.time.unsignedShortValue; + } + { + encodableStruct.startHue = self.startHue.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterStopMoveStepParams +- (instancetype)init +{ + if (self = [super init]) { + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterStopMoveStepParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterMoveColorTemperatureParams +- (instancetype)init +{ + if (self = [super init]) { + + _moveMode = @(0); + + _rate = @(0); + + _colorTemperatureMinimumMireds = @(0); + + _colorTemperatureMaximumMireds = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; colorTemperatureMinimumMireds:%@; colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterMoveColorTemperatureParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + } + { + encodableStruct.rate = self.rate.unsignedShortValue; + } + { + encodableStruct.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds.unsignedShortValue; + } + { + encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRColorControlClusterStepColorTemperatureParams +- (instancetype)init +{ + if (self = [super init]) { + + _stepMode = @(0); + + _stepSize = @(0); + + _transitionTime = @(0); + + _colorTemperatureMinimumMireds = @(0); + + _colorTemperatureMaximumMireds = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; colorTemperatureMinimumMireds:%@; colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; + return descriptionString; +} + +@end + +@implementation MTRColorControlClusterStepColorTemperatureParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + } + { + encodableStruct.stepSize = self.stepSize.unsignedShortValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds.unsignedShortValue; + } + { + encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; + } + { + encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + } + { + encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + } + + 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 MTRChannelClusterChangeChannelParams +- (instancetype)init +{ + if (self = [super init]) { + + _match = @""; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; + + other.match = self.match; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: match:%@; >", NSStringFromClass([self class]), _match]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterChangeChannelParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Channel::Commands::ChangeChannel::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.match = AsCharSpan(self.match); + } + + 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 MTRChannelClusterChangeChannelResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _data = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, _data]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRChannelClusterChangeChannelResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.data.HasValue()) { + self.data = AsString(decodableStruct.data.Value()); + if (self.data == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.data = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRChannelClusterChangeChannelByNumberParams +- (instancetype)init +{ + if (self = [super init]) { + + _majorNumber = @(0); + + _minorNumber = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterChangeChannelByNumberParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.majorNumber = self.majorNumber.unsignedShortValue; + } + { + encodableStruct.minorNumber = self.minorNumber.unsignedShortValue; + } + + 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 MTRChannelClusterSkipChannelParams +- (instancetype)init +{ + if (self = [super init]) { + + _count = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; + + other.count = self.count; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: count:%@; >", NSStringFromClass([self class]), _count]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterSkipChannelParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Channel::Commands::SkipChannel::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.count = self.count.shortValue; + } + + 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 MTRChannelClusterGetProgramGuideParams +- (instancetype)init +{ + if (self = [super init]) { + + _startTime = nil; + + _endTime = nil; + + _channelList = nil; + + _pageToken = nil; + + _recordingFlag = nil; + + _externalIDList = nil; + + _data = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterGetProgramGuideParams alloc] init]; + + other.startTime = self.startTime; + other.endTime = self.endTime; + other.channelList = self.channelList; + other.pageToken = self.pageToken; + other.recordingFlag = self.recordingFlag; + other.externalIDList = self.externalIDList; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; endTime:%@; channelList:%@; pageToken:%@; recordingFlag:%@; externalIDList:%@; data:%@; >", NSStringFromClass([self class]), _startTime, _endTime, _channelList, _pageToken, _recordingFlag, _externalIDList, [_data base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterGetProgramGuideParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Channel::Commands::GetProgramGuide::Type encodableStruct; + ListFreer listFreer; + { + if (self.startTime != nil) { + auto & definedValue_0 = encodableStruct.startTime.Emplace(); + definedValue_0 = self.startTime.unsignedIntValue; + } + } + { + if (self.endTime != nil) { + auto & definedValue_0 = encodableStruct.endTime.Emplace(); + definedValue_0 = self.endTime.unsignedIntValue; + } + } + { + if (self.channelList != nil) { + auto & definedValue_0 = encodableStruct.channelList.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.channelList.count != 0) { + auto * listHolder_1 = new ListHolder(self.channelList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.channelList.count; ++i_1) { + if (![self.channelList[i_1] isKindOfClass:[MTRChannelClusterChannelInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRChannelClusterChannelInfoStruct *) self.channelList[i_1]; + listHolder_1->mList[i_1].majorNumber = element_1.majorNumber.unsignedShortValue; + listHolder_1->mList[i_1].minorNumber = element_1.minorNumber.unsignedShortValue; + if (element_1.name != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].name.Emplace(); + definedValue_3 = AsCharSpan(element_1.name); + } + if (element_1.callSign != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].callSign.Emplace(); + definedValue_3 = AsCharSpan(element_1.callSign); + } + if (element_1.affiliateCallSign != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].affiliateCallSign.Emplace(); + definedValue_3 = AsCharSpan(element_1.affiliateCallSign); + } + if (element_1.identifier != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].identifier.Emplace(); + definedValue_3 = AsCharSpan(element_1.identifier); + } + if (element_1.type != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].type.Emplace(); + definedValue_3 = static_cast>(element_1.type.unsignedCharValue); + } + } + definedValue_0 = ListType_1(listHolder_1->mList, self.channelList.count); + } else { + definedValue_0 = ListType_1(); + } + } + } + } + { + if (self.pageToken != nil) { + auto & definedValue_0 = encodableStruct.pageToken.Emplace(); + if (self.pageToken.limit != nil) { + auto & definedValue_2 = definedValue_0.limit.Emplace(); + definedValue_2 = self.pageToken.limit.unsignedShortValue; + } + if (self.pageToken.after != nil) { + auto & definedValue_2 = definedValue_0.after.Emplace(); + definedValue_2 = AsCharSpan(self.pageToken.after); + } + if (self.pageToken.before != nil) { + auto & definedValue_2 = definedValue_0.before.Emplace(); + definedValue_2 = AsCharSpan(self.pageToken.before); + } + } + } + { + if (self.recordingFlag != nil) { + auto & definedValue_0 = encodableStruct.recordingFlag.Emplace(); + definedValue_0 = static_cast>(self.recordingFlag.unsignedIntValue); + } + } + { + if (self.externalIDList != nil) { + auto & definedValue_0 = encodableStruct.externalIDList.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.externalIDList.count != 0) { + auto * listHolder_1 = new ListHolder(self.externalIDList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.externalIDList.count; ++i_1) { + if (![self.externalIDList[i_1] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_1]; + listHolder_1->mList[i_1].name = AsCharSpan(element_1.name); + listHolder_1->mList[i_1].value = AsCharSpan(element_1.value); + } + definedValue_0 = ListType_1(listHolder_1->mList, self.externalIDList.count); + } else { + definedValue_0 = ListType_1(); + } + } + } + } + { + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsByteSpan(self.data); + } + } + + 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 MTRChannelClusterProgramGuideResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _channelPagingStruct = @(0); + + _programList = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRChannelClusterProgramGuideResponseParams alloc] init]; + + other.channelPagingStruct = self.channelPagingStruct; + other.programList = self.programList; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: channelPagingStruct:%@; programList:%@; >", NSStringFromClass([self class]), _channelPagingStruct, _programList]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRChannelClusterProgramGuideResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType &)decodableStruct +{ + { + self.channelPagingStruct = [NSNumber numberWithShort:decodableStruct.channelPagingStruct]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.programList.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRChannelClusterProgramStruct * newElement_0; + newElement_0 = [MTRChannelClusterProgramStruct new]; + newElement_0.identifier = AsString(entry_0.identifier); + if (newElement_0.identifier == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_0.channel = [MTRChannelClusterChannelInfoStruct new]; + newElement_0.channel.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.channel.majorNumber]; + newElement_0.channel.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.channel.minorNumber]; + if (entry_0.channel.name.HasValue()) { + newElement_0.channel.name = AsString(entry_0.channel.name.Value()); + if (newElement_0.channel.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.channel.name = nil; + } + if (entry_0.channel.callSign.HasValue()) { + newElement_0.channel.callSign = AsString(entry_0.channel.callSign.Value()); + if (newElement_0.channel.callSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.channel.callSign = nil; + } + if (entry_0.channel.affiliateCallSign.HasValue()) { + newElement_0.channel.affiliateCallSign = AsString(entry_0.channel.affiliateCallSign.Value()); + if (newElement_0.channel.affiliateCallSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.channel.affiliateCallSign = nil; + } + if (entry_0.channel.identifier.HasValue()) { + newElement_0.channel.identifier = AsString(entry_0.channel.identifier.Value()); + if (newElement_0.channel.identifier == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.channel.identifier = nil; + } + if (entry_0.channel.type.HasValue()) { + newElement_0.channel.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.channel.type.Value())]; + } else { + newElement_0.channel.type = nil; + } + newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime]; + newElement_0.endTime = [NSNumber numberWithUnsignedInt:entry_0.endTime]; + newElement_0.title = AsString(entry_0.title); + if (newElement_0.title == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + if (entry_0.subtitle.HasValue()) { + newElement_0.subtitle = AsString(entry_0.subtitle.Value()); + if (newElement_0.subtitle == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.subtitle = nil; + } + if (entry_0.description.HasValue()) { + newElement_0.descriptionString = AsString(entry_0.description.Value()); + if (newElement_0.descriptionString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.descriptionString = nil; + } + if (entry_0.audioLanguages.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.audioLanguages.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSString * newElement_3; + newElement_3 = AsString(entry_3); + if (newElement_3 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.audioLanguages = array_3; + } + } else { + newElement_0.audioLanguages = nil; + } + if (entry_0.ratings.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.ratings.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSString * newElement_3; + newElement_3 = AsString(entry_3); + if (newElement_3 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.ratings = array_3; + } + } else { + newElement_0.ratings = nil; + } + if (entry_0.thumbnailUrl.HasValue()) { + newElement_0.thumbnailUrl = AsString(entry_0.thumbnailUrl.Value()); + if (newElement_0.thumbnailUrl == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.thumbnailUrl = nil; + } + if (entry_0.posterArtUrl.HasValue()) { + newElement_0.posterArtUrl = AsString(entry_0.posterArtUrl.Value()); + if (newElement_0.posterArtUrl == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.posterArtUrl = nil; + } + if (entry_0.dvbiUrl.HasValue()) { + newElement_0.dvbiUrl = AsString(entry_0.dvbiUrl.Value()); + if (newElement_0.dvbiUrl == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.dvbiUrl = nil; + } + if (entry_0.releaseDate.HasValue()) { + newElement_0.releaseDate = AsString(entry_0.releaseDate.Value()); + if (newElement_0.releaseDate == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.releaseDate = nil; + } + if (entry_0.parentalGuidanceText.HasValue()) { + newElement_0.parentalGuidanceText = AsString(entry_0.parentalGuidanceText.Value()); + if (newElement_0.parentalGuidanceText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.parentalGuidanceText = nil; + } + if (entry_0.recordingFlag.HasValue()) { + newElement_0.recordingFlag = [NSNumber numberWithUnsignedInt:entry_0.recordingFlag.Value().Raw()]; + } else { + newElement_0.recordingFlag = nil; + } + if (entry_0.seriesInfo.HasValue()) { + if (entry_0.seriesInfo.Value().IsNull()) { + newElement_0.seriesInfo = nil; + } else { + newElement_0.seriesInfo = [MTRChannelClusterSeriesInfoStruct new]; + newElement_0.seriesInfo.season = AsString(entry_0.seriesInfo.Value().Value().season); + if (newElement_0.seriesInfo.season == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_0.seriesInfo.episode = AsString(entry_0.seriesInfo.Value().Value().episode); + if (newElement_0.seriesInfo.episode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } + } else { + newElement_0.seriesInfo = nil; + } + if (entry_0.categoryList.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.categoryList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRChannelClusterProgramCategoryStruct * newElement_3; + newElement_3 = [MTRChannelClusterProgramCategoryStruct new]; + newElement_3.category = AsString(entry_3.category); + if (newElement_3.category == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + if (entry_3.subCategory.HasValue()) { + newElement_3.subCategory = AsString(entry_3.subCategory.Value()); + if (newElement_3.subCategory == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_3.subCategory = nil; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.categoryList = array_3; + } + } else { + newElement_0.categoryList = nil; + } + if (entry_0.castList.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.castList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRChannelClusterProgramCastStruct * newElement_3; + newElement_3 = [MTRChannelClusterProgramCastStruct new]; + newElement_3.name = AsString(entry_3.name); + if (newElement_3.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_3.role = AsString(entry_3.role); + if (newElement_3.role == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.castList = array_3; + } + } else { + newElement_0.castList = nil; + } + if (entry_0.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.externalIDList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRChannelClusterProgramCastStruct * newElement_3; + newElement_3 = [MTRChannelClusterProgramCastStruct new]; + newElement_3.name = AsString(entry_3.name); + if (newElement_3.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_3.role = AsString(entry_3.role); + if (newElement_3.role == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.externalIDList = array_3; + } + } else { + newElement_0.externalIDList = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.programList = array_0; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRColorControlClusterMoveToColorParams +@implementation MTRChannelClusterRecordProgramParams - (instancetype)init { if (self = [super init]) { - _colorX = @(0); - - _colorY = @(0); + _programIdentifier = @""; - _transitionTime = @(0); + _shouldRecordSeries = @(0); - _optionsMask = @(0); + _externalIDList = [NSArray array]; - _optionsOverride = @(0); + _data = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19366,13 +24251,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; + auto other = [[MTRChannelClusterRecordProgramParams alloc] init]; - other.colorX = self.colorX; - other.colorY = self.colorY; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.programIdentifier = self.programIdentifier; + other.shouldRecordSeries = self.shouldRecordSeries; + other.externalIDList = self.externalIDList; + other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19381,32 +24265,51 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: colorX:%@; colorY:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _colorX, _colorY, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: programIdentifier:%@; shouldRecordSeries:%@; externalIDList:%@; data:%@; >", NSStringFromClass([self class]), _programIdentifier, _shouldRecordSeries, _externalIDList, [_data base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveToColorParams (InternalMethods) +@implementation MTRChannelClusterRecordProgramParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type encodableStruct; + chip::app::Clusters::Channel::Commands::RecordProgram::Type encodableStruct; ListFreer listFreer; { - encodableStruct.colorX = self.colorX.unsignedShortValue; - } - { - encodableStruct.colorY = self.colorY.unsignedShortValue; + encodableStruct.programIdentifier = AsCharSpan(self.programIdentifier); } { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + encodableStruct.shouldRecordSeries = self.shouldRecordSeries.boolValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.externalIDList.count != 0) { + auto * listHolder_0 = new ListHolder(self.externalIDList.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.externalIDList.count; ++i_0) { + if (![self.externalIDList[i_0] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_0]; + listHolder_0->mList[i_0].name = AsCharSpan(element_0.name); + listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); + } + encodableStruct.externalIDList = ListType_0(listHolder_0->mList, self.externalIDList.count); + } else { + encodableStruct.externalIDList = ListType_0(); + } + } } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.data = AsByteSpan(self.data); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19447,18 +24350,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveColorParams +@implementation MTRChannelClusterCancelRecordProgramParams - (instancetype)init { if (self = [super init]) { - _rateX = @(0); + _programIdentifier = @""; - _rateY = @(0); + _shouldRecordSeries = @(0); - _optionsMask = @(0); + _externalIDList = [NSArray array]; - _optionsOverride = @(0); + _data = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19467,12 +24370,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; + auto other = [[MTRChannelClusterCancelRecordProgramParams alloc] init]; - other.rateX = self.rateX; - other.rateY = self.rateY; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.programIdentifier = self.programIdentifier; + other.shouldRecordSeries = self.shouldRecordSeries; + other.externalIDList = self.externalIDList; + other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19481,29 +24384,51 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: rateX:%@; rateY:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _rateX, _rateY, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: programIdentifier:%@; shouldRecordSeries:%@; externalIDList:%@; data:%@; >", NSStringFromClass([self class]), _programIdentifier, _shouldRecordSeries, _externalIDList, [_data base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveColorParams (InternalMethods) +@implementation MTRChannelClusterCancelRecordProgramParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveColor::Type encodableStruct; + chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type encodableStruct; ListFreer listFreer; { - encodableStruct.rateX = self.rateX.shortValue; + encodableStruct.programIdentifier = AsCharSpan(self.programIdentifier); } { - encodableStruct.rateY = self.rateY.shortValue; + encodableStruct.shouldRecordSeries = self.shouldRecordSeries.boolValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.externalIDList.count != 0) { + auto * listHolder_0 = new ListHolder(self.externalIDList.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.externalIDList.count; ++i_0) { + if (![self.externalIDList[i_0] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_0]; + listHolder_0->mList[i_0].name = AsCharSpan(element_0.name); + listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); + } + encodableStruct.externalIDList = ListType_0(listHolder_0->mList, self.externalIDList.count); + } else { + encodableStruct.externalIDList = ListType_0(); + } + } } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.data = AsByteSpan(self.data); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19544,20 +24469,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterStepColorParams +@implementation MTRTargetNavigatorClusterNavigateTargetParams - (instancetype)init { if (self = [super init]) { - _stepX = @(0); - - _stepY = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); + _target = @(0); - _optionsOverride = @(0); + _data = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19566,13 +24485,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterStepColorParams alloc] init]; + auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - other.stepX = self.stepX; - other.stepY = self.stepY; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.target = self.target; + other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19581,32 +24497,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepX:%@; stepY:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepX, _stepY, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: target:%@; data:%@; >", NSStringFromClass([self class]), _target, _data]; return descriptionString; } @end -@implementation MTRColorControlClusterStepColorParams (InternalMethods) +@implementation MTRTargetNavigatorClusterNavigateTargetParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::StepColor::Type encodableStruct; + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type encodableStruct; ListFreer listFreer; { - encodableStruct.stepX = self.stepX.shortValue; - } - { - encodableStruct.stepY = self.stepY.shortValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.target = self.target.unsignedCharValue; } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsCharSpan(self.data); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19647,18 +24557,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveToColorTemperatureParams +@implementation MTRTargetNavigatorClusterNavigateTargetResponseParams - (instancetype)init { if (self = [super init]) { - _colorTemperatureMireds = @(0); + _status = @(0); - _transitionTime = @(0); + _data = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} - _optionsMask = @(0); +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; - _optionsOverride = @(0); + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, _data]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRTargetNavigatorClusterNavigateTargetResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.data.HasValue()) { + self.data = AsString(decodableStruct.data.Value()); + if (self.data == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.data = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRMediaPlaybackClusterPlayParams +- (instancetype)init +{ + if (self = [super init]) { _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19667,12 +24664,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; - other.colorTemperatureMireds = self.colorTemperatureMireds; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19681,30 +24674,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: colorTemperatureMireds:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _colorTemperatureMireds, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveToColorTemperatureParams (InternalMethods) +@implementation MTRMediaPlaybackClusterPlayParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Play::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.colorTemperatureMireds = self.colorTemperatureMireds.unsignedShortValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -19737,39 +24718,17 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); if (decodedObj == nil) { if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) - -- (void)setColorTemperature:(NSNumber * _Nonnull)colorTemperature -{ - self.colorTemperatureMireds = colorTemperature; -} - -- (NSNumber * _Nonnull)colorTemperature -{ - return self.colorTemperatureMireds; + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRColorControlClusterEnhancedMoveToHueParams + +@implementation MTRMediaPlaybackClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _enhancedHue = @(0); - - _direction = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19778,13 +24737,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; - other.enhancedHue = self.enhancedHue; - other.direction = self.direction; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19793,33 +24747,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: enhancedHue:%@; direction:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _enhancedHue, _direction, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterEnhancedMoveToHueParams (InternalMethods) +@implementation MTRMediaPlaybackClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.enhancedHue = self.enhancedHue.unsignedShortValue; - } - { - encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -19859,18 +24798,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterEnhancedMoveHueParams +@implementation MTRMediaPlaybackClusterStopParams - (instancetype)init { if (self = [super init]) { - - _moveMode = @(0); - - _rate = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19879,12 +24810,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterStopParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19893,30 +24820,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterEnhancedMoveHueParams (InternalMethods) +@implementation MTRMediaPlaybackClusterStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Stop::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); - } - { - encodableStruct.rate = self.rate.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -19956,20 +24871,15 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterEnhancedStepHueParams +@implementation MTRMediaPlaybackClusterStopPlaybackParams + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTRMediaPlaybackClusterStartOverParams - (instancetype)init { if (self = [super init]) { - - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19978,13 +24888,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19993,33 +24898,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterEnhancedStepHueParams (InternalMethods) +@implementation MTRMediaPlaybackClusterStartOverParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::StartOver::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); - } - { - encodableStruct.stepSize = self.stepSize.unsignedShortValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20059,20 +24949,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterEnhancedMoveToHueAndSaturationParams +@implementation MTRMediaPlaybackClusterPreviousParams - (instancetype)init { if (self = [super init]) { - - _enhancedHue = @(0); - - _saturation = @(0); - - _transitionTime = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20081,13 +24961,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; - other.enhancedHue = self.enhancedHue; - other.saturation = self.saturation; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20096,33 +24971,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: enhancedHue:%@; saturation:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _enhancedHue, _saturation, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterEnhancedMoveToHueAndSaturationParams (InternalMethods) +@implementation MTRMediaPlaybackClusterPreviousParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Previous::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.enhancedHue = self.enhancedHue.unsignedShortValue; - } - { - encodableStruct.saturation = self.saturation.unsignedCharValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20162,24 +25022,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterColorLoopSetParams +@implementation MTRMediaPlaybackClusterNextParams - (instancetype)init { if (self = [super init]) { - - _updateFlags = @(0); - - _action = @(0); - - _direction = @(0); - - _time = @(0); - - _startHue = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20188,15 +25034,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; - other.updateFlags = self.updateFlags; - other.action = self.action; - other.direction = self.direction; - other.time = self.time; - other.startHue = self.startHue; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20205,39 +25044,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateFlags:%@; action:%@; direction:%@; time:%@; startHue:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _updateFlags, _action, _direction, _time, _startHue, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRColorControlClusterColorLoopSetParams (InternalMethods) +@implementation MTRMediaPlaybackClusterNextParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Next::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.updateFlags = static_cast>(self.updateFlags.unsignedCharValue); - } - { - encodableStruct.action = static_cast>(self.action.unsignedCharValue); - } - { - encodableStruct.direction = static_cast>(self.direction.unsignedCharValue); - } - { - encodableStruct.time = self.time.unsignedShortValue; - } - { - encodableStruct.startHue = self.startHue.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20277,14 +25095,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterStopMoveStepParams +@implementation MTRMediaPlaybackClusterRewindParams - (instancetype)init { if (self = [super init]) { - _optionsMask = @(0); - - _optionsOverride = @(0); + _audioAdvanceUnmuted = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20293,10 +25109,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.audioAdvanceUnmuted = self.audioAdvanceUnmuted; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20305,23 +25120,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioAdvanceUnmuted:%@; >", NSStringFromClass([self class]), _audioAdvanceUnmuted]; return descriptionString; } @end -@implementation MTRColorControlClusterStopMoveStepParams (InternalMethods) +@implementation MTRMediaPlaybackClusterRewindParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (self.audioAdvanceUnmuted != nil) { + auto & definedValue_0 = encodableStruct.audioAdvanceUnmuted.Emplace(); + definedValue_0 = self.audioAdvanceUnmuted.boolValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20362,22 +25177,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterMoveColorTemperatureParams +@implementation MTRMediaPlaybackClusterFastForwardParams - (instancetype)init { if (self = [super init]) { - _moveMode = @(0); - - _rate = @(0); - - _colorTemperatureMinimumMireds = @(0); - - _colorTemperatureMaximumMireds = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); + _audioAdvanceUnmuted = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20386,14 +25191,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; - other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.audioAdvanceUnmuted = self.audioAdvanceUnmuted; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20402,35 +25202,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; colorTemperatureMinimumMireds:%@; colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioAdvanceUnmuted:%@; >", NSStringFromClass([self class]), _audioAdvanceUnmuted]; return descriptionString; } @end -@implementation MTRColorControlClusterMoveColorTemperatureParams (InternalMethods) +@implementation MTRMediaPlaybackClusterFastForwardParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type encodableStruct; ListFreer listFreer; { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); - } - { - encodableStruct.rate = self.rate.unsignedShortValue; - } - { - encodableStruct.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds.unsignedShortValue; - } - { - encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + if (self.audioAdvanceUnmuted != nil) { + auto & definedValue_0 = encodableStruct.audioAdvanceUnmuted.Emplace(); + definedValue_0 = self.audioAdvanceUnmuted.boolValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20471,24 +25259,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRColorControlClusterStepColorTemperatureParams +@implementation MTRMediaPlaybackClusterSkipForwardParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = @(0); - - _colorTemperatureMinimumMireds = @(0); - - _colorTemperatureMaximumMireds = @(0); - - _optionsMask = @(0); - - _optionsOverride = @(0); + _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20497,15 +25273,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; - other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20514,38 +25284,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; colorTemperatureMinimumMireds:%@; colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; return descriptionString; } @end -@implementation MTRColorControlClusterStepColorTemperatureParams (InternalMethods) +@implementation MTRMediaPlaybackClusterSkipForwardParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type encodableStruct; ListFreer listFreer; { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); - } - { - encodableStruct.stepSize = self.stepSize.unsignedShortValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds.unsignedShortValue; - } - { - encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; - } - { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; - } - { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.deltaPositionMilliseconds = self.deltaPositionMilliseconds.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20586,12 +25338,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRChannelClusterChangeChannelParams +@implementation MTRMediaPlaybackClusterSkipBackwardParams - (instancetype)init { if (self = [super init]) { - _match = @""; + _deltaPositionMilliseconds = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20600,9 +25352,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - other.match = self.match; + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20611,20 +25363,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: match:%@; >", NSStringFromClass([self class]), _match]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; return descriptionString; } @end -@implementation MTRChannelClusterChangeChannelParams (InternalMethods) +@implementation MTRMediaPlaybackClusterSkipBackwardParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Channel::Commands::ChangeChannel::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type encodableStruct; ListFreer listFreer; { - encodableStruct.match = AsCharSpan(self.match); + encodableStruct.deltaPositionMilliseconds = self.deltaPositionMilliseconds.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20665,7 +25417,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRChannelClusterChangeChannelResponseParams +@implementation MTRMediaPlaybackClusterPlaybackResponseParams - (instancetype)init { if (self = [super init]) { @@ -20680,7 +25432,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; other.status = self.status; other.data = self.data; @@ -20702,7 +25454,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; + using DecodableType = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -20737,9 +25489,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRChannelClusterChangeChannelResponseParams (InternalMethods) +@implementation MTRMediaPlaybackClusterPlaybackResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; @@ -20760,14 +25512,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel: @end -@implementation MTRChannelClusterChangeChannelByNumberParams +@implementation MTRMediaPlaybackClusterSeekParams - (instancetype)init { if (self = [super init]) { - _majorNumber = @(0); - - _minorNumber = @(0); + _position = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20776,10 +25526,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - other.majorNumber = self.majorNumber; - other.minorNumber = self.minorNumber; + other.position = self.position; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20788,23 +25537,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; >", NSStringFromClass([self class]), _position]; return descriptionString; } @end -@implementation MTRChannelClusterChangeChannelByNumberParams (InternalMethods) +@implementation MTRMediaPlaybackClusterSeekParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::Seek::Type encodableStruct; ListFreer listFreer; { - encodableStruct.majorNumber = self.majorNumber.unsignedShortValue; - } - { - encodableStruct.minorNumber = self.minorNumber.unsignedShortValue; + encodableStruct.position = self.position.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20845,12 +25591,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRChannelClusterSkipChannelParams +@implementation MTRMediaPlaybackClusterActivateAudioTrackParams - (instancetype)init { if (self = [super init]) { - _count = @(0); + _trackID = @""; + + _audioOutputIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20859,9 +25607,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterActivateAudioTrackParams alloc] init]; - other.count = self.count; + other.trackID = self.trackID; + other.audioOutputIndex = self.audioOutputIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20870,20 +25619,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: count:%@; >", NSStringFromClass([self class]), _count]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: trackID:%@; audioOutputIndex:%@; >", NSStringFromClass([self class]), _trackID, _audioOutputIndex]; return descriptionString; } @end -@implementation MTRChannelClusterSkipChannelParams (InternalMethods) +@implementation MTRMediaPlaybackClusterActivateAudioTrackParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Channel::Commands::SkipChannel::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Type encodableStruct; ListFreer listFreer; { - encodableStruct.count = self.count.shortValue; + encodableStruct.trackID = AsCharSpan(self.trackID); + } + { + encodableStruct.audioOutputIndex = self.audioOutputIndex.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20924,14 +25676,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTargetNavigatorClusterNavigateTargetParams +@implementation MTRMediaPlaybackClusterActivateTextTrackParams - (instancetype)init { if (self = [super init]) { - _target = @(0); - - _data = nil; + _trackID = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20940,10 +25690,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterActivateTextTrackParams alloc] init]; - other.target = self.target; - other.data = self.data; + other.trackID = self.trackID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20952,26 +25701,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: target:%@; data:%@; >", NSStringFromClass([self class]), _target, _data]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: trackID:%@; >", NSStringFromClass([self class]), _trackID]; return descriptionString; } @end -@implementation MTRTargetNavigatorClusterNavigateTargetParams (InternalMethods) +@implementation MTRMediaPlaybackClusterActivateTextTrackParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type encodableStruct; + chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Type encodableStruct; ListFreer listFreer; { - encodableStruct.target = self.target.unsignedCharValue; - } - { - if (self.data != nil) { - auto & definedValue_0 = encodableStruct.data.Emplace(); - definedValue_0 = AsCharSpan(self.data); - } + encodableStruct.trackID = AsCharSpan(self.trackID); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21012,105 +25755,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTargetNavigatorClusterNavigateTargetResponseParams +@implementation MTRMediaPlaybackClusterDeactivateTextTrackParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _data = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterDeactivateTextTrackParams alloc] init]; - other.status = self.status; - other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, _data]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRMediaPlaybackClusterDeactivateTextTrackParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRTargetNavigatorClusterNavigateTargetResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - if (decodableStruct.data.HasValue()) { - self.data = AsString(decodableStruct.data.Value()); - if (self.data == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.data = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRMediaPlaybackClusterPlayParams +@implementation MTRMediaInputClusterSelectInputParams - (instancetype)init { if (self = [super init]) { + + _index = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21119,8 +25842,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; + other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21129,18 +25853,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterPlayParams (InternalMethods) +@implementation MTRMediaInputClusterSelectInputParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Play::Type encodableStruct; + chip::app::Clusters::MediaInput::Commands::SelectInput::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.index = self.index.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -21180,7 +25907,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterPauseParams +@implementation MTRMediaInputClusterShowInputStatusParams - (instancetype)init { if (self = [super init]) { @@ -21192,7 +25919,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21208,11 +25935,11 @@ - (NSString *)description @end -@implementation MTRMediaPlaybackClusterPauseParams (InternalMethods) +@implementation MTRMediaInputClusterShowInputStatusParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Pause::Type encodableStruct; + chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21253,7 +25980,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterStopParams +@implementation MTRMediaInputClusterHideInputStatusParams - (instancetype)init { if (self = [super init]) { @@ -21265,7 +25992,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterStopParams alloc] init]; + auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21281,11 +26008,11 @@ - (NSString *)description @end -@implementation MTRMediaPlaybackClusterStopParams (InternalMethods) +@implementation MTRMediaInputClusterHideInputStatusParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Stop::Type encodableStruct; + chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21326,15 +26053,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterStopPlaybackParams - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end -@implementation MTRMediaPlaybackClusterStartOverParams +@implementation MTRMediaInputClusterRenameInputParams - (instancetype)init { if (self = [super init]) { + + _index = @(0); + + _name = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21343,8 +26069,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; + other.index = self.index; + other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21353,18 +26081,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; name:%@; >", NSStringFromClass([self class]), _index, _name]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterStartOverParams (InternalMethods) +@implementation MTRMediaInputClusterRenameInputParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type encodableStruct; + chip::app::Clusters::MediaInput::Commands::RenameInput::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.index = self.index.unsignedCharValue; + } + { + encodableStruct.name = AsCharSpan(self.name); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -21404,7 +26138,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterPreviousParams +@implementation MTRLowPowerClusterSleepParams - (instancetype)init { if (self = [super init]) { @@ -21416,7 +26150,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + auto other = [[MTRLowPowerClusterSleepParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21432,11 +26166,11 @@ - (NSString *)description @end -@implementation MTRMediaPlaybackClusterPreviousParams (InternalMethods) +@implementation MTRLowPowerClusterSleepParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Previous::Type encodableStruct; + chip::app::Clusters::LowPower::Commands::Sleep::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21477,10 +26211,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterNextParams +@implementation MTRKeypadInputClusterSendKeyParams - (instancetype)init { if (self = [super init]) { + + _keyCode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21489,8 +26225,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; + auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + other.keyCode = self.keyCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21499,18 +26236,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyCode:%@; >", NSStringFromClass([self class]), _keyCode]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterNextParams (InternalMethods) +@implementation MTRKeypadInputClusterSendKeyParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Next::Type encodableStruct; + chip::app::Clusters::KeypadInput::Commands::SendKey::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.keyCode = static_cast>(self.keyCode.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -21550,83 +26290,101 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterRewindParams +@implementation MTRKeypadInputClusterSendKeyResponseParams - (instancetype)init { if (self = [super init]) { + + _status = @(0); _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; + other.status = self.status; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; >", NSStringFromClass([self class]), _status]; return descriptionString; } -@end - -@implementation MTRMediaPlaybackClusterRewindParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - 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)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (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; - } +@end - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } +@implementation MTRKeypadInputClusterSendKeyResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRMediaPlaybackClusterFastForwardParams +@implementation MTRContentLauncherClusterLaunchContentParams - (instancetype)init { if (self = [super init]) { + + _search = [MTRContentLauncherClusterContentSearchStruct new]; + + _autoPlay = @(0); + + _data = nil; + + _playbackPreferences = nil; + + _useCurrentContext = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21635,8 +26393,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + other.search = self.search; + other.autoPlay = self.autoPlay; + other.data = self.data; + other.playbackPreferences = self.playbackPreferences; + other.useCurrentContext = self.useCurrentContext; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21645,96 +26408,167 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: search:%@; autoPlay:%@; data:%@; playbackPreferences:%@; useCurrentContext:%@; >", NSStringFromClass([self class]), _search, _autoPlay, _data, _playbackPreferences, _useCurrentContext]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterFastForwardParams (InternalMethods) +@implementation MTRContentLauncherClusterLaunchContentParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type encodableStruct; + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::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]; + { + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.search.parameterList.count != 0) { + auto * listHolder_1 = new ListHolder(self.search.parameterList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.search.parameterList.count; ++i_1) { + if (![self.search.parameterList[i_1] isKindOfClass:[MTRContentLauncherClusterParameterStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRContentLauncherClusterParameterStruct *) self.search.parameterList[i_1]; + listHolder_1->mList[i_1].type = static_castmList[i_1].type)>>(element_1.type.unsignedCharValue); + listHolder_1->mList[i_1].value = AsCharSpan(element_1.value); + if (element_1.externalIDList != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (element_1.externalIDList.count != 0) { + auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { + if (![element_1.externalIDList[i_4] isKindOfClass:[MTRContentLauncherClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MTRContentLauncherClusterAdditionalInfoStruct *) element_1.externalIDList[i_4]; + listHolder_4->mList[i_4].name = AsCharSpan(element_4.name); + listHolder_4->mList[i_4].value = AsCharSpan(element_4.value); + } + definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); + } else { + definedValue_3 = ListType_4(); + } + } + } + } + encodableStruct.search.parameterList = ListType_1(listHolder_1->mList, self.search.parameterList.count); + } else { + encodableStruct.search.parameterList = ListType_1(); + } } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + encodableStruct.autoPlay = self.autoPlay.boolValue; + } + { + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsCharSpan(self.data); } } - return decodedObj; -} -@end - -@implementation MTRMediaPlaybackClusterSkipForwardParams -- (instancetype)init -{ - if (self = [super init]) { - - _deltaPositionMilliseconds = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + { + if (self.playbackPreferences != nil) { + auto & definedValue_0 = encodableStruct.playbackPreferences.Emplace(); + definedValue_0.playbackPosition = self.playbackPreferences.playbackPosition.unsignedLongLongValue; + definedValue_0.textTrack.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); + if (self.playbackPreferences.textTrack.characteristics != nil) { + auto & definedValue_3 = definedValue_0.textTrack.characteristics.Emplace(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.textTrack.characteristics.count != 0) { + auto * listHolder_4 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < self.playbackPreferences.textTrack.characteristics.count; ++i_4) { + if (![self.playbackPreferences.textTrack.characteristics[i_4] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_4]; + listHolder_4->mList[i_4] = static_castmList[i_4])>>(element_4.unsignedCharValue); + } + definedValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.textTrack.characteristics.count); + } else { + definedValue_3 = ListType_4(); + } + } + } + definedValue_0.textTrack.audioOutputIndex = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; + if (self.playbackPreferences.audioTracks != nil) { + auto & definedValue_2 = definedValue_0.audioTracks.Emplace(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.audioTracks.count != 0) { + auto * listHolder_3 = new ListHolder(self.playbackPreferences.audioTracks.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < self.playbackPreferences.audioTracks.count; ++i_3) { + if (![self.playbackPreferences.audioTracks[i_3] isKindOfClass:[MTRContentLauncherClusterTrackPreferenceStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (MTRContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_3]; + listHolder_3->mList[i_3].languageCode = AsCharSpan(element_3.languageCode); + if (element_3.characteristics != nil) { + auto & definedValue_5 = listHolder_3->mList[i_3].characteristics.Emplace(); + { + using ListType_6 = std::remove_reference_t; + using ListMemberType_6 = ListMemberTypeGetter::Type; + if (element_3.characteristics.count != 0) { + auto * listHolder_6 = new ListHolder(element_3.characteristics.count); + if (listHolder_6 == nullptr || listHolder_6->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_6); + for (size_t i_6 = 0; i_6 < element_3.characteristics.count; ++i_6) { + if (![element_3.characteristics[i_6] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_6 = (NSNumber *) element_3.characteristics[i_6]; + listHolder_6->mList[i_6] = static_castmList[i_6])>>(element_6.unsignedCharValue); + } + definedValue_5 = ListType_6(listHolder_6->mList, element_3.characteristics.count); + } else { + definedValue_5 = ListType_6(); + } + } + } + listHolder_3->mList[i_3].audioOutputIndex = element_3.audioOutputIndex.unsignedCharValue; + } + definedValue_2 = ListType_3(listHolder_3->mList, self.playbackPreferences.audioTracks.count); + } else { + definedValue_2 = ListType_3(); + } + } + } + } } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - - other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; - return descriptionString; -} - -@end - -@implementation MTRMediaPlaybackClusterSkipForwardParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.deltaPositionMilliseconds = self.deltaPositionMilliseconds.unsignedLongLongValue; + if (self.useCurrentContext != nil) { + auto & definedValue_0 = encodableStruct.useCurrentContext.Emplace(); + definedValue_0 = self.useCurrentContext.boolValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21775,12 +26609,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterSkipBackwardParams +@implementation MTRContentLauncherClusterLaunchURLParams - (instancetype)init { if (self = [super init]) { - _deltaPositionMilliseconds = @(0); + _contentURL = @""; + + _displayString = nil; + + _brandingInformation = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21789,9 +26627,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; - other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; + other.contentURL = self.contentURL; + other.displayString = self.displayString; + other.brandingInformation = self.brandingInformation; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21800,20 +26640,117 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterSkipBackwardParams (InternalMethods) +@implementation MTRContentLauncherClusterLaunchURLParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type encodableStruct; + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type encodableStruct; ListFreer listFreer; { - encodableStruct.deltaPositionMilliseconds = self.deltaPositionMilliseconds.unsignedLongLongValue; + encodableStruct.contentURL = AsCharSpan(self.contentURL); + } + { + if (self.displayString != nil) { + auto & definedValue_0 = encodableStruct.displayString.Emplace(); + definedValue_0 = AsCharSpan(self.displayString); + } + } + { + if (self.brandingInformation != nil) { + auto & definedValue_0 = encodableStruct.brandingInformation.Emplace(); + definedValue_0.providerName = AsCharSpan(self.brandingInformation.providerName); + if (self.brandingInformation.background != nil) { + auto & definedValue_2 = definedValue_0.background.Emplace(); + if (self.brandingInformation.background.imageURL != nil) { + auto & definedValue_4 = definedValue_2.imageURL.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.background.imageURL); + } + if (self.brandingInformation.background.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.background.color); + } + if (self.brandingInformation.background.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = self.brandingInformation.background.size.width.doubleValue; + definedValue_4.height = self.brandingInformation.background.size.height.doubleValue; + definedValue_4.metric = static_cast>(self.brandingInformation.background.size.metric.unsignedCharValue); + } + } + if (self.brandingInformation.logo != nil) { + auto & definedValue_2 = definedValue_0.logo.Emplace(); + if (self.brandingInformation.logo.imageURL != nil) { + auto & definedValue_4 = definedValue_2.imageURL.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.logo.imageURL); + } + if (self.brandingInformation.logo.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.logo.color); + } + if (self.brandingInformation.logo.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = self.brandingInformation.logo.size.width.doubleValue; + definedValue_4.height = self.brandingInformation.logo.size.height.doubleValue; + definedValue_4.metric = static_cast>(self.brandingInformation.logo.size.metric.unsignedCharValue); + } + } + if (self.brandingInformation.progressBar != nil) { + auto & definedValue_2 = definedValue_0.progressBar.Emplace(); + if (self.brandingInformation.progressBar.imageURL != nil) { + auto & definedValue_4 = definedValue_2.imageURL.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.progressBar.imageURL); + } + if (self.brandingInformation.progressBar.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.progressBar.color); + } + if (self.brandingInformation.progressBar.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = self.brandingInformation.progressBar.size.width.doubleValue; + definedValue_4.height = self.brandingInformation.progressBar.size.height.doubleValue; + definedValue_4.metric = static_cast>(self.brandingInformation.progressBar.size.metric.unsignedCharValue); + } + } + if (self.brandingInformation.splash != nil) { + auto & definedValue_2 = definedValue_0.splash.Emplace(); + if (self.brandingInformation.splash.imageURL != nil) { + auto & definedValue_4 = definedValue_2.imageURL.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.splash.imageURL); + } + if (self.brandingInformation.splash.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.splash.color); + } + if (self.brandingInformation.splash.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = self.brandingInformation.splash.size.width.doubleValue; + definedValue_4.height = self.brandingInformation.splash.size.height.doubleValue; + definedValue_4.metric = static_cast>(self.brandingInformation.splash.size.metric.unsignedCharValue); + } + } + if (self.brandingInformation.waterMark != nil) { + auto & definedValue_2 = definedValue_0.waterMark.Emplace(); + if (self.brandingInformation.waterMark.imageURL != nil) { + auto & definedValue_4 = definedValue_2.imageURL.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.waterMark.imageURL); + } + if (self.brandingInformation.waterMark.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = AsCharSpan(self.brandingInformation.waterMark.color); + } + if (self.brandingInformation.waterMark.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = self.brandingInformation.waterMark.size.width.doubleValue; + definedValue_4.height = self.brandingInformation.waterMark.size.height.doubleValue; + definedValue_4.metric = static_cast>(self.brandingInformation.waterMark.size.metric.unsignedCharValue); + } + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21854,7 +26791,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaPlaybackClusterPlaybackResponseParams +@implementation MTRContentLauncherClusterLauncherResponseParams - (instancetype)init { if (self = [super init]) { @@ -21869,7 +26806,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; + auto other = [[MTRContentLauncherClusterLauncherResponseParams alloc] init]; other.status = self.status; other.data = self.data; @@ -21891,7 +26828,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + using DecodableType = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -21926,9 +26863,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRMediaPlaybackClusterPlaybackResponseParams (InternalMethods) +@implementation MTRContentLauncherClusterLauncherResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; @@ -21949,12 +26886,18 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::MediaPla @end -@implementation MTRMediaPlaybackClusterSeekParams +@implementation MTRContentLauncherClusterLaunchResponseParams +@dynamic status; +@dynamic data; + +@dynamic timedInvokeTimeoutMs; +@end +@implementation MTRAudioOutputClusterSelectOutputParams - (instancetype)init { if (self = [super init]) { - _position = @(0); + _index = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21963,9 +26906,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - other.position = self.position; + other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21974,20 +26917,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; >", NSStringFromClass([self class]), _position]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterSeekParams (InternalMethods) +@implementation MTRAudioOutputClusterSelectOutputParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaPlayback::Commands::Seek::Type encodableStruct; + chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type encodableStruct; ListFreer listFreer; { - encodableStruct.position = self.position.unsignedLongLongValue; + encodableStruct.index = self.index.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -22028,12 +26971,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaInputClusterSelectInputParams +@implementation MTRAudioOutputClusterRenameOutputParams - (instancetype)init { if (self = [super init]) { _index = @(0); + + _name = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22042,9 +26987,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; + auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; other.index = self.index; + other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22053,21 +26999,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; name:%@; >", NSStringFromClass([self class]), _index, _name]; return descriptionString; } @end -@implementation MTRMediaInputClusterSelectInputParams (InternalMethods) +@implementation MTRAudioOutputClusterRenameOutputParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaInput::Commands::SelectInput::Type encodableStruct; + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type encodableStruct; ListFreer listFreer; { encodableStruct.index = self.index.unsignedCharValue; } + { + encodableStruct.name = AsCharSpan(self.name); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -22107,10 +27056,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaInputClusterShowInputStatusParams +@implementation MTRApplicationLauncherClusterLaunchAppParams - (instancetype)init { if (self = [super init]) { + + _application = nil; + + _data = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22119,8 +27072,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; + auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + other.application = self.application; + other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22129,18 +27084,31 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; data:%@; >", NSStringFromClass([self class]), _application, [_data base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRMediaInputClusterShowInputStatusParams (InternalMethods) +@implementation MTRApplicationLauncherClusterLaunchAppParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type encodableStruct; + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type encodableStruct; ListFreer listFreer; + { + if (self.application != nil) { + auto & definedValue_0 = encodableStruct.application.Emplace(); + definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; + definedValue_0.applicationID = AsCharSpan(self.application.applicationID); + } + } + { + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsByteSpan(self.data); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -22180,10 +27148,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaInputClusterHideInputStatusParams +@implementation MTRApplicationLauncherClusterStopAppParams - (instancetype)init { if (self = [super init]) { + + _application = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22192,8 +27162,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; + auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22202,18 +27173,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; >", NSStringFromClass([self class]), _application]; return descriptionString; } @end -@implementation MTRMediaInputClusterHideInputStatusParams (InternalMethods) +@implementation MTRApplicationLauncherClusterStopAppParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type encodableStruct; + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type encodableStruct; ListFreer listFreer; + { + if (self.application != nil) { + auto & definedValue_0 = encodableStruct.application.Emplace(); + definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; + definedValue_0.applicationID = AsCharSpan(self.application.applicationID); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -22253,14 +27231,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMediaInputClusterRenameInputParams +@implementation MTRApplicationLauncherClusterHideAppParams - (instancetype)init { if (self = [super init]) { - _index = @(0); - - _name = @""; + _application = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22269,10 +27245,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; + auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; - other.index = self.index; - other.name = self.name; + other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22281,23 +27256,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; name:%@; >", NSStringFromClass([self class]), _index, _name]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; >", NSStringFromClass([self class]), _application]; return descriptionString; } @end -@implementation MTRMediaInputClusterRenameInputParams (InternalMethods) +@implementation MTRApplicationLauncherClusterHideAppParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MediaInput::Commands::RenameInput::Type encodableStruct; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type encodableStruct; ListFreer listFreer; { - encodableStruct.index = self.index.unsignedCharValue; - } - { - encodableStruct.name = AsCharSpan(self.name); + if (self.application != nil) { + auto & definedValue_0 = encodableStruct.application.Emplace(); + definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; + definedValue_0.applicationID = AsCharSpan(self.application.applicationID); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -22338,85 +27314,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLowPowerClusterSleepParams +@implementation MTRApplicationLauncherClusterLauncherResponseParams - (instancetype)init { if (self = [super init]) { + + _status = @(0); + + _data = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLowPowerClusterSleepParams alloc] init]; + auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; + other.status = self.status; + other.data = self.data; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, [_data base64EncodedStringWithOptions:0]]; return descriptionString; } -@end - -@implementation MTRLowPowerClusterSleepParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::LowPower::Commands::Sleep::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - 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)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRApplicationLauncherClusterLauncherResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.data.HasValue()) { + self.data = AsData(decodableStruct.data.Value()); + } else { + self.data = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRKeypadInputClusterSendKeyParams +@implementation MTRAccountLoginClusterGetSetupPINParams - (instancetype)init { if (self = [super init]) { - _keyCode = @(0); + _tempAccountIdentifier = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22425,9 +27419,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; - other.keyCode = self.keyCode; + other.tempAccountIdentifier = self.tempAccountIdentifier; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22436,20 +27430,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyCode:%@; >", NSStringFromClass([self class]), _keyCode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; >", NSStringFromClass([self class]), _tempAccountIdentifier]; return descriptionString; } @end -@implementation MTRKeypadInputClusterSendKeyParams (InternalMethods) +@implementation MTRAccountLoginClusterGetSetupPINParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::KeypadInput::Commands::SendKey::Type encodableStruct; + chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type encodableStruct; ListFreer listFreer; { - encodableStruct.keyCode = static_cast>(self.keyCode.unsignedCharValue); + encodableStruct.tempAccountIdentifier = AsCharSpan(self.tempAccountIdentifier); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -22490,12 +27484,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRKeypadInputClusterSendKeyResponseParams +@implementation MTRAccountLoginClusterGetSetupPINResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); + _setupPIN = @""; _timedInvokeTimeoutMs = nil; } return self; @@ -22503,9 +27497,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; + auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; - other.status = self.status; + other.setupPIN = self.setupPIN; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -22513,7 +27507,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; >", NSStringFromClass([self class]), _status]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: setupPIN:%@; >", NSStringFromClass([self class]), _setupPIN]; return descriptionString; } @@ -22524,7 +27518,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType; + using DecodableType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -22548,39 +27542,133 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r } } - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRAccountLoginClusterGetSetupPINResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &)decodableStruct +{ + { + self.setupPIN = AsString(decodableStruct.setupPIN); + if (self.setupPIN == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRAccountLoginClusterLoginParams +- (instancetype)init +{ + if (self = [super init]) { + + _tempAccountIdentifier = @""; + + _setupPIN = @""; + + _node = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; + + other.tempAccountIdentifier = self.tempAccountIdentifier; + other.setupPIN = self.setupPIN; + other.node = self.node; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; setupPIN:%@; node:%@; >", NSStringFromClass([self class]), _tempAccountIdentifier, _setupPIN, _node]; + return descriptionString; +} + +@end + +@implementation MTRAccountLoginClusterLoginParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::AccountLogin::Commands::Login::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.tempAccountIdentifier = AsCharSpan(self.tempAccountIdentifier); + } + { + encodableStruct.setupPIN = AsCharSpan(self.setupPIN); + } + { + if (self.node != nil) { + auto & definedValue_0 = encodableStruct.node.Emplace(); + definedValue_0 = self.node.unsignedLongLongValue; + } + } + + 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); -@end + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@implementation MTRKeypadInputClusterSendKeyResponseParams (InternalMethods) + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType &)decodableStruct + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - return CHIP_NO_ERROR; -} + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} @end -@implementation MTRContentLauncherClusterLaunchContentParams +@implementation MTRAccountLoginClusterLogoutParams - (instancetype)init { if (self = [super init]) { - _search = [MTRContentLauncherClusterContentSearchStruct new]; - - _autoPlay = @(0); - - _data = nil; + _node = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22589,11 +27677,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; - other.search = self.search; - other.autoPlay = self.autoPlay; - other.data = self.data; + other.node = self.node; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22602,76 +27688,22 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: search:%@; autoPlay:%@; data:%@; >", NSStringFromClass([self class]), _search, _autoPlay, _data]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; >", NSStringFromClass([self class]), _node]; return descriptionString; } @end -@implementation MTRContentLauncherClusterLaunchContentParams (InternalMethods) +@implementation MTRAccountLoginClusterLogoutParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type encodableStruct; + chip::app::Clusters::AccountLogin::Commands::Logout::Type encodableStruct; ListFreer listFreer; { - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (self.search.parameterList.count != 0) { - auto * listHolder_1 = new ListHolder(self.search.parameterList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < self.search.parameterList.count; ++i_1) { - if (![self.search.parameterList[i_1] isKindOfClass:[MTRContentLauncherClusterParameterStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRContentLauncherClusterParameterStruct *) self.search.parameterList[i_1]; - listHolder_1->mList[i_1].type = static_castmList[i_1].type)>>(element_1.type.unsignedCharValue); - listHolder_1->mList[i_1].value = AsCharSpan(element_1.value); - if (element_1.externalIDList != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_1.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { - if (![element_1.externalIDList[i_4] isKindOfClass:[MTRContentLauncherClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 = (MTRContentLauncherClusterAdditionalInfoStruct *) element_1.externalIDList[i_4]; - listHolder_4->mList[i_4].name = AsCharSpan(element_4.name); - listHolder_4->mList[i_4].value = AsCharSpan(element_4.value); - } - definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); - } else { - definedValue_3 = ListType_4(); - } - } - } - } - encodableStruct.search.parameterList = ListType_1(listHolder_1->mList, self.search.parameterList.count); - } else { - encodableStruct.search.parameterList = ListType_1(); - } - } - } - { - encodableStruct.autoPlay = self.autoPlay.boolValue; - } - { - if (self.data != nil) { - auto & definedValue_0 = encodableStruct.data.Emplace(); - definedValue_0 = AsCharSpan(self.data); + if (self.node != nil) { + auto & definedValue_0 = encodableStruct.node.Emplace(); + definedValue_0 = self.node.unsignedLongLongValue; } } @@ -22713,16 +27745,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRContentLauncherClusterLaunchURLParams +@implementation MTRContentControlClusterUpdatePINParams - (instancetype)init { if (self = [super init]) { - _contentURL = @""; - - _displayString = nil; + _oldPIN = nil; - _brandingInformation = nil; + _newPIN = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -22731,11 +27761,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + auto other = [[MTRContentControlClusterUpdatePINParams alloc] init]; - other.contentURL = self.contentURL; - other.displayString = self.displayString; - other.brandingInformation = self.brandingInformation; + other.oldPIN = self.oldPIN; + other.newPIN = self.newPIN; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22744,118 +27773,100 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: oldPIN:%@; newPIN:%@; >", NSStringFromClass([self class]), _oldPIN, _newPIN]; return descriptionString; } @end -@implementation MTRContentLauncherClusterLaunchURLParams (InternalMethods) +@implementation MTRContentControlClusterUpdatePINParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::UpdatePIN::Type encodableStruct; ListFreer listFreer; { - encodableStruct.contentURL = AsCharSpan(self.contentURL); + if (self.oldPIN != nil) { + auto & definedValue_0 = encodableStruct.oldPIN.Emplace(); + definedValue_0 = AsCharSpan(self.oldPIN); + } } { - if (self.displayString != nil) { - auto & definedValue_0 = encodableStruct.displayString.Emplace(); - definedValue_0 = AsCharSpan(self.displayString); + encodableStruct.newPIN = AsCharSpan(self.newPIN); + } + + 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; } - { - if (self.brandingInformation != nil) { - auto & definedValue_0 = encodableStruct.brandingInformation.Emplace(); - definedValue_0.providerName = AsCharSpan(self.brandingInformation.providerName); - if (self.brandingInformation.background != nil) { - auto & definedValue_2 = definedValue_0.background.Emplace(); - if (self.brandingInformation.background.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.background.imageURL); - } - if (self.brandingInformation.background.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.background.color); - } - if (self.brandingInformation.background.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = self.brandingInformation.background.size.width.doubleValue; - definedValue_4.height = self.brandingInformation.background.size.height.doubleValue; - definedValue_4.metric = static_cast>(self.brandingInformation.background.size.metric.unsignedCharValue); - } - } - if (self.brandingInformation.logo != nil) { - auto & definedValue_2 = definedValue_0.logo.Emplace(); - if (self.brandingInformation.logo.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.logo.imageURL); - } - if (self.brandingInformation.logo.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.logo.color); - } - if (self.brandingInformation.logo.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = self.brandingInformation.logo.size.width.doubleValue; - definedValue_4.height = self.brandingInformation.logo.size.height.doubleValue; - definedValue_4.metric = static_cast>(self.brandingInformation.logo.size.metric.unsignedCharValue); - } - } - if (self.brandingInformation.progressBar != nil) { - auto & definedValue_2 = definedValue_0.progressBar.Emplace(); - if (self.brandingInformation.progressBar.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.progressBar.imageURL); - } - if (self.brandingInformation.progressBar.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.progressBar.color); - } - if (self.brandingInformation.progressBar.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = self.brandingInformation.progressBar.size.width.doubleValue; - definedValue_4.height = self.brandingInformation.progressBar.size.height.doubleValue; - definedValue_4.metric = static_cast>(self.brandingInformation.progressBar.size.metric.unsignedCharValue); - } - } - if (self.brandingInformation.splash != nil) { - auto & definedValue_2 = definedValue_0.splash.Emplace(); - if (self.brandingInformation.splash.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.splash.imageURL); - } - if (self.brandingInformation.splash.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.splash.color); - } - if (self.brandingInformation.splash.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = self.brandingInformation.splash.size.width.doubleValue; - definedValue_4.height = self.brandingInformation.splash.size.height.doubleValue; - definedValue_4.metric = static_cast>(self.brandingInformation.splash.size.metric.unsignedCharValue); - } - } - if (self.brandingInformation.waterMark != nil) { - auto & definedValue_2 = definedValue_0.waterMark.Emplace(); - if (self.brandingInformation.waterMark.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.waterMark.imageURL); - } - if (self.brandingInformation.waterMark.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = AsCharSpan(self.brandingInformation.waterMark.color); - } - if (self.brandingInformation.waterMark.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = self.brandingInformation.waterMark.size.width.doubleValue; - definedValue_4.height = self.brandingInformation.waterMark.size.height.doubleValue; - definedValue_4.metric = static_cast>(self.brandingInformation.waterMark.size.metric.unsignedCharValue); - } - } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterResetPINParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterResetPINParams 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 MTRContentControlClusterResetPINParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::ResetPIN::Type encodableStruct; + ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -22895,33 +27906,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRContentLauncherClusterLauncherResponseParams +@implementation MTRContentControlClusterResetPINResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _data = nil; - _timedInvokeTimeoutMs = nil; + _pinCode = @""; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRContentLauncherClusterLauncherResponseParams alloc] init]; + auto other = [[MTRContentControlClusterResetPINResponseParams alloc] init]; - other.status = self.status; - other.data = self.data; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.pinCode = self.pinCode; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, _data]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), _pinCode]; return descriptionString; } @@ -22932,7 +27938,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; + using DecodableType = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -22967,22 +27973,15 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRContentLauncherClusterLauncherResponseParams (InternalMethods) +@implementation MTRContentControlClusterResetPINResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType &)decodableStruct { { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.data.HasValue()) { - self.data = AsString(decodableStruct.data.Value()); - if (self.data == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.data = nil; + self.pinCode = AsString(decodableStruct.PINCode); + if (self.pinCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; } } return CHIP_NO_ERROR; @@ -22990,18 +27989,10 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentL @end -@implementation MTRContentLauncherClusterLaunchResponseParams -@dynamic status; -@dynamic data; - -@dynamic timedInvokeTimeoutMs; -@end -@implementation MTRAudioOutputClusterSelectOutputParams +@implementation MTRContentControlClusterEnableParams - (instancetype)init { if (self = [super init]) { - - _index = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23010,9 +28001,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + auto other = [[MTRContentControlClusterEnableParams alloc] init]; - other.index = self.index; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23021,21 +28011,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRAudioOutputClusterSelectOutputParams (InternalMethods) +@implementation MTRContentControlClusterEnableParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::Enable::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.index = self.index.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -23075,14 +28062,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAudioOutputClusterRenameOutputParams +@implementation MTRContentControlClusterDisableParams - (instancetype)init { if (self = [super init]) { - - _index = @(0); - - _name = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23091,10 +28074,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + auto other = [[MTRContentControlClusterDisableParams alloc] init]; - other.index = self.index; - other.name = self.name; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23103,24 +28084,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; name:%@; >", NSStringFromClass([self class]), _index, _name]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRAudioOutputClusterRenameOutputParams (InternalMethods) +@implementation MTRContentControlClusterDisableParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::Disable::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.index = self.index.unsignedCharValue; - } - { - encodableStruct.name = AsCharSpan(self.name); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -23160,14 +28135,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRApplicationLauncherClusterLaunchAppParams +@implementation MTRContentControlClusterAddBonusTimeParams - (instancetype)init { if (self = [super init]) { - _application = nil; + _pinCode = nil; - _data = nil; + _bonusTime = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23176,10 +28151,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + auto other = [[MTRContentControlClusterAddBonusTimeParams alloc] init]; - other.application = self.application; - other.data = self.data; + other.pinCode = self.pinCode; + other.bonusTime = self.bonusTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23188,29 +28163,28 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; data:%@; >", NSStringFromClass([self class]), _application, [_data base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; bonusTime:%@; >", NSStringFromClass([self class]), _pinCode, _bonusTime]; return descriptionString; } @end -@implementation MTRApplicationLauncherClusterLaunchAppParams (InternalMethods) +@implementation MTRContentControlClusterAddBonusTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::AddBonusTime::Type encodableStruct; ListFreer listFreer; { - if (self.application != nil) { - auto & definedValue_0 = encodableStruct.application.Emplace(); - definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = AsCharSpan(self.application.applicationID); + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsCharSpan(self.pinCode); } } { - if (self.data != nil) { - auto & definedValue_0 = encodableStruct.data.Emplace(); - definedValue_0 = AsByteSpan(self.data); + if (self.bonusTime != nil) { + auto & definedValue_0 = encodableStruct.bonusTime.Emplace(); + definedValue_0 = self.bonusTime.unsignedIntValue; } } @@ -23252,12 +28226,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRApplicationLauncherClusterStopAppParams +@implementation MTRContentControlClusterSetScreenDailyTimeParams - (instancetype)init { if (self = [super init]) { - _application = nil; + _screenTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23266,9 +28240,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + auto other = [[MTRContentControlClusterSetScreenDailyTimeParams alloc] init]; - other.application = self.application; + other.screenTime = self.screenTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23277,24 +28251,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; >", NSStringFromClass([self class]), _application]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: screenTime:%@; >", NSStringFromClass([self class]), _screenTime]; return descriptionString; } @end -@implementation MTRApplicationLauncherClusterStopAppParams (InternalMethods) +@implementation MTRContentControlClusterSetScreenDailyTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Type encodableStruct; ListFreer listFreer; { - if (self.application != nil) { - auto & definedValue_0 = encodableStruct.application.Emplace(); - definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = AsCharSpan(self.application.applicationID); - } + encodableStruct.screenTime = self.screenTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23335,12 +28305,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRApplicationLauncherClusterHideAppParams +@implementation MTRContentControlClusterBlockUnratedContentParams - (instancetype)init { if (self = [super init]) { - - _application = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23349,9 +28317,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + auto other = [[MTRContentControlClusterBlockUnratedContentParams alloc] init]; - other.application = self.application; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23360,161 +28327,61 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; >", NSStringFromClass([self class]), _application]; - return descriptionString; -} - -@end - -@implementation MTRApplicationLauncherClusterHideAppParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type encodableStruct; - ListFreer listFreer; - { - if (self.application != nil) { - auto & definedValue_0 = encodableStruct.application.Emplace(); - definedValue_0.catalogVendorID = self.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = AsCharSpan(self.application.applicationID); - } - } - - 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 MTRApplicationLauncherClusterLauncherResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _status = @(0); - - _data = nil; - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; - - other.status = self.status; - other.data = self.data; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), _status, [_data base64EncodedStringWithOptions:0]]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; } @end -@implementation MTRApplicationLauncherClusterLauncherResponseParams (InternalMethods) +@implementation MTRContentControlClusterBlockUnratedContentParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - { - if (decodableStruct.data.HasValue()) { - self.data = AsData(decodableStruct.data.Value()); - } else { - self.data = nil; + + 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; } - return CHIP_NO_ERROR; -} + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} @end -@implementation MTRAccountLoginClusterGetSetupPINParams +@implementation MTRContentControlClusterUnblockUnratedContentParams - (instancetype)init { if (self = [super init]) { - - _tempAccountIdentifier = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23523,9 +28390,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + auto other = [[MTRContentControlClusterUnblockUnratedContentParams alloc] init]; - other.tempAccountIdentifier = self.tempAccountIdentifier; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23534,21 +28400,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; >", NSStringFromClass([self class]), _tempAccountIdentifier]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRAccountLoginClusterGetSetupPINParams (InternalMethods) +@implementation MTRContentControlClusterUnblockUnratedContentParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.tempAccountIdentifier = AsCharSpan(self.tempAccountIdentifier); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -23588,99 +28451,91 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAccountLoginClusterGetSetupPINResponseParams +@implementation MTRContentControlClusterSetOnDemandRatingThresholdParams - (instancetype)init { if (self = [super init]) { - _setupPIN = @""; + _rating = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; + auto other = [[MTRContentControlClusterSetOnDemandRatingThresholdParams alloc] init]; - other.setupPIN = self.setupPIN; + other.rating = self.rating; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: setupPIN:%@; >", NSStringFromClass([self class]), _setupPIN]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rating:%@; >", NSStringFromClass([self class]), _rating]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRContentControlClusterSetOnDemandRatingThresholdParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.rating = AsCharSpan(self.rating); } - using DecodableType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRAccountLoginClusterGetSetupPINResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.setupPIN = AsString(decodableStruct.setupPIN); - if (self.setupPIN == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - return CHIP_NO_ERROR; -} + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} @end -@implementation MTRAccountLoginClusterLoginParams +@implementation MTRContentControlClusterSetScheduledContentRatingThresholdParams - (instancetype)init { if (self = [super init]) { - _tempAccountIdentifier = @""; - - _setupPIN = @""; + _rating = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23689,10 +28544,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; + auto other = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams alloc] init]; - other.tempAccountIdentifier = self.tempAccountIdentifier; - other.setupPIN = self.setupPIN; + other.rating = self.rating; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23701,23 +28555,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; setupPIN:%@; >", NSStringFromClass([self class]), _tempAccountIdentifier, _setupPIN]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rating:%@; >", NSStringFromClass([self class]), _rating]; return descriptionString; } @end -@implementation MTRAccountLoginClusterLoginParams (InternalMethods) +@implementation MTRContentControlClusterSetScheduledContentRatingThresholdParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AccountLogin::Commands::Login::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type encodableStruct; ListFreer listFreer; { - encodableStruct.tempAccountIdentifier = AsCharSpan(self.tempAccountIdentifier); - } - { - encodableStruct.setupPIN = AsCharSpan(self.setupPIN); + encodableStruct.rating = AsCharSpan(self.rating); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23758,10 +28609,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAccountLoginClusterLogoutParams +@implementation MTRContentAppObserverClusterContentAppMessageParams - (instancetype)init { if (self = [super init]) { + + _data = nil; + + _encodingHint = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -23770,8 +28625,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; + auto other = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; + other.data = self.data; + other.encodingHint = self.encodingHint; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -23780,18 +28637,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; encodingHint:%@; >", NSStringFromClass([self class]), _data, _encodingHint]; return descriptionString; } @end -@implementation MTRAccountLoginClusterLogoutParams (InternalMethods) +@implementation MTRContentAppObserverClusterContentAppMessageParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AccountLogin::Commands::Logout::Type encodableStruct; + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type encodableStruct; ListFreer listFreer; + { + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsCharSpan(self.data); + } + } + { + encodableStruct.encodingHint = AsCharSpan(self.encodingHint); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -23831,6 +28697,109 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRContentAppObserverClusterContentAppMessageResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = nil; + + _data = @""; + + _encodingHint = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentAppObserverClusterContentAppMessageResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.encodingHint = self.encodingHint; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; encodingHint:%@; >", NSStringFromClass([self class]), _status, _data, _encodingHint]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRContentAppObserverClusterContentAppMessageResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType &)decodableStruct +{ + { + if (decodableStruct.status.HasValue()) { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status.Value())]; + } else { + self.status = nil; + } + } + { + self.data = AsString(decodableStruct.data); + if (self.data == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } + { + self.encodingHint = AsString(decodableStruct.encodingHint); + if (self.encodingHint == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams - (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 32bb681c55b5d0..24ef38c1031cc6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -748,33 +748,75 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTROvenOperationalStateClusterPauseParams (InternalMethods) +@interface MTRICDManagementClusterStayActiveResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRTimerClusterSetTimerParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRTimerClusterResetTimerParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRTimerClusterAddTimeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRTimerClusterReduceTimeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTROvenOperationalStateClusterStopParams (InternalMethods) +@interface MTROvenCavityOperationalStateClusterStopParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTROvenOperationalStateClusterStartParams (InternalMethods) +@interface MTROvenCavityOperationalStateClusterStartParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTROvenOperationalStateClusterResumeParams (InternalMethods) +@interface MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTROvenOperationalStateClusterOperationalCommandResponseParams (InternalMethods) +@interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct; +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct; + +@end + +@interface MTROvenModeClusterChangeToModeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTROvenModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct; @end @@ -952,6 +994,150 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterPowerAdjustRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterPauseRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterResumeRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterModifyForecastRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct; + +@end + +@interface MTREnergyEVSEClusterDisableParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterEnableChargingParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterEnableDischargingParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterStartDiagnosticsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterSetTargetsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterGetTargetsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTREnergyEVSEClusterClearTargetsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRDoorLockClusterLockDoorParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -1330,6 +1516,30 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRChannelClusterGetProgramGuideParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRChannelClusterProgramGuideResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRChannelClusterRecordProgramParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRChannelClusterCancelRecordProgramParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRTargetNavigatorClusterNavigateTargetParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -1414,6 +1624,24 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRMediaPlaybackClusterActivateAudioTrackParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRMediaPlaybackClusterActivateTextTrackParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRMediaPlaybackClusterDeactivateTextTrackParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRMediaInputClusterSelectInputParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -1534,6 +1762,84 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRContentControlClusterUpdatePINParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterResetPINParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterResetPINResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRContentControlClusterEnableParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterDisableParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterAddBonusTimeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterSetScreenDailyTimeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterBlockUnratedContentParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterUnblockUnratedContentParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterSetOnDemandRatingThresholdParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterSetScheduledContentRatingThresholdParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentAppObserverClusterContentAppMessageParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentAppObserverClusterContentAppMessageResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType &)decodableStruct; + +@end + @interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 09ba232fc4c3d0..8d20da304754e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -374,9 +374,36 @@ static BOOL CommandNeedsTimedInvokeInICDManagementCluster(AttributeId aAttribute } } } -static BOOL CommandNeedsTimedInvokeInOvenOperationalStateCluster(AttributeId aAttributeId) +static BOOL CommandNeedsTimedInvokeInTimerCluster(AttributeId aAttributeId) { - using namespace Clusters::OvenOperationalState; + using namespace Clusters::Timer; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInOvenCavityOperationalStateCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenCavityOperationalState; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInOvenModeCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInLaundryDryerControlsCluster(AttributeId aAttributeId) +{ + using namespace Clusters::LaundryDryerControls; switch (aAttributeId) { default: { return NO; @@ -545,6 +572,81 @@ static BOOL CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(Attr } } } +static BOOL CommandNeedsTimedInvokeInBooleanStateConfigurationCluster(AttributeId aAttributeId) +{ + using namespace Clusters::BooleanStateConfiguration; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInValveConfigurationAndControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInElectricalEnergyMeasurementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ElectricalEnergyMeasurement; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInDeviceEnergyManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::DeviceEnergyManagement; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInEnergyEVSECluster(AttributeId aAttributeId) +{ + using namespace Clusters::EnergyEvse; + switch (aAttributeId) { + case Commands::Disable::Id: { + return YES; + } + case Commands::EnableCharging::Id: { + return YES; + } + case Commands::EnableDischarging::Id: { + return YES; + } + case Commands::StartDiagnostics::Id: { + return YES; + } + case Commands::SetTargets::Id: { + return YES; + } + case Commands::GetTargets::Id: { + return YES; + } + case Commands::ClearTargets::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInDoorLockCluster(AttributeId aAttributeId) { using namespace Clusters::DoorLock; @@ -911,6 +1013,24 @@ static BOOL CommandNeedsTimedInvokeInAccountLoginCluster(AttributeId aAttributeI } } } +static BOOL CommandNeedsTimedInvokeInContentControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ContentControl; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInContentAppObserverCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ContentAppObserver; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInElectricalMeasurementCluster(AttributeId aAttributeId) { using namespace Clusters::ElectricalMeasurement; @@ -1062,8 +1182,17 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::IcdManagement::Id: { return CommandNeedsTimedInvokeInICDManagementCluster(commandID); } - case Clusters::OvenOperationalState::Id: { - return CommandNeedsTimedInvokeInOvenOperationalStateCluster(commandID); + case Clusters::Timer::Id: { + return CommandNeedsTimedInvokeInTimerCluster(commandID); + } + case Clusters::OvenCavityOperationalState::Id: { + return CommandNeedsTimedInvokeInOvenCavityOperationalStateCluster(commandID); + } + case Clusters::OvenMode::Id: { + return CommandNeedsTimedInvokeInOvenModeCluster(commandID); + } + case Clusters::LaundryDryerControls::Id: { + return CommandNeedsTimedInvokeInLaundryDryerControlsCluster(commandID); } case Clusters::ModeSelect::Id: { return CommandNeedsTimedInvokeInModeSelectCluster(commandID); @@ -1119,6 +1248,24 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::ActivatedCarbonFilterMonitoring::Id: { return CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(commandID); } + case Clusters::BooleanStateConfiguration::Id: { + return CommandNeedsTimedInvokeInBooleanStateConfigurationCluster(commandID); + } + case Clusters::ValveConfigurationAndControl::Id: { + return CommandNeedsTimedInvokeInValveConfigurationAndControlCluster(commandID); + } + case Clusters::ElectricalEnergyMeasurement::Id: { + return CommandNeedsTimedInvokeInElectricalEnergyMeasurementCluster(commandID); + } + case Clusters::DemandResponseLoadControl::Id: { + return CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(commandID); + } + case Clusters::DeviceEnergyManagement::Id: { + return CommandNeedsTimedInvokeInDeviceEnergyManagementCluster(commandID); + } + case Clusters::EnergyEvse::Id: { + return CommandNeedsTimedInvokeInEnergyEVSECluster(commandID); + } case Clusters::DoorLock::Id: { return CommandNeedsTimedInvokeInDoorLockCluster(commandID); } @@ -1230,6 +1377,12 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::AccountLogin::Id: { return CommandNeedsTimedInvokeInAccountLoginCluster(commandID); } + case Clusters::ContentControl::Id: { + return CommandNeedsTimedInvokeInContentControlCluster(commandID); + } + case Clusters::ContentAppObserver::Id: { + return CommandNeedsTimedInvokeInContentAppObserverCluster(commandID); + } case Clusters::ElectricalMeasurement::Id: { return CommandNeedsTimedInvokeInElectricalMeasurementCluster(commandID); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index fde2bbe0d0682f..eadbca55e92339 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1644,9 +1644,21 @@ static id _Nullable DecodeEventPayloadForICDManagementCluster(EventId aEventId, *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForOvenOperationalStateCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeEventPayloadForTimerCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OvenOperationalState; + using namespace Clusters::Timer; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForOvenCavityOperationalStateCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OvenCavityOperationalState; switch (aEventId) { case Events::OperationalError::Id: { Events::OperationalError::DecodableType cppValue; @@ -1655,11 +1667,11 @@ static id _Nullable DecodeEventPayloadForOvenOperationalStateCluster(EventId aEv return nil; } - __auto_type * value = [MTROvenOperationalStateClusterOperationalErrorEvent new]; + __auto_type * value = [MTROvenCavityOperationalStateClusterOperationalErrorEvent new]; do { - MTROvenOperationalStateClusterErrorStateStruct * _Nonnull memberValue; - memberValue = [MTROvenOperationalStateClusterErrorStateStruct new]; + MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull memberValue; + memberValue = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; memberValue.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorState.errorStateID]; if (cppValue.errorState.errorStateLabel.HasValue()) { memberValue.errorStateLabel = AsString(cppValue.errorState.errorStateLabel.Value()); @@ -1693,7 +1705,7 @@ static id _Nullable DecodeEventPayloadForOvenOperationalStateCluster(EventId aEv return nil; } - __auto_type * value = [MTROvenOperationalStateClusterOperationCompletionEvent new]; + __auto_type * value = [MTROvenCavityOperationalStateClusterOperationCompletionEvent new]; do { NSNumber * _Nonnull memberValue; @@ -1737,6 +1749,30 @@ static id _Nullable DecodeEventPayloadForOvenOperationalStateCluster(EventId aEv *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForOvenModeCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OvenMode; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForLaundryDryerControlsCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryDryerControls; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ModeSelect; @@ -2224,104 +2260,782 @@ static id _Nullable DecodeEventPayloadForRVCOperationalStateCluster(EventId aEve return nil; } - __auto_type * value = [MTRRVCOperationalStateClusterOperationalErrorEvent new]; + __auto_type * value = [MTRRVCOperationalStateClusterOperationalErrorEvent new]; + + do { + MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull memberValue; + memberValue = [MTRRVCOperationalStateClusterErrorStateStruct new]; + memberValue.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorState.errorStateID]; + if (cppValue.errorState.errorStateLabel.HasValue()) { + memberValue.errorStateLabel = AsString(cppValue.errorState.errorStateLabel.Value()); + if (memberValue.errorStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + memberValue.errorStateLabel = nil; + } + if (cppValue.errorState.errorStateDetails.HasValue()) { + memberValue.errorStateDetails = AsString(cppValue.errorState.errorStateDetails.Value()); + if (memberValue.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + memberValue.errorStateDetails = nil; + } + value.errorState = memberValue; + } while (0); + + return value; + } + case Events::OperationCompletion::Id: { + Events::OperationCompletion::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRRVCOperationalStateClusterOperationCompletionEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.completionErrorCode]; + value.completionErrorCode = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.totalOperationalTime.HasValue()) { + if (cppValue.totalOperationalTime.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.totalOperationalTime.Value().Value()]; + } + } else { + memberValue = nil; + } + value.totalOperationalTime = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.pausedTime.HasValue()) { + if (cppValue.pausedTime.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.pausedTime.Value().Value()]; + } + } else { + memberValue = nil; + } + value.pausedTime = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForHEPAFilterMonitoringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::HepaFilterMonitoring; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ActivatedCarbonFilterMonitoring; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForBooleanStateConfigurationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BooleanStateConfiguration; + switch (aEventId) { + case Events::AlarmsStateChanged::Id: { + Events::AlarmsStateChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.alarmsActive.Raw()]; + value.alarmsActive = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.alarmsSuppressed.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.alarmsSuppressed.Value().Raw()]; + } else { + memberValue = nil; + } + value.alarmsSuppressed = memberValue; + } while (0); + + return value; + } + case Events::SensorFault::Id: { + Events::SensorFault::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRBooleanStateConfigurationClusterSensorFaultEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.sensorFault.Raw()]; + value.sensorFault = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForValveConfigurationAndControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aEventId) { + case Events::ValveStateChanged::Id: { + Events::ValveStateChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRValveConfigurationAndControlClusterValveStateChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.valveState)]; + value.valveState = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.valveLevel.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.valveLevel.Value()]; + } else { + memberValue = nil; + } + value.valveLevel = memberValue; + } while (0); + + return value; + } + case Events::ValveFault::Id: { + Events::ValveFault::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRValveConfigurationAndControlClusterValveFaultEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.valveFault.Raw()]; + value.valveFault = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForElectricalEnergyMeasurementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ElectricalEnergyMeasurement; + switch (aEventId) { + case Events::CumulativeEnergyMeasured::Id: { + Events::CumulativeEnergyMeasured::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent new]; + + do { + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable memberValue; + if (cppValue.energyImported.HasValue()) { + memberValue = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + memberValue.energy = [NSNumber numberWithLongLong:cppValue.energyImported.Value().energy]; + if (cppValue.energyImported.Value().startTimestamp.HasValue()) { + memberValue.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyImported.Value().startTimestamp.Value()]; + } else { + memberValue.startTimestamp = nil; + } + if (cppValue.energyImported.Value().endTimestamp.HasValue()) { + memberValue.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyImported.Value().endTimestamp.Value()]; + } else { + memberValue.endTimestamp = nil; + } + if (cppValue.energyImported.Value().startSystime.HasValue()) { + memberValue.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyImported.Value().startSystime.Value()]; + } else { + memberValue.startSystime = nil; + } + if (cppValue.energyImported.Value().endSystime.HasValue()) { + memberValue.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyImported.Value().endSystime.Value()]; + } else { + memberValue.endSystime = nil; + } + } else { + memberValue = nil; + } + value.energyImported = memberValue; + } while (0); + do { + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable memberValue; + if (cppValue.energyExported.HasValue()) { + memberValue = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + memberValue.energy = [NSNumber numberWithLongLong:cppValue.energyExported.Value().energy]; + if (cppValue.energyExported.Value().startTimestamp.HasValue()) { + memberValue.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyExported.Value().startTimestamp.Value()]; + } else { + memberValue.startTimestamp = nil; + } + if (cppValue.energyExported.Value().endTimestamp.HasValue()) { + memberValue.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyExported.Value().endTimestamp.Value()]; + } else { + memberValue.endTimestamp = nil; + } + if (cppValue.energyExported.Value().startSystime.HasValue()) { + memberValue.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyExported.Value().startSystime.Value()]; + } else { + memberValue.startSystime = nil; + } + if (cppValue.energyExported.Value().endSystime.HasValue()) { + memberValue.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyExported.Value().endSystime.Value()]; + } else { + memberValue.endSystime = nil; + } + } else { + memberValue = nil; + } + value.energyExported = memberValue; + } while (0); + + return value; + } + case Events::PeriodicEnergyMeasured::Id: { + Events::PeriodicEnergyMeasured::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent new]; + + do { + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable memberValue; + if (cppValue.energyImported.HasValue()) { + memberValue = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + memberValue.energy = [NSNumber numberWithLongLong:cppValue.energyImported.Value().energy]; + if (cppValue.energyImported.Value().startTimestamp.HasValue()) { + memberValue.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyImported.Value().startTimestamp.Value()]; + } else { + memberValue.startTimestamp = nil; + } + if (cppValue.energyImported.Value().endTimestamp.HasValue()) { + memberValue.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyImported.Value().endTimestamp.Value()]; + } else { + memberValue.endTimestamp = nil; + } + if (cppValue.energyImported.Value().startSystime.HasValue()) { + memberValue.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyImported.Value().startSystime.Value()]; + } else { + memberValue.startSystime = nil; + } + if (cppValue.energyImported.Value().endSystime.HasValue()) { + memberValue.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyImported.Value().endSystime.Value()]; + } else { + memberValue.endSystime = nil; + } + } else { + memberValue = nil; + } + value.energyImported = memberValue; + } while (0); + do { + MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable memberValue; + if (cppValue.energyExported.HasValue()) { + memberValue = [MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct new]; + memberValue.energy = [NSNumber numberWithLongLong:cppValue.energyExported.Value().energy]; + if (cppValue.energyExported.Value().startTimestamp.HasValue()) { + memberValue.startTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyExported.Value().startTimestamp.Value()]; + } else { + memberValue.startTimestamp = nil; + } + if (cppValue.energyExported.Value().endTimestamp.HasValue()) { + memberValue.endTimestamp = [NSNumber numberWithUnsignedInt:cppValue.energyExported.Value().endTimestamp.Value()]; + } else { + memberValue.endTimestamp = nil; + } + if (cppValue.energyExported.Value().startSystime.HasValue()) { + memberValue.startSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyExported.Value().startSystime.Value()]; + } else { + memberValue.startSystime = nil; + } + if (cppValue.energyExported.Value().endSystime.HasValue()) { + memberValue.endSystime = [NSNumber numberWithUnsignedLongLong:cppValue.energyExported.Value().endSystime.Value()]; + } else { + memberValue.endSystime = nil; + } + } else { + memberValue = nil; + } + value.energyExported = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForDemandResponseLoadControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aEventId) { + case Events::LoadControlEventStatusChange::Id: { + Events::LoadControlEventStatusChange::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRDemandResponseLoadControlClusterLoadControlEventStatusChangeEvent new]; + + do { + NSData * _Nonnull memberValue; + memberValue = AsData(cppValue.eventID); + value.eventID = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.transitionIndex.IsNull()) { + memberValue = nil; + } else { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.transitionIndex.Value()]; + } + value.transitionIndex = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.status)]; + value.status = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.criticality)]; + value.criticality = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.control.Raw()]; + value.control = memberValue; + } while (0); + do { + MTRDemandResponseLoadControlClusterTemperatureControlStruct * _Nullable memberValue; + if (cppValue.temperatureControl.HasValue()) { + if (cppValue.temperatureControl.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; + if (cppValue.temperatureControl.Value().Value().coolingTempOffset.HasValue()) { + if (cppValue.temperatureControl.Value().Value().coolingTempOffset.Value().IsNull()) { + memberValue.coolingTempOffset = nil; + } else { + memberValue.coolingTempOffset = [NSNumber numberWithUnsignedShort:cppValue.temperatureControl.Value().Value().coolingTempOffset.Value().Value()]; + } + } else { + memberValue.coolingTempOffset = nil; + } + if (cppValue.temperatureControl.Value().Value().heatingtTempOffset.HasValue()) { + if (cppValue.temperatureControl.Value().Value().heatingtTempOffset.Value().IsNull()) { + memberValue.heatingtTempOffset = nil; + } else { + memberValue.heatingtTempOffset = [NSNumber numberWithUnsignedShort:cppValue.temperatureControl.Value().Value().heatingtTempOffset.Value().Value()]; + } + } else { + memberValue.heatingtTempOffset = nil; + } + if (cppValue.temperatureControl.Value().Value().coolingTempSetpoint.HasValue()) { + if (cppValue.temperatureControl.Value().Value().coolingTempSetpoint.Value().IsNull()) { + memberValue.coolingTempSetpoint = nil; + } else { + memberValue.coolingTempSetpoint = [NSNumber numberWithShort:cppValue.temperatureControl.Value().Value().coolingTempSetpoint.Value().Value()]; + } + } else { + memberValue.coolingTempSetpoint = nil; + } + if (cppValue.temperatureControl.Value().Value().heatingTempSetpoint.HasValue()) { + if (cppValue.temperatureControl.Value().Value().heatingTempSetpoint.Value().IsNull()) { + memberValue.heatingTempSetpoint = nil; + } else { + memberValue.heatingTempSetpoint = [NSNumber numberWithShort:cppValue.temperatureControl.Value().Value().heatingTempSetpoint.Value().Value()]; + } + } else { + memberValue.heatingTempSetpoint = nil; + } + } + } else { + memberValue = nil; + } + value.temperatureControl = memberValue; + } while (0); + do { + MTRDemandResponseLoadControlClusterAverageLoadControlStruct * _Nullable memberValue; + if (cppValue.averageLoadControl.HasValue()) { + if (cppValue.averageLoadControl.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; + memberValue.loadAdjustment = [NSNumber numberWithChar:cppValue.averageLoadControl.Value().Value().loadAdjustment]; + } + } else { + memberValue = nil; + } + value.averageLoadControl = memberValue; + } while (0); + do { + MTRDemandResponseLoadControlClusterDutyCycleControlStruct * _Nullable memberValue; + if (cppValue.dutyCycleControl.HasValue()) { + if (cppValue.dutyCycleControl.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; + memberValue.dutyCycle = [NSNumber numberWithUnsignedChar:cppValue.dutyCycleControl.Value().Value().dutyCycle]; + } + } else { + memberValue = nil; + } + value.dutyCycleControl = memberValue; + } while (0); + do { + MTRDemandResponseLoadControlClusterPowerSavingsControlStruct * _Nullable memberValue; + if (cppValue.powerSavingsControl.HasValue()) { + if (cppValue.powerSavingsControl.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; + memberValue.powerSavings = [NSNumber numberWithUnsignedChar:cppValue.powerSavingsControl.Value().Value().powerSavings]; + } + } else { + memberValue = nil; + } + value.powerSavingsControl = memberValue; + } while (0); + do { + MTRDemandResponseLoadControlClusterHeatingSourceControlStruct * _Nullable memberValue; + if (cppValue.heatingSourceControl.HasValue()) { + if (cppValue.heatingSourceControl.Value().IsNull()) { + memberValue = nil; + } else { + memberValue = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; + memberValue.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.heatingSourceControl.Value().Value().heatingSource)]; + } + } else { + memberValue = nil; + } + value.heatingSourceControl = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForDeviceEnergyManagementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DeviceEnergyManagement; + switch (aEventId) { + case Events::PowerAdjustStart::Id: { + Events::PowerAdjustStart::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRDeviceEnergyManagementClusterPowerAdjustStartEvent new]; + + return value; + } + case Events::PowerAdjustEnd::Id: { + Events::PowerAdjustEnd::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRDeviceEnergyManagementClusterPowerAdjustEndEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.cause)]; + value.cause = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.duration]; + value.duration = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithLongLong:cppValue.energyUse]; + value.energyUse = memberValue; + } while (0); + + return value; + } + case Events::Paused::Id: { + Events::Paused::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRDeviceEnergyManagementClusterPausedEvent new]; + + return value; + } + case Events::Resumed::Id: { + Events::Resumed::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRDeviceEnergyManagementClusterResumedEvent new]; + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForEnergyEVSECluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::EnergyEvse; + switch (aEventId) { + case Events::EVConnected::Id: { + Events::EVConnected::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTREnergyEVSEClusterEVConnectedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionID]; + value.sessionID = memberValue; + } while (0); + + return value; + } + case Events::EVNotDetected::Id: { + Events::EVNotDetected::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTREnergyEVSEClusterEVNotDetectedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionID]; + value.sessionID = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.state)]; + value.state = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionDuration]; + value.sessionDuration = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithLongLong:cppValue.sessionEnergyCharged]; + value.sessionEnergyCharged = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.sessionEnergyDischarged.HasValue()) { + memberValue = [NSNumber numberWithLongLong:cppValue.sessionEnergyDischarged.Value()]; + } else { + memberValue = nil; + } + value.sessionEnergyDischarged = memberValue; + } while (0); + + return value; + } + case Events::EnergyTransferStarted::Id: { + Events::EnergyTransferStarted::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTREnergyEVSEClusterEnergyTransferStartedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionID]; + value.sessionID = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.state)]; + value.state = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithLongLong:cppValue.maximumCurrent]; + value.maximumCurrent = memberValue; + } while (0); + + return value; + } + case Events::EnergyTransferStopped::Id: { + Events::EnergyTransferStopped::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTREnergyEVSEClusterEnergyTransferStoppedEvent new]; do { - MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull memberValue; - memberValue = [MTRRVCOperationalStateClusterErrorStateStruct new]; - memberValue.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorState.errorStateID]; - if (cppValue.errorState.errorStateLabel.HasValue()) { - memberValue.errorStateLabel = AsString(cppValue.errorState.errorStateLabel.Value()); - if (memberValue.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - memberValue.errorStateLabel = nil; - } - if (cppValue.errorState.errorStateDetails.HasValue()) { - memberValue.errorStateDetails = AsString(cppValue.errorState.errorStateDetails.Value()); - if (memberValue.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - memberValue.errorStateDetails = nil; - } - value.errorState = memberValue; + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionID]; + value.sessionID = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.state)]; + value.state = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.reason)]; + value.reason = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithLongLong:cppValue.energyTransferred]; + value.energyTransferred = memberValue; } while (0); return value; } - case Events::OperationCompletion::Id: { - Events::OperationCompletion::DecodableType cppValue; + case Events::Fault::Id: { + Events::Fault::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - __auto_type * value = [MTRRVCOperationalStateClusterOperationCompletionEvent new]; + __auto_type * value = [MTREnergyEVSEClusterFaultEvent new]; - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.completionErrorCode]; - value.completionErrorCode = memberValue; - } while (0); do { NSNumber * _Nullable memberValue; - if (cppValue.totalOperationalTime.HasValue()) { - if (cppValue.totalOperationalTime.Value().IsNull()) { - memberValue = nil; - } else { - memberValue = [NSNumber numberWithUnsignedInt:cppValue.totalOperationalTime.Value().Value()]; - } - } else { + if (cppValue.sessionID.IsNull()) { memberValue = nil; + } else { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sessionID.Value()]; } - value.totalOperationalTime = memberValue; + value.sessionID = memberValue; } while (0); do { - NSNumber * _Nullable memberValue; - if (cppValue.pausedTime.HasValue()) { - if (cppValue.pausedTime.Value().IsNull()) { - memberValue = nil; - } else { - memberValue = [NSNumber numberWithUnsignedInt:cppValue.pausedTime.Value().Value()]; - } - } else { - memberValue = nil; - } - value.pausedTime = memberValue; + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.state)]; + value.state = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.faultStatePreviousState)]; + value.faultStatePreviousState = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.faultStateCurrentState)]; + value.faultStateCurrentState = memberValue; } while (0); return value; } - default: { - break; - } - } + case Events::Rfid::Id: { + Events::Rfid::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForHEPAFilterMonitoringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::HepaFilterMonitoring; - switch (aEventId) { - default: { - break; - } - } + __auto_type * value = [MTREnergyEVSEClusterRFIDEvent new]; - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} -static id _Nullable DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ActivatedCarbonFilterMonitoring; - switch (aEventId) { + do { + NSData * _Nonnull memberValue; + memberValue = AsData(cppValue.uid); + value.uid = memberValue; + } while (0); + + return value; + } default: { break; } @@ -3105,6 +3819,55 @@ static id _Nullable DecodeEventPayloadForTargetNavigatorCluster(EventId aEventId { using namespace Clusters::TargetNavigator; switch (aEventId) { + case Events::TargetUpdated::Id: { + Events::TargetUpdated::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRTargetNavigatorClusterTargetUpdatedEvent new]; + + do { + NSArray * _Nonnull memberValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.targetList.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; + newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; + newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + memberValue = array_0; + } + value.targetList = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.currentTarget]; + value.currentTarget = memberValue; + } while (0); + do { + NSData * _Nonnull memberValue; + memberValue = AsData(cppValue.data); + value.data = memberValue; + } while (0); + + return value; + } default: { break; } @@ -3117,6 +3880,73 @@ static id _Nullable DecodeEventPayloadForMediaPlaybackCluster(EventId aEventId, { using namespace Clusters::MediaPlayback; switch (aEventId) { + case Events::StateChanged::Id: { + Events::StateChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRMediaPlaybackClusterStateChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.currentState)]; + value.currentState = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.startTime]; + value.startTime = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.duration]; + value.duration = memberValue; + } while (0); + do { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nonnull memberValue; + memberValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + memberValue.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.updatedAt]; + if (cppValue.sampledPosition.position.IsNull()) { + memberValue.position = nil; + } else { + memberValue.position = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.position.Value()]; + } + value.sampledPosition = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithFloat:cppValue.playbackSpeed]; + value.playbackSpeed = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeEnd]; + value.seekRangeEnd = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeStart]; + value.seekRangeStart = memberValue; + } while (0); + do { + NSData * _Nullable memberValue; + if (cppValue.data.HasValue()) { + memberValue = AsData(cppValue.data.Value()); + } else { + memberValue = nil; + } + value.data = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithBool:cppValue.audioAdvanceUnmuted]; + value.audioAdvanceUnmuted = memberValue; + } while (0); + + return value; + } default: { break; } @@ -3213,6 +4043,62 @@ static id _Nullable DecodeEventPayloadForAccountLoginCluster(EventId aEventId, T { using namespace Clusters::AccountLogin; switch (aEventId) { + case Events::LoggedOut::Id: { + Events::LoggedOut::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRAccountLoginClusterLoggedOutEvent new]; + + do { + NSNumber * _Nullable memberValue; + if (cppValue.node.HasValue()) { + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.node.Value()]; + } else { + memberValue = nil; + } + value.node = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForContentControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ContentControl; + switch (aEventId) { + case Events::RemainingScreenTimeExpired::Id: { + Events::RemainingScreenTimeExpired::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRContentControlClusterRemainingScreenTimeExpiredEvent new]; + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForContentAppObserverCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ContentAppObserver; + switch (aEventId) { default: { break; } @@ -3364,6 +4250,28 @@ static id _Nullable DecodeEventPayloadForSampleMEICluster(EventId aEventId, TLV: { using namespace Clusters::SampleMei; switch (aEventId) { + case Events::PingCountEvent::Id: { + Events::PingCountEvent::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRSampleMEIClusterPingCountEventEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedInt:cppValue.count]; + value.count = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; + } while (0); + + return value; + } default: { break; } @@ -3490,8 +4398,17 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::IcdManagement::Id: { return DecodeEventPayloadForICDManagementCluster(aPath.mEventId, aReader, aError); } - case Clusters::OvenOperationalState::Id: { - return DecodeEventPayloadForOvenOperationalStateCluster(aPath.mEventId, aReader, aError); + case Clusters::Timer::Id: { + return DecodeEventPayloadForTimerCluster(aPath.mEventId, aReader, aError); + } + case Clusters::OvenCavityOperationalState::Id: { + return DecodeEventPayloadForOvenCavityOperationalStateCluster(aPath.mEventId, aReader, aError); + } + case Clusters::OvenMode::Id: { + return DecodeEventPayloadForOvenModeCluster(aPath.mEventId, aReader, aError); + } + case Clusters::LaundryDryerControls::Id: { + return DecodeEventPayloadForLaundryDryerControlsCluster(aPath.mEventId, aReader, aError); } case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); @@ -3547,6 +4464,24 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(aPath.mEventId, aReader, aError); } + case Clusters::BooleanStateConfiguration::Id: { + return DecodeEventPayloadForBooleanStateConfigurationCluster(aPath.mEventId, aReader, aError); + } + case Clusters::ValveConfigurationAndControl::Id: { + return DecodeEventPayloadForValveConfigurationAndControlCluster(aPath.mEventId, aReader, aError); + } + case Clusters::ElectricalEnergyMeasurement::Id: { + return DecodeEventPayloadForElectricalEnergyMeasurementCluster(aPath.mEventId, aReader, aError); + } + case Clusters::DemandResponseLoadControl::Id: { + return DecodeEventPayloadForDemandResponseLoadControlCluster(aPath.mEventId, aReader, aError); + } + case Clusters::DeviceEnergyManagement::Id: { + return DecodeEventPayloadForDeviceEnergyManagementCluster(aPath.mEventId, aReader, aError); + } + case Clusters::EnergyEvse::Id: { + return DecodeEventPayloadForEnergyEVSECluster(aPath.mEventId, aReader, aError); + } case Clusters::DoorLock::Id: { return DecodeEventPayloadForDoorLockCluster(aPath.mEventId, aReader, aError); } @@ -3658,6 +4593,12 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::AccountLogin::Id: { return DecodeEventPayloadForAccountLoginCluster(aPath.mEventId, aReader, aError); } + case Clusters::ContentControl::Id: { + return DecodeEventPayloadForContentControlCluster(aPath.mEventId, aReader, aError); + } + case Clusters::ContentAppObserver::Id: { + return DecodeEventPayloadForContentAppObserverCluster(aPath.mEventId, aReader, aError); + } case Clusters::ElectricalMeasurement::Id: { return DecodeEventPayloadForElectricalMeasurementCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f21ab0de331f4c..1c6fc64a88d0c4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -33,6 +33,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull attributeValueList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesClusterSceneInfoStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sceneCount MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentScene MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentGroup MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sceneValid MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull remainingCapacity MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -781,30 +791,43 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterErrorStateStruct : NSObject +@interface MTROvenCavityOperationalStateClusterErrorStateStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterOperationalStateStruct : NSObject +@interface MTROvenCavityOperationalStateClusterOperationalStateStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTROvenOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_PROVISIONALLY_AVAILABLE; +@interface MTROvenCavityOperationalStateClusterOperationalErrorEvent : NSObject +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenOperationalStateClusterOperationCompletionEvent : NSObject +@interface MTROvenCavityOperationalStateClusterOperationCompletionEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterModeTagStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterModeOptionStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRModeSelectClusterSemanticTagStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull mfgCode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -850,30 +873,30 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCRunModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCRunModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCCleanModeClusterModeTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCCleanModeClusterModeOptionStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -967,54 +990,54 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterErrorStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterOperationalStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTROperationalStateClusterOperationCompletionEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterErrorStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateLabel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable errorStateDetails MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterOperationalStateStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull operationalStateID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable operationalStateLabel MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterOperationalErrorEvent : NSObject -@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull errorState MTR_NEWLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRRVCOperationalStateClusterOperationCompletionEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull completionErrorCode MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_NEWLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -1029,6 +1052,278 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSString * _Nonnull productIdentifierValue MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull alarmsActive MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable alarmsSuppressed MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanStateConfigurationClusterSensorFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sensorFault MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterValveStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull valveState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable valveLevel MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterValveFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull valveFault MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull rangeMin MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull rangeMax MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable percentMax MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable percentMin MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable percentTypical MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable fixedMax MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable fixedMin MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable fixedTypical MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull measurementType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull measured MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minMeasuredValue MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxMeasuredValue MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull accuracyRanges MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull energy MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startTimestamp MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable endTimestamp MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startSystime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable endSystime MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent : NSObject +@property (nonatomic, copy) MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable energyImported MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable energyExported MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent : NSObject +@property (nonatomic, copy) MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable energyImported MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable energyExported MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterHeatingSourceControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull heatingSource MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterPowerSavingsControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull powerSavings MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterDutyCycleControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull dutyCycle MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterAverageLoadControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull loadAdjustment MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterTemperatureControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable coolingTempOffset MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatingtTempOffset MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolingTempSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatingTempSetpoint MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull control MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterTemperatureControlStruct * _Nullable temperatureControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterAverageLoadControlStruct * _Nullable averageLoadControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterDutyCycleControlStruct * _Nullable dutyCycleControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterPowerSavingsControlStruct * _Nullable powerSavingsControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterHeatingSourceControlStruct * _Nullable heatingSourceControl MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterLoadControlEventStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull eventID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable programID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull control MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull deviceClass MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable enrollmentGroup MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull criticality MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterLoadControlProgramStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull programID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable enrollmentGroup MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable randomStartMinutes MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable randomDurationMinutes MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDemandResponseLoadControlClusterLoadControlEventStatusChangeEvent : NSObject +@property (nonatomic, copy) NSData * _Nonnull eventID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable transitionIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull criticality MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull control MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterTemperatureControlStruct * _Nullable temperatureControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterAverageLoadControlStruct * _Nullable averageLoadControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterDutyCycleControlStruct * _Nullable dutyCycleControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterPowerSavingsControlStruct * _Nullable powerSavingsControl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRDemandResponseLoadControlClusterHeatingSourceControlStruct * _Nullable heatingSourceControl MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterCostStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull costType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull decimalPoints MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable currency MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterSlotStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull minDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull defaultDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull elapsedSlotTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull remainingSlotTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull slotIsPauseable MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minPauseDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxPauseDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable manufacturerESAState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable nominalPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable nominalEnergy MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable costs MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minPowerAdjustment MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxPowerAdjustment MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minDurationAdjustment MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxDurationAdjustment MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterForecastStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull forecastId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable activeSlotNumber MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull endTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable earliestStartTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable latestEndTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull isPauseable MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull slots MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterConstraintsStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable nominalPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maximumEnergy MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable loadControl MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterPowerAdjustStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull minPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxDuration MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterSlotAdjustmentStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull slotIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull nominalPower MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterPowerAdjustStartEvent : NSObject +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterPowerAdjustEndEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull cause MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull energyUse MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterPausedEvent : NSObject +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDeviceEnergyManagementClusterResumedEvent : NSObject +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterChargingTargetStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull targetTimeMinutesPastMidnight MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetSoC MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable addedEnergy MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterEVConnectedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterEVNotDetectedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sessionDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sessionEnergyCharged MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable sessionEnergyDischarged MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterEnergyTransferStartedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maximumCurrent MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterEnergyTransferStoppedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull reason MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull energyTransferred MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable sessionID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull state MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull faultStatePreviousState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull faultStateCurrentState MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTREnergyEVSEClusterRFIDEvent : NSObject +@property (nonatomic, copy) NSData * _Nonnull uid MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRDoorLockClusterCredentialStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull credentialType MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1151,11 +1446,40 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @end +MTR_NEWLY_AVAILABLE +@interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_NEWLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterThermostatScheduleTransition : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct") +@interface MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterProgramCastStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull role MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterProgramCategoryStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull category MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable subCategory MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterSeriesInfoStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull season MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull episode MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1165,6 +1489,8 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy) NSString * _Nullable name MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @property (nonatomic, copy) NSString * _Nullable callSign MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @property (nonatomic, copy) NSString * _Nullable affiliateCallSign MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSString * _Nullable identifier MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable type MTR_PROVISIONALLY_AVAILABLE; @end MTR_DEPRECATED("Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -1176,6 +1502,48 @@ MTR_DEPRECATED("Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), @property (nonatomic, copy) NSString * _Nullable affiliateCallSign MTR_DEPRECATED("Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterProgramStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull identifier MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRChannelClusterChannelInfoStruct * _Nonnull channel MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull endTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull title MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable subtitle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable descriptionString MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable audioLanguages MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable ratings MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable thumbnailUrl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable posterArtUrl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable dvbiUrl MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable releaseDate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable parentalGuidanceText MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable recordingFlag MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRChannelClusterSeriesInfoStruct * _Nullable seriesInfo MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable categoryList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable castList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable externalIDList MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterPageTokenStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable limit MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable after MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable before MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterChannelPagingStruct : NSObject +@property (nonatomic, copy) MTRChannelClusterPageTokenStruct * _Nullable previousToken MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRChannelClusterPageTokenStruct * _Nullable nextToken MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterAdditionalInfoStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRChannelClusterLineupInfoStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull operatorName MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1204,6 +1572,25 @@ MTR_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct", ios(16.1, @property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTargetNavigatorClusterTargetUpdatedEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull targetList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentTarget MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterTrackAttributesStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull languageCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable displayName MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterTrackStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull id MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRMediaPlaybackClusterTrackAttributesStruct * _Nullable trackAttributes MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRMediaPlaybackClusterPlaybackPositionStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull updatedAt MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1216,6 +1603,19 @@ MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", ios(1 @property (nonatomic, copy) NSNumber * _Nullable position MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRMediaPlaybackClusterStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull currentState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRMediaPlaybackClusterPlaybackPositionStruct * _Nonnull sampledPosition MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull playbackSpeed MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull seekRangeEnd MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull seekRangeStart MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull audioAdvanceUnmuted MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRMediaInputClusterInputInfoStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull index MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1246,6 +1646,20 @@ MTR_DEPRECATED("Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, @property (nonatomic, copy) NSNumber * _Nonnull metric MTR_DEPRECATED("Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentLauncherClusterTrackPreferenceStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull languageCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable characteristics MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentLauncherClusterPlaybackPreferencesStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull playbackPosition MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRContentLauncherClusterTrackPreferenceStruct * _Nonnull textTrack MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable audioTracks MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterAdditionalInfoStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull name MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1366,6 +1780,21 @@ MTR_DEPRECATED("Please use MTRApplicationBasicClusterApplicationStruct", ios(16. @interface MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRAccountLoginClusterLoggedOutEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable node MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterRatingNameStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull ratingName MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable ratingNameDesc MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterRemainingScreenTimeExpiredEvent : NSObject +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterSimpleStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1534,4 +1963,10 @@ MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRSampleMEIClusterPingCountEventEvent : NSObject +@property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 62a6defa28479a..81d7f3b773b4b0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -99,6 +99,48 @@ - (NSNumber * _Nonnull)clusterId @end +@implementation MTRScenesClusterSceneInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _sceneCount = @(0); + + _currentScene = @(0); + + _currentGroup = @(0); + + _sceneValid = @(0); + + _remainingCapacity = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRScenesClusterSceneInfoStruct alloc] init]; + + other.sceneCount = self.sceneCount; + other.currentScene = self.currentScene; + other.currentGroup = self.currentGroup; + other.sceneValid = self.sceneValid; + other.remainingCapacity = self.remainingCapacity; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sceneCount:%@; currentScene:%@; currentGroup:%@; sceneValid:%@; remainingCapacity:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _sceneCount, _currentScene, _currentGroup, _sceneValid, _remainingCapacity, _fabricIndex]; + return descriptionString; +} + +@end + @implementation MTRDescriptorClusterDeviceTypeStruct - (instancetype)init { @@ -2878,7 +2920,7 @@ - (NSString *)description @end -@implementation MTROvenOperationalStateClusterErrorStateStruct +@implementation MTROvenCavityOperationalStateClusterErrorStateStruct - (instancetype)init { if (self = [super init]) { @@ -2894,7 +2936,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTROvenOperationalStateClusterErrorStateStruct alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterErrorStateStruct alloc] init]; other.errorStateID = self.errorStateID; other.errorStateLabel = self.errorStateLabel; @@ -2911,7 +2953,7 @@ - (NSString *)description @end -@implementation MTROvenOperationalStateClusterOperationalStateStruct +@implementation MTROvenCavityOperationalStateClusterOperationalStateStruct - (instancetype)init { if (self = [super init]) { @@ -2925,7 +2967,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTROvenOperationalStateClusterOperationalStateStruct alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterOperationalStateStruct alloc] init]; other.operationalStateID = self.operationalStateID; other.operationalStateLabel = self.operationalStateLabel; @@ -2941,19 +2983,19 @@ - (NSString *)description @end -@implementation MTROvenOperationalStateClusterOperationalErrorEvent +@implementation MTROvenCavityOperationalStateClusterOperationalErrorEvent - (instancetype)init { if (self = [super init]) { - _errorState = [MTROvenOperationalStateClusterErrorStateStruct new]; + _errorState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTROvenOperationalStateClusterOperationalErrorEvent alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterOperationalErrorEvent alloc] init]; other.errorState = self.errorState; @@ -2968,7 +3010,7 @@ - (NSString *)description @end -@implementation MTROvenOperationalStateClusterOperationCompletionEvent +@implementation MTROvenCavityOperationalStateClusterOperationCompletionEvent - (instancetype)init { if (self = [super init]) { @@ -2984,7 +3026,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTROvenOperationalStateClusterOperationCompletionEvent alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterOperationCompletionEvent alloc] init]; other.completionErrorCode = self.completionErrorCode; other.totalOperationalTime = self.totalOperationalTime; @@ -3001,6 +3043,69 @@ - (NSString *)description @end +@implementation MTROvenModeClusterModeTagStruct +- (instancetype)init +{ + if (self = [super init]) { + + _mfgCode = nil; + + _value = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTROvenModeClusterModeTagStruct alloc] init]; + + other.mfgCode = self.mfgCode; + other.value = self.value; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mfgCode:%@; value:%@; >", NSStringFromClass([self class]), _mfgCode, _value]; + return descriptionString; +} + +@end + +@implementation MTROvenModeClusterModeOptionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _label = @""; + + _mode = @(0); + + _modeTags = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTROvenModeClusterModeOptionStruct alloc] init]; + + other.label = self.label; + other.mode = self.mode; + other.modeTags = self.modeTags; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; mode:%@; modeTags:%@; >", NSStringFromClass([self class]), _label, _mode, _modeTags]; + return descriptionString; +} + +@end + @implementation MTRModeSelectClusterSemanticTagStruct - (instancetype)init { @@ -4098,537 +4203,917 @@ - (NSString *)description @end -@implementation MTRDoorLockClusterCredentialStruct +@implementation MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent - (instancetype)init { if (self = [super init]) { - _credentialType = @(0); + _alarmsActive = @(0); - _credentialIndex = @(0); + _alarmsSuppressed = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterCredentialStruct alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent alloc] init]; - other.credentialType = self.credentialType; - other.credentialIndex = self.credentialIndex; + other.alarmsActive = self.alarmsActive; + other.alarmsSuppressed = self.alarmsSuppressed; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialType:%@; credentialIndex:%@; >", NSStringFromClass([self class]), _credentialType, _credentialIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsActive:%@; alarmsSuppressed:%@; >", NSStringFromClass([self class]), _alarmsActive, _alarmsSuppressed]; return descriptionString; } @end -@implementation MTRDoorLockClusterDlCredential : MTRDoorLockClusterCredentialStruct -@dynamic credentialType; -@dynamic credentialIndex; -@end - -@implementation MTRDoorLockClusterDoorLockAlarmEvent +@implementation MTRBooleanStateConfigurationClusterSensorFaultEvent - (instancetype)init { if (self = [super init]) { - _alarmCode = @(0); + _sensorFault = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterSensorFaultEvent alloc] init]; - other.alarmCode = self.alarmCode; + other.sensorFault = self.sensorFault; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmCode:%@; >", NSStringFromClass([self class]), _alarmCode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sensorFault:%@; >", NSStringFromClass([self class]), _sensorFault]; return descriptionString; } @end -@implementation MTRDoorLockClusterDoorStateChangeEvent +@implementation MTRValveConfigurationAndControlClusterValveStateChangedEvent - (instancetype)init { if (self = [super init]) { - _doorState = @(0); + _valveState = @(0); + + _valveLevel = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterValveStateChangedEvent alloc] init]; - other.doorState = self.doorState; + other.valveState = self.valveState; + other.valveLevel = self.valveLevel; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: doorState:%@; >", NSStringFromClass([self class]), _doorState]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: valveState:%@; valveLevel:%@; >", NSStringFromClass([self class]), _valveState, _valveLevel]; return descriptionString; } @end -@implementation MTRDoorLockClusterLockOperationEvent +@implementation MTRValveConfigurationAndControlClusterValveFaultEvent - (instancetype)init { if (self = [super init]) { - _lockOperationType = @(0); - - _operationSource = @(0); - - _userIndex = nil; - - _fabricIndex = nil; - - _sourceNode = nil; - - _credentials = nil; + _valveFault = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterValveFaultEvent alloc] init]; - other.lockOperationType = self.lockOperationType; - other.operationSource = self.operationSource; - other.userIndex = self.userIndex; - other.fabricIndex = self.fabricIndex; - other.sourceNode = self.sourceNode; - other.credentials = self.credentials; + other.valveFault = self.valveFault; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", NSStringFromClass([self class]), _lockOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _credentials]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: valveFault:%@; >", NSStringFromClass([self class]), _valveFault]; return descriptionString; } @end -@implementation MTRDoorLockClusterLockOperationErrorEvent +@implementation MTRElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct - (instancetype)init { if (self = [super init]) { - _lockOperationType = @(0); + _rangeMin = @(0); - _operationSource = @(0); + _rangeMax = @(0); - _operationError = @(0); + _percentMax = nil; - _userIndex = nil; + _percentMin = nil; - _fabricIndex = nil; + _percentTypical = nil; - _sourceNode = nil; + _fixedMax = nil; - _credentials = nil; + _fixedMin = nil; + + _fixedTypical = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; + auto other = [[MTRElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct alloc] init]; - other.lockOperationType = self.lockOperationType; - other.operationSource = self.operationSource; - other.operationError = self.operationError; - other.userIndex = self.userIndex; - other.fabricIndex = self.fabricIndex; - other.sourceNode = self.sourceNode; - other.credentials = self.credentials; + other.rangeMin = self.rangeMin; + other.rangeMax = self.rangeMax; + other.percentMax = self.percentMax; + other.percentMin = self.percentMin; + other.percentTypical = self.percentTypical; + other.fixedMax = self.fixedMax; + other.fixedMin = self.fixedMin; + other.fixedTypical = self.fixedTypical; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; operationError:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", NSStringFromClass([self class]), _lockOperationType, _operationSource, _operationError, _userIndex, _fabricIndex, _sourceNode, _credentials]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rangeMin:%@; rangeMax:%@; percentMax:%@; percentMin:%@; percentTypical:%@; fixedMax:%@; fixedMin:%@; fixedTypical:%@; >", NSStringFromClass([self class]), _rangeMin, _rangeMax, _percentMax, _percentMin, _percentTypical, _fixedMax, _fixedMin, _fixedTypical]; return descriptionString; } @end -@implementation MTRDoorLockClusterLockUserChangeEvent +@implementation MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct - (instancetype)init { if (self = [super init]) { - _lockDataType = @(0); - - _dataOperationType = @(0); - - _operationSource = @(0); + _measurementType = @(0); - _userIndex = nil; + _measured = @(0); - _fabricIndex = nil; + _minMeasuredValue = @(0); - _sourceNode = nil; + _maxMeasuredValue = @(0); - _dataIndex = nil; + _accuracyRanges = [NSArray array]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; + auto other = [[MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct alloc] init]; - other.lockDataType = self.lockDataType; - other.dataOperationType = self.dataOperationType; - other.operationSource = self.operationSource; - other.userIndex = self.userIndex; - other.fabricIndex = self.fabricIndex; - other.sourceNode = self.sourceNode; - other.dataIndex = self.dataIndex; + other.measurementType = self.measurementType; + other.measured = self.measured; + other.minMeasuredValue = self.minMeasuredValue; + other.maxMeasuredValue = self.maxMeasuredValue; + other.accuracyRanges = self.accuracyRanges; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockDataType:%@; dataOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; dataIndex:%@; >", NSStringFromClass([self class]), _lockDataType, _dataOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _dataIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: measurementType:%@; measured:%@; minMeasuredValue:%@; maxMeasuredValue:%@; accuracyRanges:%@; >", NSStringFromClass([self class]), _measurementType, _measured, _minMeasuredValue, _maxMeasuredValue, _accuracyRanges]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent +@implementation MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct - (instancetype)init { if (self = [super init]) { + + _energy = @(0); + + _startTimestamp = nil; + + _endTimestamp = nil; + + _startSystime = nil; + + _endSystime = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; + auto other = [[MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct alloc] init]; + + other.energy = self.energy; + other.startTimestamp = self.startTimestamp; + other.endTimestamp = self.endTimestamp; + other.startSystime = self.startSystime; + other.endSystime = self.endSystime; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: energy:%@; startTimestamp:%@; endTimestamp:%@; startSystime:%@; endSystime:%@; >", NSStringFromClass([self class]), _energy, _startTimestamp, _endTimestamp, _startSystime, _endSystime]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent +@implementation MTRElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent - (instancetype)init { if (self = [super init]) { + + _energyImported = nil; + + _energyExported = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; + auto other = [[MTRElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent alloc] init]; + + other.energyImported = self.energyImported; + other.energyExported = self.energyExported; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: energyImported:%@; energyExported:%@; >", NSStringFromClass([self class]), _energyImported, _energyExported]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent +@implementation MTRElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent - (instancetype)init { if (self = [super init]) { + + _energyImported = nil; + + _energyExported = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; + auto other = [[MTRElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent alloc] init]; + + other.energyImported = self.energyImported; + other.energyExported = self.energyExported; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: energyImported:%@; energyExported:%@; >", NSStringFromClass([self class]), _energyImported, _energyExported]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterSystemPressureLowEvent +@implementation MTRDemandResponseLoadControlClusterHeatingSourceControlStruct - (instancetype)init { if (self = [super init]) { + + _heatingSource = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterHeatingSourceControlStruct alloc] init]; + + other.heatingSource = self.heatingSource; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: heatingSource:%@; >", NSStringFromClass([self class]), _heatingSource]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterSystemPressureHighEvent +@implementation MTRDemandResponseLoadControlClusterPowerSavingsControlStruct - (instancetype)init { if (self = [super init]) { + + _powerSavings = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterPowerSavingsControlStruct alloc] init]; + + other.powerSavings = self.powerSavings; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: powerSavings:%@; >", NSStringFromClass([self class]), _powerSavings]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterDryRunningEvent +@implementation MTRDemandResponseLoadControlClusterDutyCycleControlStruct - (instancetype)init { if (self = [super init]) { + + _dutyCycle = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterDutyCycleControlStruct alloc] init]; + + other.dutyCycle = self.dutyCycle; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dutyCycle:%@; >", NSStringFromClass([self class]), _dutyCycle]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent +@implementation MTRDemandResponseLoadControlClusterAverageLoadControlStruct - (instancetype)init { if (self = [super init]) { + + _loadAdjustment = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterAverageLoadControlStruct alloc] init]; + + other.loadAdjustment = self.loadAdjustment; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadAdjustment:%@; >", NSStringFromClass([self class]), _loadAdjustment]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent +@implementation MTRDemandResponseLoadControlClusterTemperatureControlStruct - (instancetype)init { if (self = [super init]) { + + _coolingTempOffset = nil; + + _heatingtTempOffset = nil; + + _coolingTempSetpoint = nil; + + _heatingTempSetpoint = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterTemperatureControlStruct alloc] init]; + + other.coolingTempOffset = self.coolingTempOffset; + other.heatingtTempOffset = self.heatingtTempOffset; + other.coolingTempSetpoint = self.coolingTempSetpoint; + other.heatingTempSetpoint = self.heatingTempSetpoint; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: coolingTempOffset:%@; heatingtTempOffset:%@; coolingTempSetpoint:%@; heatingTempSetpoint:%@; >", NSStringFromClass([self class]), _coolingTempOffset, _heatingtTempOffset, _coolingTempSetpoint, _heatingTempSetpoint]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent +@implementation MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct - (instancetype)init { if (self = [super init]) { + + _duration = @(0); + + _control = @(0); + + _temperatureControl = nil; + + _averageLoadControl = nil; + + _dutyCycleControl = nil; + + _powerSavingsControl = nil; + + _heatingSourceControl = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct alloc] init]; + + other.duration = self.duration; + other.control = self.control; + other.temperatureControl = self.temperatureControl; + other.averageLoadControl = self.averageLoadControl; + other.dutyCycleControl = self.dutyCycleControl; + other.powerSavingsControl = self.powerSavingsControl; + other.heatingSourceControl = self.heatingSourceControl; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; control:%@; temperatureControl:%@; averageLoadControl:%@; dutyCycleControl:%@; powerSavingsControl:%@; heatingSourceControl:%@; >", NSStringFromClass([self class]), _duration, _control, _temperatureControl, _averageLoadControl, _dutyCycleControl, _powerSavingsControl, _heatingSourceControl]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterPumpBlockedEvent +@implementation MTRDemandResponseLoadControlClusterLoadControlEventStruct - (instancetype)init { if (self = [super init]) { + + _eventID = [NSData data]; + + _programID = nil; + + _control = @(0); + + _deviceClass = @(0); + + _enrollmentGroup = nil; + + _criticality = @(0); + + _startTime = nil; + + _transitions = [NSArray array]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterLoadControlEventStruct alloc] init]; + + other.eventID = self.eventID; + other.programID = self.programID; + other.control = self.control; + other.deviceClass = self.deviceClass; + other.enrollmentGroup = self.enrollmentGroup; + other.criticality = self.criticality; + other.startTime = self.startTime; + other.transitions = self.transitions; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: eventID:%@; programID:%@; control:%@; deviceClass:%@; enrollmentGroup:%@; criticality:%@; startTime:%@; transitions:%@; >", NSStringFromClass([self class]), [_eventID base64EncodedStringWithOptions:0], [_programID base64EncodedStringWithOptions:0], _control, _deviceClass, _enrollmentGroup, _criticality, _startTime, _transitions]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterSensorFailureEvent +@implementation MTRDemandResponseLoadControlClusterLoadControlProgramStruct - (instancetype)init { if (self = [super init]) { + + _programID = [NSData data]; + + _name = @""; + + _enrollmentGroup = nil; + + _randomStartMinutes = nil; + + _randomDurationMinutes = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterLoadControlProgramStruct alloc] init]; + + other.programID = self.programID; + other.name = self.name; + other.enrollmentGroup = self.enrollmentGroup; + other.randomStartMinutes = self.randomStartMinutes; + other.randomDurationMinutes = self.randomDurationMinutes; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: programID:%@; name:%@; enrollmentGroup:%@; randomStartMinutes:%@; randomDurationMinutes:%@; >", NSStringFromClass([self class]), [_programID base64EncodedStringWithOptions:0], _name, _enrollmentGroup, _randomStartMinutes, _randomDurationMinutes]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent +@implementation MTRDemandResponseLoadControlClusterLoadControlEventStatusChangeEvent - (instancetype)init { if (self = [super init]) { - } - return self; -} -- (id)copyWithZone:(NSZone * _Nullable)zone + _eventID = [NSData data]; + + _transitionIndex = nil; + + _status = @(0); + + _criticality = @(0); + + _control = @(0); + + _temperatureControl = nil; + + _averageLoadControl = nil; + + _dutyCycleControl = nil; + + _powerSavingsControl = nil; + + _heatingSourceControl = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterLoadControlEventStatusChangeEvent alloc] init]; + + other.eventID = self.eventID; + other.transitionIndex = self.transitionIndex; + other.status = self.status; + other.criticality = self.criticality; + other.control = self.control; + other.temperatureControl = self.temperatureControl; + other.averageLoadControl = self.averageLoadControl; + other.dutyCycleControl = self.dutyCycleControl; + other.powerSavingsControl = self.powerSavingsControl; + other.heatingSourceControl = self.heatingSourceControl; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: eventID:%@; transitionIndex:%@; status:%@; criticality:%@; control:%@; temperatureControl:%@; averageLoadControl:%@; dutyCycleControl:%@; powerSavingsControl:%@; heatingSourceControl:%@; >", NSStringFromClass([self class]), [_eventID base64EncodedStringWithOptions:0], _transitionIndex, _status, _criticality, _control, _temperatureControl, _averageLoadControl, _dutyCycleControl, _powerSavingsControl, _heatingSourceControl]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent +@implementation MTRDeviceEnergyManagementClusterCostStruct - (instancetype)init { if (self = [super init]) { + + _costType = @(0); + + _value = @(0); + + _decimalPoints = @(0); + + _currency = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterCostStruct alloc] init]; + + other.costType = self.costType; + other.value = self.value; + other.decimalPoints = self.decimalPoints; + other.currency = self.currency; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: costType:%@; value:%@; decimalPoints:%@; currency:%@; >", NSStringFromClass([self class]), _costType, _value, _decimalPoints, _currency]; return descriptionString; } @end -@implementation MTRPumpConfigurationAndControlClusterGeneralFaultEvent +@implementation MTRDeviceEnergyManagementClusterSlotStruct - (instancetype)init { if (self = [super init]) { + + _minDuration = @(0); + + _maxDuration = @(0); + + _defaultDuration = @(0); + + _elapsedSlotTime = @(0); + + _remainingSlotTime = @(0); + + _slotIsPauseable = @(0); + + _minPauseDuration = @(0); + + _maxPauseDuration = @(0); + + _manufacturerESAState = nil; + + _nominalPower = nil; + + _minPower = nil; + + _maxPower = nil; + + _nominalEnergy = nil; + + _costs = nil; + + _minPowerAdjustment = nil; + + _maxPowerAdjustment = nil; + + _minDurationAdjustment = nil; + + _maxDurationAdjustment = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterSlotStruct alloc] init]; + + other.minDuration = self.minDuration; + other.maxDuration = self.maxDuration; + other.defaultDuration = self.defaultDuration; + other.elapsedSlotTime = self.elapsedSlotTime; + other.remainingSlotTime = self.remainingSlotTime; + other.slotIsPauseable = self.slotIsPauseable; + other.minPauseDuration = self.minPauseDuration; + other.maxPauseDuration = self.maxPauseDuration; + other.manufacturerESAState = self.manufacturerESAState; + other.nominalPower = self.nominalPower; + other.minPower = self.minPower; + other.maxPower = self.maxPower; + other.nominalEnergy = self.nominalEnergy; + other.costs = self.costs; + other.minPowerAdjustment = self.minPowerAdjustment; + other.maxPowerAdjustment = self.maxPowerAdjustment; + other.minDurationAdjustment = self.minDurationAdjustment; + other.maxDurationAdjustment = self.maxDurationAdjustment; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: minDuration:%@; maxDuration:%@; defaultDuration:%@; elapsedSlotTime:%@; remainingSlotTime:%@; slotIsPauseable:%@; minPauseDuration:%@; maxPauseDuration:%@; manufacturerESAState:%@; nominalPower:%@; minPower:%@; maxPower:%@; nominalEnergy:%@; costs:%@; minPowerAdjustment:%@; maxPowerAdjustment:%@; minDurationAdjustment:%@; maxDurationAdjustment:%@; >", NSStringFromClass([self class]), _minDuration, _maxDuration, _defaultDuration, _elapsedSlotTime, _remainingSlotTime, _slotIsPauseable, _minPauseDuration, _maxPauseDuration, _manufacturerESAState, _nominalPower, _minPower, _maxPower, _nominalEnergy, _costs, _minPowerAdjustment, _maxPowerAdjustment, _minDurationAdjustment, _maxDurationAdjustment]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterForecastStruct +- (instancetype)init +{ + if (self = [super init]) { + + _forecastId = @(0); + + _activeSlotNumber = nil; + + _startTime = @(0); + + _endTime = @(0); + + _earliestStartTime = nil; + + _latestEndTime = nil; + + _isPauseable = @(0); + + _slots = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterForecastStruct alloc] init]; + + other.forecastId = self.forecastId; + other.activeSlotNumber = self.activeSlotNumber; + other.startTime = self.startTime; + other.endTime = self.endTime; + other.earliestStartTime = self.earliestStartTime; + other.latestEndTime = self.latestEndTime; + other.isPauseable = self.isPauseable; + other.slots = self.slots; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; activeSlotNumber:%@; startTime:%@; endTime:%@; earliestStartTime:%@; latestEndTime:%@; isPauseable:%@; slots:%@; >", NSStringFromClass([self class]), _forecastId, _activeSlotNumber, _startTime, _endTime, _earliestStartTime, _latestEndTime, _isPauseable, _slots]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterConstraintsStruct +- (instancetype)init +{ + if (self = [super init]) { + + _startTime = @(0); + + _duration = @(0); + + _nominalPower = nil; + + _maximumEnergy = nil; + + _loadControl = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterConstraintsStruct alloc] init]; + + other.startTime = self.startTime; + other.duration = self.duration; + other.nominalPower = self.nominalPower; + other.maximumEnergy = self.maximumEnergy; + other.loadControl = self.loadControl; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; duration:%@; nominalPower:%@; maximumEnergy:%@; loadControl:%@; >", NSStringFromClass([self class]), _startTime, _duration, _nominalPower, _maximumEnergy, _loadControl]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterPowerAdjustStruct +- (instancetype)init +{ + if (self = [super init]) { + + _minPower = @(0); + + _maxPower = @(0); + + _minDuration = @(0); + + _maxDuration = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustStruct alloc] init]; + + other.minPower = self.minPower; + other.maxPower = self.maxPower; + other.minDuration = self.minDuration; + other.maxDuration = self.maxDuration; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: minPower:%@; maxPower:%@; minDuration:%@; maxDuration:%@; >", NSStringFromClass([self class]), _minPower, _maxPower, _minDuration, _maxDuration]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterSlotAdjustmentStruct +- (instancetype)init +{ + if (self = [super init]) { + + _slotIndex = @(0); + + _nominalPower = @(0); + + _duration = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterSlotAdjustmentStruct alloc] init]; + + other.slotIndex = self.slotIndex; + other.nominalPower = self.nominalPower; + other.duration = self.duration; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: slotIndex:%@; nominalPower:%@; duration:%@; >", NSStringFromClass([self class]), _slotIndex, _nominalPower, _duration]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterPowerAdjustStartEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustStartEvent alloc] init]; return other; } @@ -4641,17 +5126,50 @@ - (NSString *)description @end -@implementation MTRPumpConfigurationAndControlClusterLeakageEvent +@implementation MTRDeviceEnergyManagementClusterPowerAdjustEndEvent - (instancetype)init { if (self = [super init]) { + + _cause = @(0); + + _duration = @(0); + + _energyUse = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustEndEvent alloc] init]; + + other.cause = self.cause; + other.duration = self.duration; + other.energyUse = self.energyUse; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: cause:%@; duration:%@; energyUse:%@; >", NSStringFromClass([self class]), _cause, _duration, _energyUse]; + return descriptionString; +} + +@end + +@implementation MTRDeviceEnergyManagementClusterPausedEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDeviceEnergyManagementClusterPausedEvent alloc] init]; return other; } @@ -4664,7 +5182,7 @@ - (NSString *)description @end -@implementation MTRPumpConfigurationAndControlClusterAirDetectionEvent +@implementation MTRDeviceEnergyManagementClusterResumedEvent - (instancetype)init { if (self = [super init]) { @@ -4674,7 +5192,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterResumedEvent alloc] init]; return other; } @@ -4687,222 +5205,1462 @@ - (NSString *)description @end -@implementation MTRPumpConfigurationAndControlClusterTurbineOperationEvent +@implementation MTREnergyEVSEClusterChargingTargetStruct +- (instancetype)init +{ + if (self = [super init]) { + + _targetTimeMinutesPastMidnight = @(0); + + _targetSoC = nil; + + _addedEnergy = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterChargingTargetStruct alloc] init]; + + other.targetTimeMinutesPastMidnight = self.targetTimeMinutesPastMidnight; + other.targetSoC = self.targetSoC; + other.addedEnergy = self.addedEnergy; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTimeMinutesPastMidnight:%@; targetSoC:%@; addedEnergy:%@; >", NSStringFromClass([self class]), _targetTimeMinutesPastMidnight, _targetSoC, _addedEnergy]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterEVConnectedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _sessionID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterEVConnectedEvent alloc] init]; + + other.sessionID = self.sessionID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sessionID:%@; >", NSStringFromClass([self class]), _sessionID]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterEVNotDetectedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _sessionID = @(0); + + _state = @(0); + + _sessionDuration = @(0); + + _sessionEnergyCharged = @(0); + + _sessionEnergyDischarged = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterEVNotDetectedEvent alloc] init]; + + other.sessionID = self.sessionID; + other.state = self.state; + other.sessionDuration = self.sessionDuration; + other.sessionEnergyCharged = self.sessionEnergyCharged; + other.sessionEnergyDischarged = self.sessionEnergyDischarged; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sessionID:%@; state:%@; sessionDuration:%@; sessionEnergyCharged:%@; sessionEnergyDischarged:%@; >", NSStringFromClass([self class]), _sessionID, _state, _sessionDuration, _sessionEnergyCharged, _sessionEnergyDischarged]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterEnergyTransferStartedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _sessionID = @(0); + + _state = @(0); + + _maximumCurrent = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterEnergyTransferStartedEvent alloc] init]; + + other.sessionID = self.sessionID; + other.state = self.state; + other.maximumCurrent = self.maximumCurrent; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sessionID:%@; state:%@; maximumCurrent:%@; >", NSStringFromClass([self class]), _sessionID, _state, _maximumCurrent]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterEnergyTransferStoppedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _sessionID = @(0); + + _state = @(0); + + _reason = @(0); + + _energyTransferred = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterEnergyTransferStoppedEvent alloc] init]; + + other.sessionID = self.sessionID; + other.state = self.state; + other.reason = self.reason; + other.energyTransferred = self.energyTransferred; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sessionID:%@; state:%@; reason:%@; energyTransferred:%@; >", NSStringFromClass([self class]), _sessionID, _state, _reason, _energyTransferred]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterFaultEvent +- (instancetype)init +{ + if (self = [super init]) { + + _sessionID = nil; + + _state = @(0); + + _faultStatePreviousState = @(0); + + _faultStateCurrentState = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterFaultEvent alloc] init]; + + other.sessionID = self.sessionID; + other.state = self.state; + other.faultStatePreviousState = self.faultStatePreviousState; + other.faultStateCurrentState = self.faultStateCurrentState; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sessionID:%@; state:%@; faultStatePreviousState:%@; faultStateCurrentState:%@; >", NSStringFromClass([self class]), _sessionID, _state, _faultStatePreviousState, _faultStateCurrentState]; + return descriptionString; +} + +@end + +@implementation MTREnergyEVSEClusterRFIDEvent +- (instancetype)init +{ + if (self = [super init]) { + + _uid = [NSData data]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTREnergyEVSEClusterRFIDEvent alloc] init]; + + other.uid = self.uid; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: uid:%@; >", NSStringFromClass([self class]), [_uid base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterCredentialStruct +- (instancetype)init +{ + if (self = [super init]) { + + _credentialType = @(0); + + _credentialIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterCredentialStruct alloc] init]; + + other.credentialType = self.credentialType; + other.credentialIndex = self.credentialIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialType:%@; credentialIndex:%@; >", NSStringFromClass([self class]), _credentialType, _credentialIndex]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterDlCredential : MTRDoorLockClusterCredentialStruct +@dynamic credentialType; +@dynamic credentialIndex; +@end + +@implementation MTRDoorLockClusterDoorLockAlarmEvent +- (instancetype)init +{ + if (self = [super init]) { + + _alarmCode = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; + + other.alarmCode = self.alarmCode; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmCode:%@; >", NSStringFromClass([self class]), _alarmCode]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterDoorStateChangeEvent +- (instancetype)init +{ + if (self = [super init]) { + + _doorState = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; + + other.doorState = self.doorState; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: doorState:%@; >", NSStringFromClass([self class]), _doorState]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterLockOperationEvent +- (instancetype)init +{ + if (self = [super init]) { + + _lockOperationType = @(0); + + _operationSource = @(0); + + _userIndex = nil; + + _fabricIndex = nil; + + _sourceNode = nil; + + _credentials = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", NSStringFromClass([self class]), _lockOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _credentials]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterLockOperationErrorEvent +- (instancetype)init +{ + if (self = [super init]) { + + _lockOperationType = @(0); + + _operationSource = @(0); + + _operationError = @(0); + + _userIndex = nil; + + _fabricIndex = nil; + + _sourceNode = nil; + + _credentials = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.operationError = self.operationError; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; operationError:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", NSStringFromClass([self class]), _lockOperationType, _operationSource, _operationError, _userIndex, _fabricIndex, _sourceNode, _credentials]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterLockUserChangeEvent +- (instancetype)init +{ + if (self = [super init]) { + + _lockDataType = @(0); + + _dataOperationType = @(0); + + _operationSource = @(0); + + _userIndex = nil; + + _fabricIndex = nil; + + _sourceNode = nil; + + _dataIndex = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; + + other.lockDataType = self.lockDataType; + other.dataOperationType = self.dataOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.dataIndex = self.dataIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockDataType:%@; dataOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; dataIndex:%@; >", NSStringFromClass([self class]), _lockDataType, _dataOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _dataIndex]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterSystemPressureLowEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterSystemPressureHighEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterDryRunningEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterPumpBlockedEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterSensorFailureEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterGeneralFaultEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterLeakageEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterAirDetectionEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRPumpConfigurationAndControlClusterTurbineOperationEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterWeeklyScheduleTransitionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _transitionTime = @(0); + + _heatSetpoint = nil; + + _coolSetpoint = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterWeeklyScheduleTransitionStruct alloc] init]; + + other.transitionTime = self.transitionTime; + other.heatSetpoint = self.heatSetpoint; + other.coolSetpoint = self.coolSetpoint; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: transitionTime:%@; heatSetpoint:%@; coolSetpoint:%@; >", NSStringFromClass([self class]), _transitionTime, _heatSetpoint, _coolSetpoint]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@dynamic transitionTime; +@dynamic heatSetpoint; +@dynamic coolSetpoint; +@end + +@implementation MTRChannelClusterProgramCastStruct +- (instancetype)init +{ + if (self = [super init]) { + + _name = @""; + + _role = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterProgramCastStruct alloc] init]; + + other.name = self.name; + other.role = self.role; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; role:%@; >", NSStringFromClass([self class]), _name, _role]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterProgramCategoryStruct +- (instancetype)init +{ + if (self = [super init]) { + + _category = @""; + + _subCategory = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterProgramCategoryStruct alloc] init]; + + other.category = self.category; + other.subCategory = self.subCategory; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: category:%@; subCategory:%@; >", NSStringFromClass([self class]), _category, _subCategory]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterSeriesInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _season = @""; + + _episode = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterSeriesInfoStruct alloc] init]; + + other.season = self.season; + other.episode = self.episode; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: season:%@; episode:%@; >", NSStringFromClass([self class]), _season, _episode]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterChannelInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _majorNumber = @(0); + + _minorNumber = @(0); + + _name = nil; + + _callSign = nil; + + _affiliateCallSign = nil; + + _identifier = nil; + + _type = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterChannelInfoStruct alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.name = self.name; + other.callSign = self.callSign; + other.affiliateCallSign = self.affiliateCallSign; + other.identifier = self.identifier; + other.type = self.type; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; name:%@; callSign:%@; affiliateCallSign:%@; identifier:%@; type:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber, _name, _callSign, _affiliateCallSign, _identifier, _type]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterChannelInfo : MTRChannelClusterChannelInfoStruct +@dynamic majorNumber; +@dynamic minorNumber; +@dynamic name; +@dynamic callSign; +@dynamic affiliateCallSign; +@end + +@implementation MTRChannelClusterProgramStruct +- (instancetype)init +{ + if (self = [super init]) { + + _identifier = @""; + + _channel = [MTRChannelClusterChannelInfoStruct new]; + + _startTime = @(0); + + _endTime = @(0); + + _title = @""; + + _subtitle = nil; + + _descriptionString = nil; + + _audioLanguages = nil; + + _ratings = nil; + + _thumbnailUrl = nil; + + _posterArtUrl = nil; + + _dvbiUrl = nil; + + _releaseDate = nil; + + _parentalGuidanceText = nil; + + _recordingFlag = nil; + + _seriesInfo = nil; + + _categoryList = nil; + + _castList = nil; + + _externalIDList = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterProgramStruct alloc] init]; + + other.identifier = self.identifier; + other.channel = self.channel; + other.startTime = self.startTime; + other.endTime = self.endTime; + other.title = self.title; + other.subtitle = self.subtitle; + other.descriptionString = self.descriptionString; + other.audioLanguages = self.audioLanguages; + other.ratings = self.ratings; + other.thumbnailUrl = self.thumbnailUrl; + other.posterArtUrl = self.posterArtUrl; + other.dvbiUrl = self.dvbiUrl; + other.releaseDate = self.releaseDate; + other.parentalGuidanceText = self.parentalGuidanceText; + other.recordingFlag = self.recordingFlag; + other.seriesInfo = self.seriesInfo; + other.categoryList = self.categoryList; + other.castList = self.castList; + other.externalIDList = self.externalIDList; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identifier:%@; channel:%@; startTime:%@; endTime:%@; title:%@; subtitle:%@; descriptionString:%@; audioLanguages:%@; ratings:%@; thumbnailUrl:%@; posterArtUrl:%@; dvbiUrl:%@; releaseDate:%@; parentalGuidanceText:%@; recordingFlag:%@; seriesInfo:%@; categoryList:%@; castList:%@; externalIDList:%@; >", NSStringFromClass([self class]), _identifier, _channel, _startTime, _endTime, _title, _subtitle, _descriptionString, _audioLanguages, _ratings, _thumbnailUrl, _posterArtUrl, _dvbiUrl, _releaseDate, _parentalGuidanceText, _recordingFlag, _seriesInfo, _categoryList, _castList, _externalIDList]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterPageTokenStruct +- (instancetype)init +{ + if (self = [super init]) { + + _limit = nil; + + _after = nil; + + _before = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterPageTokenStruct alloc] init]; + + other.limit = self.limit; + other.after = self.after; + other.before = self.before; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: limit:%@; after:%@; before:%@; >", NSStringFromClass([self class]), _limit, _after, _before]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterChannelPagingStruct +- (instancetype)init +{ + if (self = [super init]) { + + _previousToken = nil; + + _nextToken = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterChannelPagingStruct alloc] init]; + + other.previousToken = self.previousToken; + other.nextToken = self.nextToken; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: previousToken:%@; nextToken:%@; >", NSStringFromClass([self class]), _previousToken, _nextToken]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterAdditionalInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _name = @""; + + _value = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterAdditionalInfoStruct alloc] init]; + + other.name = self.name; + other.value = self.value; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; value:%@; >", NSStringFromClass([self class]), _name, _value]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterLineupInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _operatorName = @""; + + _lineupName = nil; + + _postalCode = nil; + + _lineupInfoType = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterLineupInfoStruct alloc] init]; + + other.operatorName = self.operatorName; + other.lineupName = self.lineupName; + other.postalCode = self.postalCode; + other.lineupInfoType = self.lineupInfoType; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operatorName:%@; lineupName:%@; postalCode:%@; lineupInfoType:%@; >", NSStringFromClass([self class]), _operatorName, _lineupName, _postalCode, _lineupInfoType]; + return descriptionString; +} + +@end + +@implementation MTRChannelClusterLineupInfo : MTRChannelClusterLineupInfoStruct +@dynamic operatorName; +@dynamic lineupName; +@dynamic postalCode; +@dynamic lineupInfoType; +@end + +@implementation MTRTargetNavigatorClusterTargetInfoStruct - (instancetype)init { if (self = [super init]) { + + _identifier = @(0); + + _name = @""; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; + auto other = [[MTRTargetNavigatorClusterTargetInfoStruct alloc] init]; + + other.identifier = self.identifier; + other.name = self.name; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identifier:%@; name:%@; >", NSStringFromClass([self class]), _identifier, _name]; return descriptionString; } @end -@implementation MTRThermostatClusterThermostatScheduleTransition +@implementation MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct +@dynamic identifier; +@dynamic name; +@end + +@implementation MTRTargetNavigatorClusterTargetUpdatedEvent - (instancetype)init { if (self = [super init]) { - _transitionTime = @(0); + _targetList = [NSArray array]; - _heatSetpoint = nil; + _currentTarget = @(0); - _coolSetpoint = nil; + _data = [NSData data]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + auto other = [[MTRTargetNavigatorClusterTargetUpdatedEvent alloc] init]; - other.transitionTime = self.transitionTime; - other.heatSetpoint = self.heatSetpoint; - other.coolSetpoint = self.coolSetpoint; + other.targetList = self.targetList; + other.currentTarget = self.currentTarget; + other.data = self.data; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: transitionTime:%@; heatSetpoint:%@; coolSetpoint:%@; >", NSStringFromClass([self class]), _transitionTime, _heatSetpoint, _coolSetpoint]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetList:%@; currentTarget:%@; data:%@; >", NSStringFromClass([self class]), _targetList, _currentTarget, [_data base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRChannelClusterChannelInfoStruct +@implementation MTRMediaPlaybackClusterTrackAttributesStruct - (instancetype)init { if (self = [super init]) { - _majorNumber = @(0); - - _minorNumber = @(0); - - _name = nil; - - _callSign = nil; + _languageCode = @""; - _affiliateCallSign = nil; + _displayName = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRChannelClusterChannelInfoStruct alloc] init]; + auto other = [[MTRMediaPlaybackClusterTrackAttributesStruct alloc] init]; - other.majorNumber = self.majorNumber; - other.minorNumber = self.minorNumber; - other.name = self.name; - other.callSign = self.callSign; - other.affiliateCallSign = self.affiliateCallSign; + other.languageCode = self.languageCode; + other.displayName = self.displayName; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; name:%@; callSign:%@; affiliateCallSign:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber, _name, _callSign, _affiliateCallSign]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: languageCode:%@; displayName:%@; >", NSStringFromClass([self class]), _languageCode, _displayName]; return descriptionString; } @end -@implementation MTRChannelClusterChannelInfo : MTRChannelClusterChannelInfoStruct -@dynamic majorNumber; -@dynamic minorNumber; -@dynamic name; -@dynamic callSign; -@dynamic affiliateCallSign; -@end - -@implementation MTRChannelClusterLineupInfoStruct +@implementation MTRMediaPlaybackClusterTrackStruct - (instancetype)init { if (self = [super init]) { - _operatorName = @""; - - _lineupName = nil; - - _postalCode = nil; + _id = @""; - _lineupInfoType = @(0); + _trackAttributes = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRChannelClusterLineupInfoStruct alloc] init]; + auto other = [[MTRMediaPlaybackClusterTrackStruct alloc] init]; - other.operatorName = self.operatorName; - other.lineupName = self.lineupName; - other.postalCode = self.postalCode; - other.lineupInfoType = self.lineupInfoType; + other.id = self.id; + other.trackAttributes = self.trackAttributes; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operatorName:%@; lineupName:%@; postalCode:%@; lineupInfoType:%@; >", NSStringFromClass([self class]), _operatorName, _lineupName, _postalCode, _lineupInfoType]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; trackAttributes:%@; >", NSStringFromClass([self class]), _id, _trackAttributes]; return descriptionString; } @end -@implementation MTRChannelClusterLineupInfo : MTRChannelClusterLineupInfoStruct -@dynamic operatorName; -@dynamic lineupName; -@dynamic postalCode; -@dynamic lineupInfoType; -@end - -@implementation MTRTargetNavigatorClusterTargetInfoStruct +@implementation MTRMediaPlaybackClusterPlaybackPositionStruct - (instancetype)init { if (self = [super init]) { - _identifier = @(0); + _updatedAt = @(0); - _name = @""; + _position = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRTargetNavigatorClusterTargetInfoStruct alloc] init]; + auto other = [[MTRMediaPlaybackClusterPlaybackPositionStruct alloc] init]; - other.identifier = self.identifier; - other.name = self.name; + other.updatedAt = self.updatedAt; + other.position = self.position; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: identifier:%@; name:%@; >", NSStringFromClass([self class]), _identifier, _name]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updatedAt:%@; position:%@; >", NSStringFromClass([self class]), _updatedAt, _position]; return descriptionString; } @end -@implementation MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct -@dynamic identifier; -@dynamic name; +@implementation MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct +@dynamic updatedAt; +@dynamic position; @end -@implementation MTRMediaPlaybackClusterPlaybackPositionStruct +@implementation MTRMediaPlaybackClusterStateChangedEvent - (instancetype)init { if (self = [super init]) { - _updatedAt = @(0); + _currentState = @(0); - _position = nil; + _startTime = @(0); + + _duration = @(0); + + _sampledPosition = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + + _playbackSpeed = @(0); + + _seekRangeEnd = @(0); + + _seekRangeStart = @(0); + + _data = nil; + + _audioAdvanceUnmuted = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRMediaPlaybackClusterPlaybackPositionStruct alloc] init]; + auto other = [[MTRMediaPlaybackClusterStateChangedEvent alloc] init]; - other.updatedAt = self.updatedAt; - other.position = self.position; + other.currentState = self.currentState; + other.startTime = self.startTime; + other.duration = self.duration; + other.sampledPosition = self.sampledPosition; + other.playbackSpeed = self.playbackSpeed; + other.seekRangeEnd = self.seekRangeEnd; + other.seekRangeStart = self.seekRangeStart; + other.data = self.data; + other.audioAdvanceUnmuted = self.audioAdvanceUnmuted; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updatedAt:%@; position:%@; >", NSStringFromClass([self class]), _updatedAt, _position]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: currentState:%@; startTime:%@; duration:%@; sampledPosition:%@; playbackSpeed:%@; seekRangeEnd:%@; seekRangeStart:%@; data:%@; audioAdvanceUnmuted:%@; >", NSStringFromClass([self class]), _currentState, _startTime, _duration, _sampledPosition, _playbackSpeed, _seekRangeEnd, _seekRangeStart, [_data base64EncodedStringWithOptions:0], _audioAdvanceUnmuted]; return descriptionString; } @end -@implementation MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct -@dynamic updatedAt; -@dynamic position; -@end - @implementation MTRMediaInputClusterInputInfoStruct - (instancetype)init { @@ -4985,6 +6743,72 @@ @implementation MTRContentLauncherClusterDimension : MTRContentLauncherClusterDi @dynamic metric; @end +@implementation MTRContentLauncherClusterTrackPreferenceStruct +- (instancetype)init +{ + if (self = [super init]) { + + _languageCode = @""; + + _characteristics = nil; + + _audioOutputIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentLauncherClusterTrackPreferenceStruct alloc] init]; + + other.languageCode = self.languageCode; + other.characteristics = self.characteristics; + other.audioOutputIndex = self.audioOutputIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: languageCode:%@; characteristics:%@; audioOutputIndex:%@; >", NSStringFromClass([self class]), _languageCode, _characteristics, _audioOutputIndex]; + return descriptionString; +} + +@end + +@implementation MTRContentLauncherClusterPlaybackPreferencesStruct +- (instancetype)init +{ + if (self = [super init]) { + + _playbackPosition = @(0); + + _textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + + _audioTracks = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentLauncherClusterPlaybackPreferencesStruct alloc] init]; + + other.playbackPosition = self.playbackPosition; + other.textTrack = self.textTrack; + other.audioTracks = self.audioTracks; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: playbackPosition:%@; textTrack:%@; audioTracks:%@; >", NSStringFromClass([self class]), _playbackPosition, _textTrack, _audioTracks]; + return descriptionString; +} + +@end + @implementation MTRContentLauncherClusterAdditionalInfoStruct - (instancetype)init { @@ -5369,6 +7193,86 @@ - (NSString * _Nonnull)applicationId @implementation MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end +@implementation MTRAccountLoginClusterLoggedOutEvent +- (instancetype)init +{ + if (self = [super init]) { + + _node = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRAccountLoginClusterLoggedOutEvent alloc] init]; + + other.node = self.node; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; >", NSStringFromClass([self class]), _node]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterRatingNameStruct +- (instancetype)init +{ + if (self = [super init]) { + + _ratingName = @""; + + _ratingNameDesc = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterRatingNameStruct alloc] init]; + + other.ratingName = self.ratingName; + other.ratingNameDesc = self.ratingNameDesc; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ratingName:%@; ratingNameDesc:%@; >", NSStringFromClass([self class]), _ratingName, _ratingNameDesc]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterRemainingScreenTimeExpiredEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterRemainingScreenTimeExpiredEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + @implementation MTRUnitTestingClusterSimpleStruct - (instancetype)init { @@ -5804,4 +7708,34 @@ @implementation MTRTestClusterClusterTestFabricScopedEventEvent : MTRUnitTesting @dynamic fabricIndex; @end +@implementation MTRSampleMEIClusterPingCountEventEvent +- (instancetype)init +{ + if (self = [super init]) { + + _count = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRSampleMEIClusterPingCountEventEvent alloc] init]; + + other.count = self.count; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: count:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _count, _fabricIndex]; + return descriptionString; +} + +@end + NS_ASSUME_NONNULL_END 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 503c5cfc1d1111..f2393116338a0d 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 @@ -268,6 +268,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace Scenes { namespace Attributes { +namespace SceneCount { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace SceneCount + namespace CurrentScene { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) @@ -1161,9 +1192,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace Options { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); @@ -1175,9 +1206,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -6539,6 +6570,68 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace IcdManagement { namespace Attributes { +namespace UserActiveModeTriggerHint { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::IcdManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace UserActiveModeTriggerHint + +namespace UserActiveModeTriggerInstruction { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +{ + uint8_t zclString[128 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::IcdManagement::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 128, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 128); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 128, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[128 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace UserActiveModeTriggerInstruction + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -6604,17 +6697,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { namespace Attributes { -namespace FeatureMap { +namespace SetTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Timer::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -6633,19 +6726,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace SetTime -namespace ClusterRevision { +namespace TimeRemaining { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Timer::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -6654,9 +6747,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -6664,109 +6757,118 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OvenOperationalState - -namespace ModeSelect { -namespace Attributes { +} // namespace TimeRemaining -namespace Description { +namespace TimerState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Timer::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace Description +} // namespace TimerState -namespace StandardNamespace { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Timer::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Timer::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; } - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (value.IsNull()) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace StandardNamespace +} // namespace ClusterRevision -namespace CurrentMode { +} // namespace Attributes +} // namespace Timer -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace OvenCavityOperationalState { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -6775,9 +6877,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -6785,72 +6887,56 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CurrentMode +} // namespace FeatureMap -namespace StartUpMode { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace OvenCavityOperationalState -} // namespace StartUpMode +namespace OvenMode { +namespace Attributes { -namespace OnMode { +namespace StartUpMode { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -6872,7 +6958,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -6881,7 +6967,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -6894,16 +6980,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace OnMode +} // namespace StartUpMode -namespace FeatureMap { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -6912,7 +6998,99 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + +namespace LaundryDryerControls { +namespace Attributes { + +namespace SelectedDrynessLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SelectedDrynessLevel + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6922,7 +7100,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -6934,7 +7112,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -6953,63 +7131,109 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace ModeSelect +} // namespace LaundryDryerControls -namespace LaundryWasherMode { +namespace ModeSelect { namespace Attributes { -namespace ClusterRevision { +namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace StandardNamespace { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); +} -} // namespace Attributes -} // namespace LaundryWasherMode +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -namespace RefrigeratorAndTemperatureControlledCabinetMode { -namespace Attributes { + return Set(endpoint, value.Value()); +} -namespace ClusterRevision { +} // namespace StandardNamespace -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7018,9 +7242,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -7028,26 +7252,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace RefrigeratorAndTemperatureControlledCabinetMode - -namespace LaundryWasherControls { -namespace Attributes { +} // namespace CurrentMode -namespace SpinSpeedCurrent { +namespace StartUpMode { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -7069,7 +7286,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -7078,7 +7295,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7091,38 +7308,60 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace SpinSpeedCurrent +} // namespace StartUpMode -namespace NumberOfRinses { +namespace OnMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace NumberOfRinses +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode namespace FeatureMap { @@ -7131,7 +7370,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7150,7 +7389,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -7162,7 +7401,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7181,15 +7420,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace LaundryWasherControls +} // namespace ModeSelect -namespace RvcRunMode { +namespace LaundryWasherMode { namespace Attributes { namespace ClusterRevision { @@ -7199,7 +7438,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunMode::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7218,13 +7457,241 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcRunMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace RvcRunMode +} // namespace LaundryWasherMode + +namespace RefrigeratorAndTemperatureControlledCabinetMode { +namespace Attributes { + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RefrigeratorAndTemperatureControlledCabinetMode + +namespace LaundryWasherControls { +namespace Attributes { + +namespace SpinSpeedCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SpinSpeedCurrent + +namespace NumberOfRinses { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfRinses + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryWasherControls + +namespace RvcRunMode { +namespace Attributes { + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcRunMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcRunMode namespace RvcCleanMode { namespace Attributes { @@ -8424,7 +8891,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace MicrowaveOvenControl { namespace Attributes { -namespace CookTime { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { @@ -8450,16 +8917,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CookTime +} // namespace FeatureMap -namespace PowerSetting { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); @@ -8471,9 +8938,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8481,19 +8948,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PowerSetting +} // namespace ClusterRevision -namespace MinPower { +} // namespace Attributes +} // namespace MicrowaveOvenControl -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace OperationalState { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8502,9 +8975,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8512,19 +8985,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MinPower +} // namespace FeatureMap -namespace MaxPower { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8533,9 +9006,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8543,41 +9016,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxPower - -namespace PowerStep { +} // namespace ClusterRevision -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} +} // namespace Attributes +} // namespace OperationalState -} // namespace PowerStep +namespace RvcOperationalState { +namespace Attributes { namespace FeatureMap { @@ -8586,7 +9034,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8605,7 +9053,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -8617,7 +9065,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8636,25 +9084,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace MicrowaveOvenControl +} // namespace RvcOperationalState -namespace OperationalState { +namespace HepaFilterMonitoring { namespace Attributes { -namespace FeatureMap { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8663,9 +9111,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8673,10 +9121,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace HepaFilterMonitoring + +namespace ActivatedCarbonFilterMonitoring { +namespace Attributes { namespace ClusterRevision { @@ -8684,8 +9138,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8704,25 +9159,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace OperationalState +} // namespace ActivatedCarbonFilterMonitoring -namespace RvcOperationalState { +namespace BooleanStateConfiguration { namespace Attributes { -namespace FeatureMap { +namespace CurrentSensitivityLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8731,9 +9186,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8741,19 +9196,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace CurrentSensitivityLevel -namespace ClusterRevision { +namespace SupportedSensitivityLevels { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8762,9 +9217,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8772,25 +9227,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace RvcOperationalState - -namespace HepaFilterMonitoring { -namespace Attributes { +} // namespace SupportedSensitivityLevels -namespace ClusterRevision { +namespace DefaultSensitivityLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8799,9 +9248,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8809,26 +9258,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace HepaFilterMonitoring - -namespace ActivatedCarbonFilterMonitoring { -namespace Attributes { +} // namespace DefaultSensitivityLevel -namespace ClusterRevision { +namespace AlarmsActive { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8837,9 +9279,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8847,79 +9289,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ActivatedCarbonFilterMonitoring - -namespace DoorLock { -namespace Attributes { +} // namespace AlarmsActive -namespace LockState { +namespace AlarmsSuppressed { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace LockState +} // namespace AlarmsSuppressed -namespace LockType { +namespace AlarmsEnabled { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8928,9 +9341,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLo *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8938,19 +9351,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLo Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace LockType +} // namespace AlarmsEnabled -namespace ActuatorEnabled { +namespace AlarmsSupported { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8959,9 +9372,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8969,73 +9382,2533 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ActuatorEnabled +} // namespace AlarmsSupported -namespace DoorState { +namespace SensorFault { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace DoorState +} // namespace SensorFault -namespace DoorOpenEvents { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanStateConfiguration + +namespace ValveConfigurationAndControl { +namespace Attributes { + +namespace OpenDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OpenDuration + +namespace DefaultOpenDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace DefaultOpenDuration + +namespace AutoCloseTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace AutoCloseTime + +namespace RemainingDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace RemainingDuration + +namespace CurrentState { + +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace CurrentState + +namespace TargetState { + +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace TargetState + +namespace CurrentLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace CurrentLevel + +namespace TargetLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace TargetLevel + +namespace DefaultOpenLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +} // namespace DefaultOpenLevel + +namespace ValveFault { + +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace ValveFault + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ValveConfigurationAndControl + +namespace ElectricalEnergyMeasurement { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ElectricalEnergyMeasurement + +namespace DemandResponseLoadControl { +namespace Attributes { + +namespace NumberOfLoadControlPrograms { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfLoadControlPrograms + +namespace NumberOfEventsPerProgram { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfEventsPerProgram + +namespace NumberOfTransitions { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfTransitions + +namespace DefaultRandomStart { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace DefaultRandomStart + +namespace DefaultRandomDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace DefaultRandomDuration + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DemandResponseLoadControl + +namespace DeviceEnergyManagement { +namespace Attributes { + +namespace ESAType { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ESAType + +namespace ESACanGenerate { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace ESACanGenerate + +namespace ESAState { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ESAState + +namespace AbsMinPower { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_POWER_MW_ATTRIBUTE_TYPE); +} + +} // namespace AbsMinPower + +namespace AbsMaxPower { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_POWER_MW_ATTRIBUTE_TYPE); +} + +} // namespace AbsMaxPower + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { +namespace Attributes { + +namespace State { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::StateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace State + +namespace SupplyState { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace SupplyState + +namespace FaultState { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace FaultState + +namespace ChargingEnabledUntil { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace ChargingEnabledUntil + +namespace DischargingEnabledUntil { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace DischargingEnabledUntil + +namespace CircuitCapacity { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); +} + +} // namespace CircuitCapacity + +namespace MinimumChargeCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); +} + +} // namespace MinimumChargeCurrent + +namespace MaximumChargeCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); +} + +} // namespace MaximumChargeCurrent + +namespace MaximumDischargeCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); +} + +} // namespace MaximumDischargeCurrent + +namespace UserMaximumChargeCurrent { + +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); +} + +} // namespace UserMaximumChargeCurrent + +namespace RandomizationDelayWindow { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +} // namespace RandomizationDelayWindow + +namespace NumberOfWeeklyTargets { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfWeeklyTargets + +namespace NumberOfDailyTargets { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfDailyTargets + +namespace NextChargeStartTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NextChargeStartTime + +namespace NextChargeTargetTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NextChargeTargetTime + +namespace NextChargeRequiredEnergy { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NextChargeRequiredEnergy + +namespace NextChargeTargetSoC { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace NextChargeTargetSoC + +namespace ApproximateEVEfficiency { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace ApproximateEVEfficiency + +namespace StateOfCharge { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StateOfCharge + +namespace BatteryCapacity { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace BatteryCapacity + +namespace VehicleID { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 32); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace VehicleID + +namespace SessionID { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SessionID + +namespace SessionDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SessionDuration + +namespace SessionEnergyCharged { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SessionEnergyCharged + +namespace SessionEnergyDischarged { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SessionEnergyDischarged + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace EnergyEvse + +namespace DoorLock { +namespace Attributes { + +namespace LockState { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LockState + +namespace LockType { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace LockType + +namespace ActuatorEnabled { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace ActuatorEnabled + +namespace DoorState { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace DoorState + +namespace DoorOpenEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -12600,7 +15473,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -12609,7 +15482,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -12653,7 +15526,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -12662,7 +15535,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -12734,7 +15607,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinHeatSetpointLimit @@ -12765,7 +15638,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxHeatSetpointLimit @@ -12796,7 +15669,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinCoolSetpointLimit @@ -12827,7 +15700,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxCoolSetpointLimit @@ -13237,9 +16110,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13251,9 +16124,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13268,9 +16141,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ControlSequenceOfOperation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13282,9 +16155,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13299,9 +16172,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13313,9 +16186,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13330,9 +16203,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13344,9 +16217,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13361,9 +16234,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13375,9 +16248,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13454,9 +16327,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13468,9 +16341,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13538,9 +16411,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13552,9 +16425,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13569,9 +16442,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13583,9 +16456,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -13600,9 +16473,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -13614,9 +16487,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14064,9 +16937,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14078,9 +16951,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14126,9 +16999,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14140,9 +17013,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14157,9 +17030,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14171,9 +17044,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14188,9 +17061,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14202,9 +17075,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14219,9 +17092,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14233,9 +17106,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14277,7 +17150,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -14286,7 +17159,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -14303,9 +17176,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -14317,9 +17190,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14886,9 +17759,10 @@ namespace Attributes { namespace TemperatureDisplayMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -14901,9 +17775,10 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14919,9 +17794,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace KeypadLockout { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -14934,9 +17809,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -14952,9 +17827,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ScheduleProgrammingVisibility { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = + NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -14967,9 +17844,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value) { - using Traits = NumericAttributeTraits; + using Traits = + NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19373,14 +22252,238 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace UltrasonicOccupiedToUnoccupiedDelay -namespace UltrasonicUnoccupiedToOccupiedDelay { +namespace UltrasonicUnoccupiedToOccupiedDelay { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace UltrasonicUnoccupiedToOccupiedDelay + +namespace UltrasonicUnoccupiedToOccupiedThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace UltrasonicUnoccupiedToOccupiedThreshold + +namespace PhysicalContactOccupiedToUnoccupiedDelay { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalContactOccupiedToUnoccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedDelay { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalContactUnoccupiedToOccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalContactUnoccupiedToOccupiedThreshold + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OccupancySensing + +namespace CarbonMonoxideConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19399,19 +22502,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace UltrasonicUnoccupiedToOccupiedDelay +} // namespace ClusterRevision -namespace UltrasonicUnoccupiedToOccupiedThreshold { +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace CarbonDioxideConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19420,9 +22531,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19430,19 +22541,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace UltrasonicUnoccupiedToOccupiedThreshold +} // namespace ClusterRevision -namespace PhysicalContactOccupiedToUnoccupiedDelay { +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement + +namespace NitrogenDioxideConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19461,19 +22580,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PhysicalContactOccupiedToUnoccupiedDelay +} // namespace ClusterRevision -namespace PhysicalContactUnoccupiedToOccupiedDelay { +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement + +namespace OzoneConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19492,19 +22618,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PhysicalContactUnoccupiedToOccupiedDelay +} // namespace ClusterRevision -namespace PhysicalContactUnoccupiedToOccupiedThreshold { +} // namespace Attributes +} // namespace OzoneConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace Pm25ConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19513,9 +22645,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19523,19 +22655,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PhysicalContactUnoccupiedToOccupiedThreshold +} // namespace ClusterRevision -namespace FeatureMap { +} // namespace Attributes +} // namespace Pm25ConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +namespace FormaldehydeConcentrationMeasurement { +namespace Attributes { + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19544,9 +22683,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19554,10 +22693,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FormaldehydeConcentrationMeasurement + +namespace Pm1ConcentrationMeasurement { +namespace Attributes { namespace ClusterRevision { @@ -19566,7 +22712,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19585,15 +22731,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace OccupancySensing +} // namespace Pm1ConcentrationMeasurement -namespace CarbonMonoxideConcentrationMeasurement { +namespace Pm10ConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { @@ -19602,9 +22748,8 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19623,16 +22768,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace CarbonMonoxideConcentrationMeasurement +} // namespace Pm10ConcentrationMeasurement -namespace CarbonDioxideConcentrationMeasurement { +namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { @@ -19641,9 +22785,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, + readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19662,16 +22806,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace CarbonDioxideConcentrationMeasurement +} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement -namespace NitrogenDioxideConcentrationMeasurement { +namespace RadonConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { @@ -19680,9 +22824,8 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19701,26 +22844,87 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace NitrogenDioxideConcentrationMeasurement +} // namespace RadonConcentrationMeasurement -namespace OzoneConcentrationMeasurement { +namespace WakeOnLan { namespace Attributes { -namespace ClusterRevision { +namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits; + uint8_t zclString[12 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 12, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 12); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 12, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[12 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace MACAddress + +namespace LinkLocalAddress { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +{ + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +} // namespace LinkLocalAddress + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19729,9 +22933,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19739,16 +22943,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OzoneConcentrationMeasurement - -namespace Pm25ConcentrationMeasurement { -namespace Attributes { +} // namespace FeatureMap namespace ClusterRevision { @@ -19757,7 +22955,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19776,26 +22974,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace Pm25ConcentrationMeasurement +} // namespace WakeOnLan -namespace FormaldehydeConcentrationMeasurement { +namespace Channel { namespace Attributes { -namespace ClusterRevision { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19804,9 +23001,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19814,17 +23011,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace FormaldehydeConcentrationMeasurement - -namespace Pm1ConcentrationMeasurement { -namespace Attributes { +} // namespace FeatureMap namespace ClusterRevision { @@ -19833,7 +23023,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19852,25 +23042,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace Pm1ConcentrationMeasurement +} // namespace Channel -namespace Pm10ConcentrationMeasurement { +namespace TargetNavigator { namespace Attributes { -namespace ClusterRevision { +namespace CurrentTarget { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19879,9 +23069,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19889,26 +23079,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Pm10ConcentrationMeasurement - -namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { -namespace Attributes { +} // namespace CurrentTarget -namespace ClusterRevision { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19917,9 +23100,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19927,17 +23110,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement - -namespace RadonConcentrationMeasurement { -namespace Attributes { +} // namespace FeatureMap namespace ClusterRevision { @@ -19946,7 +23122,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19965,155 +23141,162 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace RadonConcentrationMeasurement +} // namespace TargetNavigator -namespace WakeOnLan { +namespace MediaPlayback { namespace Attributes { -namespace MACAddress { +namespace CurrentState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value) { - uint8_t zclString[12 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 12, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 12); - value.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 12, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[12 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace MACAddress - -namespace LinkLocalAddress { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value) { - uint8_t zclString[16 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace LinkLocalAddress +} // namespace CurrentState -namespace FeatureMap { +namespace StartTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} -namespace ClusterRevision { +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) + return Set(endpoint, value.Value()); +} + +} // namespace StartTime + +namespace Duration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} -} // namespace Attributes -} // namespace WakeOnLan +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -namespace Channel { -namespace Attributes { + return Set(endpoint, value.Value()); +} -namespace FeatureMap { +} // namespace Duration -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +namespace PlaybackSpeed { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20122,9 +23305,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20132,78 +23315,116 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace PlaybackSpeed -namespace ClusterRevision { +namespace SeekRangeEnd { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} -} // namespace Attributes -} // namespace Channel +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -namespace TargetNavigator { -namespace Attributes { + return Set(endpoint, value.Value()); +} -namespace CurrentTarget { +} // namespace SeekRangeEnd -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace SeekRangeStart { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace CurrentTarget +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace SeekRangeStart namespace FeatureMap { @@ -20212,7 +23433,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20231,7 +23452,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20243,7 +23464,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20262,25 +23483,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace TargetNavigator +} // namespace MediaPlayback -namespace MediaPlayback { +namespace MediaInput { namespace Attributes { -namespace CurrentState { +namespace CurrentInput { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20289,9 +23510,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback: *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20299,125 +23520,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback: Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace CurrentState +} // namespace CurrentInput -namespace StartTime { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace StartTime - -namespace Duration { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Duration +} // namespace FeatureMap -namespace PlaybackSpeed { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20426,9 +23572,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20436,116 +23582,84 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PlaybackSpeed +} // namespace ClusterRevision -namespace SeekRangeEnd { +} // namespace Attributes +} // namespace MediaInput -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +namespace LowPower { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace SeekRangeEnd +} // namespace FeatureMap -namespace SeekRangeStart { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace LowPower -} // namespace SeekRangeStart +namespace KeypadInput { +namespace Attributes { namespace FeatureMap { @@ -20554,7 +23668,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20573,7 +23687,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20585,7 +23699,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20604,25 +23718,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace MediaPlayback +} // namespace KeypadInput -namespace MediaInput { +namespace ContentLauncher { namespace Attributes { -namespace CurrentInput { +namespace SupportedStreamingProtocols { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20631,9 +23745,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20641,10 +23755,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CurrentInput +} // namespace SupportedStreamingProtocols namespace FeatureMap { @@ -20653,7 +23767,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20672,7 +23786,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20684,7 +23798,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20703,17 +23817,48 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace MediaInput +} // namespace ContentLauncher -namespace LowPower { +namespace AudioOutput { namespace Attributes { +namespace CurrentOutput { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentOutput + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -20721,7 +23866,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20740,7 +23885,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20752,7 +23897,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20771,15 +23916,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace LowPower +} // namespace AudioOutput -namespace KeypadInput { +namespace ApplicationLauncher { namespace Attributes { namespace FeatureMap { @@ -20789,7 +23934,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20808,7 +23953,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20820,7 +23965,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20839,25 +23984,56 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace KeypadInput +} // namespace ApplicationLauncher -namespace ContentLauncher { +namespace ApplicationBasic { namespace Attributes { -namespace SupportedStreamingProtocols { +namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits>; + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace VendorName + +namespace VendorID { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value) +{ + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20866,9 +24042,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20876,19 +24052,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[2], 256); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[256 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace SupportedStreamingProtocols +} // namespace ApplicationName -namespace FeatureMap { +namespace ProductID { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20897,9 +24104,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20907,19 +24114,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace ProductID -namespace ClusterRevision { +namespace Status { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20928,9 +24135,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20938,47 +24145,41 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ContentLauncher - -namespace AudioOutput { -namespace Attributes { +} // namespace Status -namespace CurrentOutput { +namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = Traits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace CurrentOutput +} // namespace ApplicationVersion namespace FeatureMap { @@ -20987,7 +24188,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21006,7 +24207,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -21018,7 +24219,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21037,15 +24238,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace AudioOutput +} // namespace ApplicationBasic -namespace ApplicationLauncher { +namespace AccountLogin { namespace Attributes { namespace FeatureMap { @@ -21055,7 +24256,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21074,7 +24275,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -21086,7 +24287,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21105,118 +24306,118 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace ApplicationLauncher +} // namespace AccountLogin -namespace ApplicationBasic { +namespace ContentControl { namespace Attributes { -namespace VendorName { +namespace Enabled { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace VendorName +} // namespace Enabled -namespace VendorID { +namespace OnDemandRatingThreshold { -EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); + uint8_t zclString[8 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = Traits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 8, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 8); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE); + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 8, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[8 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace VendorID +} // namespace OnDemandRatingThreshold -namespace ApplicationName { +namespace ScheduledContentRatingThreshold { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { - uint8_t zclString[256 + 2]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[8 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfLongStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[2], 256); + VerifyOrReturnError(value.size() == 8, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 8); value.reduce_size(length); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[256 + 2]; - auto length = static_cast(value.size()); - Encoding::LittleEndian::Put16(zclString, length); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 8, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[8 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace ApplicationName +} // namespace ScheduledContentRatingThreshold -namespace ProductID { +namespace ScreenDailyTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21225,9 +24426,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -21235,19 +24436,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -} // namespace ProductID +} // namespace ScreenDailyTime -namespace Status { +namespace RemainingScreenTime { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21256,9 +24457,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -21266,41 +24467,41 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -} // namespace Status +} // namespace RemainingScreenTime -namespace ApplicationVersion { +namespace BlockUnrated { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace ApplicationVersion +} // namespace BlockUnrated namespace FeatureMap { @@ -21309,7 +24510,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21328,7 +24529,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -21340,7 +24541,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21359,15 +24560,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace ApplicationBasic +} // namespace ContentControl -namespace AccountLogin { +namespace ContentAppObserver { namespace Attributes { namespace FeatureMap { @@ -21377,7 +24578,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21396,7 +24597,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -21408,7 +24609,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -21427,13 +24628,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace AccountLogin +} // namespace ContentAppObserver namespace ElectricalMeasurement { namespace Attributes { 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 359cc2bf32543d..06037a8520fe0e 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 @@ -84,6 +84,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Scenes { namespace Attributes { +namespace SceneCount { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace SceneCount + namespace CurrentScene { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); @@ -243,8 +248,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Options { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // LevelControlOptions -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); + chip::BitMask * value); // OptionsBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Options namespace OnOffTransitionTime { @@ -1269,6 +1274,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace IcdManagement { namespace Attributes { +namespace UserActiveModeTriggerHint { +EmberAfStatus +Get(chip::EndpointId endpoint, + chip::BitMask * value); // UserActiveModeTriggerBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace UserActiveModeTriggerHint + +namespace UserActiveModeTriggerInstruction { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace UserActiveModeTriggerInstruction + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1282,7 +1299,38 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { +namespace Attributes { + +namespace SetTime { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace SetTime + +namespace TimeRemaining { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace TimeRemaining + +namespace TimerState { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value); // TimerStatusEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value); +} // namespace TimerState + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Timer + +namespace OvenCavityOperationalState { namespace Attributes { namespace FeatureMap { @@ -1296,7 +1344,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState + +namespace OvenMode { +namespace Attributes { + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + +namespace LaundryDryerControls { +namespace Attributes { + +namespace SelectedDrynessLevel { +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // DrynessLevelEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace SelectedDrynessLevel + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryDryerControls namespace ModeSelect { namespace Attributes { @@ -1644,30 +1735,121 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace MicrowaveOvenControl { namespace Attributes { -namespace CookTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace CookTime +} // namespace FeatureMap -namespace PowerSetting { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace PowerSetting +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace MicrowaveOvenControl -namespace MinPower { +namespace OperationalState { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OperationalState + +namespace RvcOperationalState { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace RvcOperationalState + +namespace HepaFilterMonitoring { +namespace Attributes { + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace HepaFilterMonitoring + +namespace ActivatedCarbonFilterMonitoring { +namespace Attributes { + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ActivatedCarbonFilterMonitoring + +namespace BooleanStateConfiguration { +namespace Attributes { + +namespace CurrentSensitivityLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace MinPower +} // namespace CurrentSensitivityLevel -namespace MaxPower { +namespace SupportedSensitivityLevels { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace MaxPower +} // namespace SupportedSensitivityLevels -namespace PowerStep { +namespace DefaultSensitivityLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace PowerStep +} // namespace DefaultSensitivityLevel + +namespace AlarmsActive { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsActive + +namespace AlarmsSuppressed { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsSuppressed + +namespace AlarmsEnabled { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsEnabled + +namespace AlarmsSupported { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsSupported + +namespace SensorFault { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // SensorFaultBitmap +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value); +} // namespace SensorFault namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 @@ -1680,11 +1862,83 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace MicrowaveOvenControl +} // namespace BooleanStateConfiguration -namespace OperationalState { +namespace ValveConfigurationAndControl { namespace Attributes { +namespace OpenDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OpenDuration + +namespace DefaultOpenDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace DefaultOpenDuration + +namespace AutoCloseTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace AutoCloseTime + +namespace RemainingDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace RemainingDuration + +namespace CurrentState { +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // ValveStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace CurrentState + +namespace TargetState { +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // ValveStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace TargetState + +namespace CurrentLevel { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace CurrentLevel + +namespace TargetLevel { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace TargetLevel + +namespace DefaultOpenLevel { +EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +} // namespace DefaultOpenLevel + +namespace ValveFault { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // ValveFaultBitmap +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value); +} // namespace ValveFault + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1696,9 +1950,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace OperationalState +} // namespace ValveConfigurationAndControl -namespace RvcOperationalState { +namespace ElectricalEnergyMeasurement { namespace Attributes { namespace FeatureMap { @@ -1712,29 +1966,261 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace RvcOperationalState +} // namespace ElectricalEnergyMeasurement -namespace HepaFilterMonitoring { +namespace DemandResponseLoadControl { namespace Attributes { +namespace NumberOfLoadControlPrograms { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfLoadControlPrograms + +namespace NumberOfEventsPerProgram { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfEventsPerProgram + +namespace NumberOfTransitions { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfTransitions + +namespace DefaultRandomStart { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace DefaultRandomStart + +namespace DefaultRandomDuration { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace DefaultRandomDuration + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace HepaFilterMonitoring +} // namespace DemandResponseLoadControl -namespace ActivatedCarbonFilterMonitoring { +namespace DeviceEnergyManagement { +namespace Attributes { + +namespace ESAType { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum * value); // ESATypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum value); +} // namespace ESAType + +namespace ESACanGenerate { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace ESACanGenerate + +namespace ESAState { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum * value); // ESAStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum value); +} // namespace ESAState + +namespace AbsMinPower { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // power_mw +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace AbsMinPower + +namespace AbsMaxPower { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // power_mw +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace AbsMaxPower + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { namespace Attributes { +namespace State { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // StateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::StateEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace State + +namespace SupplyState { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum * value); // SupplyStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum value); +} // namespace SupplyState + +namespace FaultState { +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum * value); // FaultStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum value); +} // namespace FaultState + +namespace ChargingEnabledUntil { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace ChargingEnabledUntil + +namespace DischargingEnabledUntil { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace DischargingEnabledUntil + +namespace CircuitCapacity { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace CircuitCapacity + +namespace MinimumChargeCurrent { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace MinimumChargeCurrent + +namespace MaximumChargeCurrent { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace MaximumChargeCurrent + +namespace MaximumDischargeCurrent { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace MaximumDischargeCurrent + +namespace UserMaximumChargeCurrent { +EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +} // namespace UserMaximumChargeCurrent + +namespace RandomizationDelayWindow { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace RandomizationDelayWindow + +namespace NumberOfWeeklyTargets { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfWeeklyTargets + +namespace NumberOfDailyTargets { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfDailyTargets + +namespace NextChargeStartTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NextChargeStartTime + +namespace NextChargeTargetTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NextChargeTargetTime + +namespace NextChargeRequiredEnergy { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NextChargeRequiredEnergy + +namespace NextChargeTargetSoC { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NextChargeTargetSoC + +namespace ApproximateEVEfficiency { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace ApproximateEVEfficiency + +namespace StateOfCharge { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StateOfCharge + +namespace BatteryCapacity { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace BatteryCapacity + +namespace VehicleID { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace VehicleID + +namespace SessionID { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SessionID + +namespace SessionDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SessionDuration + +namespace SessionEnergyCharged { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SessionEnergyCharged + +namespace SessionEnergyDischarged { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh +EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SessionEnergyDischarged + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace ActivatedCarbonFilterMonitoring +} // namespace EnergyEvse namespace DoorLock { namespace Attributes { @@ -2333,14 +2819,14 @@ namespace Thermostat { namespace Attributes { namespace LocalTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LocalTemperature namespace OutdoorTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); @@ -2352,22 +2838,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Occupancy namespace AbsMinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinHeatSetpointLimit namespace AbsMaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxHeatSetpointLimit namespace AbsMinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinCoolSetpointLimit namespace AbsMaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxCoolSetpointLimit @@ -2437,29 +2923,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); } // namespace MinSetpointDeadBand namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RemoteSensingBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace RemoteSensing namespace ControlSequenceOfOperation { EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ThermostatControlSequence * value); // ThermostatControlSequence -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value); + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); } // namespace ControlSequenceOfOperation namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value); // SystemModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); } // namespace SystemMode namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); } // namespace ThermostatRunningMode namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value); // StartOfWeekEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); } // namespace StartOfWeek namespace NumberOfWeeklyTransitions { @@ -2473,8 +2961,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfDailyTransitions namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); } // namespace TemperatureSetpointHold namespace TemperatureSetpointHoldDuration { @@ -2485,18 +2974,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace TemperatureSetpointHoldDuration namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + chip::BitMask * value); // ProgrammingOperationModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatProgrammingOperationMode namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RelayStateBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatRunningState namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); } // namespace SetpointChangeSource namespace SetpointChangeAmount { @@ -2559,8 +3052,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EmergencyHeatDelta namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); } // namespace ACType namespace ACCapacity { @@ -2569,35 +3062,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ACCapacity namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value); // ACRefrigerantTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); } // namespace ACRefrigerantType namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value); // ACCompressorTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); } // namespace ACCompressorType namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // ACErrorCodeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ACErrorCode namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value); // ACLouverPositionEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); } // namespace ACLouverPosition namespace ACCoilTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace ACCoilTemperature namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value); // ACCapacityFormatEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); } // namespace ACCapacityformat namespace FeatureMap { @@ -2697,18 +3192,25 @@ namespace ThermostatUserInterfaceConfiguration { namespace Attributes { namespace TemperatureDisplayMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value); // TemperatureDisplayModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value); } // namespace TemperatureDisplayMode namespace KeypadLockout { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value); // KeypadLockoutEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value); } // namespace KeypadLockout namespace ScheduleProgrammingVisibility { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum * + value); // ScheduleProgrammingVisibilityEnum +EmberAfStatus Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value); } // namespace ScheduleProgrammingVisibility namespace FeatureMap { @@ -3854,6 +4356,68 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace AccountLogin +namespace ContentControl { +namespace Attributes { + +namespace Enabled { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace Enabled + +namespace OnDemandRatingThreshold { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace OnDemandRatingThreshold + +namespace ScheduledContentRatingThreshold { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); +} // namespace ScheduledContentRatingThreshold + +namespace ScreenDailyTime { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace ScreenDailyTime + +namespace RemainingScreenTime { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace RemainingScreenTime + +namespace BlockUnrated { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace BlockUnrated + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ContentControl + +namespace ContentAppObserver { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ContentAppObserver + namespace ElectricalMeasurement { namespace Attributes { 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 3bb12cb2872388..873ab7d69fec07 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -361,13 +361,37 @@ void emberAfBooleanStateClusterInitCallback(chip::EndpointId endpoint); */ void emberAfIcdManagementClusterInitCallback(chip::EndpointId endpoint); -/** @brief Oven Operational State Cluster Init +/** @brief Timer Cluster Init * * Cluster Init * * @param endpoint Endpoint that is being initialized */ -void emberAfOvenOperationalStateClusterInitCallback(chip::EndpointId endpoint); +void emberAfTimerClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Cavity Operational State Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenCavityOperationalStateClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Laundry Dryer Controls Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfLaundryDryerControlsClusterInitCallback(chip::EndpointId endpoint); /** @brief Mode Select Cluster Init * @@ -513,6 +537,54 @@ void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); */ void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); +/** @brief Boolean State Configuration Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBooleanStateConfigurationClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Electrical Energy Measurement Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfElectricalEnergyMeasurementClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Demand Response Load Control Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDemandResponseLoadControlClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Device Energy Management Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDeviceEnergyManagementClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Energy EVSE Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpoint); + /** @brief Door Lock Cluster Init * * Cluster Init @@ -809,6 +881,22 @@ void emberAfApplicationBasicClusterInitCallback(chip::EndpointId endpoint); */ void emberAfAccountLoginClusterInitCallback(chip::EndpointId endpoint); +/** @brief Content Control Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentControlClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Content App Observer Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentAppObserverClusterInitCallback(chip::EndpointId endpoint); + /** @brief Electrical Measurement Cluster Init * * Cluster Init @@ -4003,42 +4091,274 @@ void emberAfIcdManagementClusterServerTickCallback(chip::EndpointId endpoint); void emberAfIcdManagementClusterClientTickCallback(chip::EndpointId endpoint); // -// Oven Operational State Cluster +// Timer Cluster +// + +/** @brief Timer Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfTimerClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Timer Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterTimerClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Timer Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfTimerClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Timer Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterTimerClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Timer Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterTimerClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Timer Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterTimerClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Timer Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfTimerClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Timer Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfTimerClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Oven Cavity Operational State Cluster +// + +/** @brief Oven Cavity Operational State Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenCavityOperationalStateClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Cavity Operational State Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterOvenCavityOperationalStateClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Oven Cavity Operational State Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenCavityOperationalStateClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Cavity Operational State Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterOvenCavityOperationalStateClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Oven Cavity Operational State Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterOvenCavityOperationalStateClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Cavity Operational State Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterOvenCavityOperationalStateClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Cavity Operational State Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenCavityOperationalStateClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Oven Cavity Operational State Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenCavityOperationalStateClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Oven Mode Cluster +// + +/** @brief Oven Mode Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterOvenModeClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterOvenModeClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Oven Mode Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterOvenModeClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Mode Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterOvenModeClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Mode Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenModeClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenModeClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Laundry Dryer Controls Cluster // -/** @brief Oven Operational State Cluster Server Init +/** @brief Laundry Dryer Controls Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfOvenOperationalStateClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfLaundryDryerControlsClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Oven Operational State Cluster Server Shutdown +/** @brief Laundry Dryer Controls Cluster Server Shutdown * * Server Shutdown * * @param endpoint Endpoint that is being shutdown */ -void MatterOvenOperationalStateClusterServerShutdownCallback(chip::EndpointId endpoint); +void MatterLaundryDryerControlsClusterServerShutdownCallback(chip::EndpointId endpoint); -/** @brief Oven Operational State Cluster Client Init +/** @brief Laundry Dryer Controls Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfOvenOperationalStateClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfLaundryDryerControlsClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief Oven Operational State Cluster Server Attribute Changed +/** @brief Laundry Dryer Controls Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterOvenOperationalStateClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterLaundryDryerControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief Oven Operational State Cluster Server Pre Attribute Changed +/** @brief Laundry Dryer Controls Cluster Server Pre Attribute Changed * * Server Pre Attribute Changed * @@ -4047,10 +4367,10 @@ void MatterOvenOperationalStateClusterServerAttributeChangedCallback(const chip: * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status MatterOvenOperationalStateClusterServerPreAttributeChangedCallback( +chip::Protocols::InteractionModel::Status MatterLaundryDryerControlsClusterServerPreAttributeChangedCallback( const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Oven Operational State Cluster Client Pre Attribute Changed +/** @brief Laundry Dryer Controls Cluster Client Pre Attribute Changed * * Client Pre Attribute Changed * @@ -4059,24 +4379,24 @@ chip::Protocols::InteractionModel::Status MatterOvenOperationalStateClusterServe * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status MatterOvenOperationalStateClusterClientPreAttributeChangedCallback( +chip::Protocols::InteractionModel::Status MatterLaundryDryerControlsClusterClientPreAttributeChangedCallback( const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Oven Operational State Cluster Server Tick +/** @brief Laundry Dryer Controls Cluster Server Tick * * Server Tick * * @param endpoint Endpoint that is being served */ -void emberAfOvenOperationalStateClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfLaundryDryerControlsClusterServerTickCallback(chip::EndpointId endpoint); -/** @brief Oven Operational State Cluster Client Tick +/** @brief Laundry Dryer Controls Cluster Client Tick * * Client Tick * * @param endpoint Endpoint that is being served */ -void emberAfOvenOperationalStateClusterClientTickCallback(chip::EndpointId endpoint); +void emberAfLaundryDryerControlsClusterClientTickCallback(chip::EndpointId endpoint); // // Mode Select Cluster @@ -5473,40 +5793,499 @@ void emberAfActivatedCarbonFilterMonitoringClusterServerTickCallback(chip::Endpo void emberAfActivatedCarbonFilterMonitoringClusterClientTickCallback(chip::EndpointId endpoint); // -// Door Lock Cluster +// Boolean State Configuration Cluster // -/** @brief Door Lock Cluster Server Init +/** @brief Boolean State Configuration Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfDoorLockClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Door Lock Cluster Server Shutdown +/** @brief Boolean State Configuration Cluster Server Shutdown * * Server Shutdown * * @param endpoint Endpoint that is being shutdown */ -void MatterDoorLockClusterServerShutdownCallback(chip::EndpointId endpoint); +void MatterBooleanStateConfigurationClusterServerShutdownCallback(chip::EndpointId endpoint); -/** @brief Door Lock Cluster Client Init +/** @brief Boolean State Configuration Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfDoorLockClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief Door Lock Cluster Server Attribute Changed +/** @brief Boolean State Configuration Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterDoorLockClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterBooleanStateConfigurationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Boolean State Configuration Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterBooleanStateConfigurationClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Boolean State Configuration Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterBooleanStateConfigurationClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Boolean State Configuration Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBooleanStateConfigurationClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Boolean State Configuration Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBooleanStateConfigurationClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Valve Configuration and Control Cluster +// + +/** @brief Valve Configuration and Control Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterValveConfigurationAndControlClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterValveConfigurationAndControlClusterServerAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Valve Configuration and Control Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterValveConfigurationAndControlClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Valve Configuration and Control Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterValveConfigurationAndControlClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Valve Configuration and Control Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfValveConfigurationAndControlClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfValveConfigurationAndControlClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Electrical Energy Measurement Cluster +// + +/** @brief Electrical Energy Measurement Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfElectricalEnergyMeasurementClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Electrical Energy Measurement Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterElectricalEnergyMeasurementClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Electrical Energy Measurement Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfElectricalEnergyMeasurementClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Electrical Energy Measurement Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterElectricalEnergyMeasurementClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Electrical Energy Measurement Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterElectricalEnergyMeasurementClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Electrical Energy Measurement Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterElectricalEnergyMeasurementClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Electrical Energy Measurement Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfElectricalEnergyMeasurementClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Electrical Energy Measurement Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfElectricalEnergyMeasurementClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Demand Response Load Control Cluster +// + +/** @brief Demand Response Load Control Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDemandResponseLoadControlClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Demand Response Load Control Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterDemandResponseLoadControlClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Demand Response Load Control Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDemandResponseLoadControlClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Demand Response Load Control Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterDemandResponseLoadControlClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Demand Response Load Control Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDemandResponseLoadControlClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Demand Response Load Control Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDemandResponseLoadControlClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Demand Response Load Control Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDemandResponseLoadControlClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Demand Response Load Control Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDemandResponseLoadControlClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Device Energy Management Cluster +// + +/** @brief Device Energy Management Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDeviceEnergyManagementClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Device Energy Management Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterDeviceEnergyManagementClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Device Energy Management Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDeviceEnergyManagementClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Device Energy Management Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterDeviceEnergyManagementClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Device Energy Management Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDeviceEnergyManagementClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Device Energy Management Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterDeviceEnergyManagementClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Device Energy Management Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDeviceEnergyManagementClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Device Energy Management Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDeviceEnergyManagementClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Energy EVSE Cluster +// + +/** @brief Energy EVSE Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfEnergyEvseClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Energy EVSE Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterEnergyEvseClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Energy EVSE Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfEnergyEvseClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Energy EVSE Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterEnergyEvseClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Energy EVSE Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterEnergyEvseClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Energy EVSE Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterEnergyEvseClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Energy EVSE Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfEnergyEvseClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Energy EVSE Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfEnergyEvseClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Door Lock Cluster +// + +/** @brief Door Lock Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDoorLockClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Door Lock Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterDoorLockClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Door Lock Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDoorLockClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Door Lock Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterDoorLockClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); /** @brief Door Lock Cluster Server Pre Attribute Changed * @@ -8334,6 +9113,160 @@ void emberAfAccountLoginClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfAccountLoginClusterClientTickCallback(chip::EndpointId endpoint); +// +// Content Control Cluster +// + +/** @brief Content Control Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentControlClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Content Control Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterContentControlClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Content Control Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentControlClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Content Control Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterContentControlClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Content Control Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterContentControlClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Content Control Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterContentControlClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Content Control Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfContentControlClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Content Control Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfContentControlClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Content App Observer Cluster +// + +/** @brief Content App Observer Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentAppObserverClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Content App Observer Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterContentAppObserverClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Content App Observer Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfContentAppObserverClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Content App Observer Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterContentAppObserverClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Content App Observer Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterContentAppObserverClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Content App Observer Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterContentAppObserverClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Content App Observer Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfContentAppObserverClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Content App Observer Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfContentAppObserverClusterClientTickCallback(chip::EndpointId endpoint); + // // Electrical Measurement Cluster // @@ -9082,29 +10015,51 @@ bool emberAfIcdManagementClusterStayActiveRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::DecodableType & commandData); /** - * @brief Oven Operational State Cluster Pause Command callback (from client) + * @brief Timer Cluster SetTimer Command callback (from client) + */ +bool emberAfTimerClusterSetTimerCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Timer::Commands::SetTimer::DecodableType & commandData); +/** + * @brief Timer Cluster ResetTimer Command callback (from client) + */ +bool emberAfTimerClusterResetTimerCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Timer::Commands::ResetTimer::DecodableType & commandData); +/** + * @brief Timer Cluster AddTime Command callback (from client) + */ +bool emberAfTimerClusterAddTimeCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Timer::Commands::AddTime::DecodableType & commandData); +/** + * @brief Timer Cluster ReduceTime Command callback (from client) + */ +bool emberAfTimerClusterReduceTimeCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Timer::Commands::ReduceTime::DecodableType & commandData); +/** + * @brief Oven Cavity Operational State Cluster Pause Command callback (from client) */ -bool emberAfOvenOperationalStateClusterPauseCallback( +bool emberAfOvenCavityOperationalStateClusterPauseCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenOperationalState::Commands::Pause::DecodableType & commandData); + const chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::DecodableType & commandData); /** - * @brief Oven Operational State Cluster Stop Command callback (from client) + * @brief Oven Cavity Operational State Cluster Stop Command callback (from client) */ -bool emberAfOvenOperationalStateClusterStopCallback( +bool emberAfOvenCavityOperationalStateClusterStopCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenOperationalState::Commands::Stop::DecodableType & commandData); + const chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::DecodableType & commandData); /** - * @brief Oven Operational State Cluster Start Command callback (from client) + * @brief Oven Cavity Operational State Cluster Start Command callback (from client) */ -bool emberAfOvenOperationalStateClusterStartCallback( +bool emberAfOvenCavityOperationalStateClusterStartCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenOperationalState::Commands::Start::DecodableType & commandData); + const chip::app::Clusters::OvenCavityOperationalState::Commands::Start::DecodableType & commandData); /** - * @brief Oven Operational State Cluster Resume Command callback (from client) + * @brief Oven Cavity Operational State Cluster Resume Command callback (from client) */ -bool emberAfOvenOperationalStateClusterResumeCallback( +bool emberAfOvenCavityOperationalStateClusterResumeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenOperationalState::Commands::Resume::DecodableType & commandData); + const chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */ @@ -9136,17 +10091,144 @@ bool emberAfDishwasherAlarmClusterModifyEnabledAlarmsCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::DecodableType & commandData); /** - * @brief Microwave Oven Control Cluster SetCookingParameters Command callback (from client) + * @brief Boolean State Configuration Cluster SuppressAlarm Command callback (from client) + */ +bool emberAfBooleanStateConfigurationClusterSuppressAlarmCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::DecodableType & commandData); +/** + * @brief Boolean State Configuration Cluster EnableDisableAlarm Command callback (from client) + */ +bool emberAfBooleanStateConfigurationClusterEnableDisableAlarmCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::DecodableType & commandData); +/** + * @brief Valve Configuration and Control Cluster Open Command callback (from client) + */ +bool emberAfValveConfigurationAndControlClusterOpenCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::DecodableType & commandData); +/** + * @brief Valve Configuration and Control Cluster Close Command callback (from client) + */ +bool emberAfValveConfigurationAndControlClusterCloseCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::DecodableType & commandData); +/** + * @brief Demand Response Load Control Cluster RegisterLoadControlProgramRequest Command callback (from client) + */ +bool emberAfDemandResponseLoadControlClusterRegisterLoadControlProgramRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::DecodableType & commandData); +/** + * @brief Demand Response Load Control Cluster UnregisterLoadControlProgramRequest Command callback (from client) + */ +bool emberAfDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::DecodableType & + commandData); +/** + * @brief Demand Response Load Control Cluster AddLoadControlEventRequest Command callback (from client) + */ +bool emberAfDemandResponseLoadControlClusterAddLoadControlEventRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::DecodableType & commandData); +/** + * @brief Demand Response Load Control Cluster RemoveLoadControlEventRequest Command callback (from client) + */ +bool emberAfDemandResponseLoadControlClusterRemoveLoadControlEventRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::DecodableType & commandData); +/** + * @brief Demand Response Load Control Cluster ClearLoadControlEventsRequest Command callback (from client) + */ +bool emberAfDemandResponseLoadControlClusterClearLoadControlEventsRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster PowerAdjustRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterPowerAdjustRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster CancelPowerAdjustRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterCancelPowerAdjustRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster StartTimeAdjustRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterStartTimeAdjustRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster PauseRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterPauseRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster ResumeRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterResumeRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster ModifyForecastRequest Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterModifyForecastRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::DecodableType & commandData); +/** + * @brief Device Energy Management Cluster RequestConstraintBasedForecast Command callback (from client) + */ +bool emberAfDeviceEnergyManagementClusterRequestConstraintBasedForecastCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster Disable Command callback (from client) + */ +bool emberAfEnergyEvseClusterDisableCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::EnergyEvse::Commands::Disable::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster EnableCharging Command callback (from client) + */ +bool emberAfEnergyEvseClusterEnableChargingCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::EnergyEvse::Commands::EnableCharging::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster EnableDischarging Command callback (from client) + */ +bool emberAfEnergyEvseClusterEnableDischargingCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster StartDiagnostics Command callback (from client) + */ +bool emberAfEnergyEvseClusterStartDiagnosticsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster SetTargets Command callback (from client) + */ +bool emberAfEnergyEvseClusterSetTargetsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::EnergyEvse::Commands::SetTargets::DecodableType & commandData); +/** + * @brief Energy EVSE Cluster GetTargets Command callback (from client) */ -bool emberAfMicrowaveOvenControlClusterSetCookingParametersCallback( +bool emberAfEnergyEvseClusterGetTargetsCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::DecodableType & commandData); + const chip::app::Clusters::EnergyEvse::Commands::GetTargets::DecodableType & commandData); /** - * @brief Microwave Oven Control Cluster AddMoreTime Command callback (from client) + * @brief Energy EVSE Cluster ClearTargets Command callback (from client) */ -bool emberAfMicrowaveOvenControlClusterAddMoreTimeCallback( +bool emberAfEnergyEvseClusterClearTargetsCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::DecodableType & commandData); + const chip::app::Clusters::EnergyEvse::Commands::ClearTargets::DecodableType & commandData); /** * @brief Door Lock Cluster LockDoor Command callback (from client) */ @@ -9477,6 +10559,24 @@ bool emberAfChannelClusterChangeChannelByNumberCallback( bool emberAfChannelClusterSkipChannelCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Channel::Commands::SkipChannel::DecodableType & commandData); +/** + * @brief Channel Cluster GetProgramGuide Command callback (from client) + */ +bool emberAfChannelClusterGetProgramGuideCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Channel::Commands::GetProgramGuide::DecodableType & commandData); +/** + * @brief Channel Cluster RecordProgram Command callback (from client) + */ +bool emberAfChannelClusterRecordProgramCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Channel::Commands::RecordProgram::DecodableType & commandData); +/** + * @brief Channel Cluster CancelRecordProgram Command callback (from client) + */ +bool emberAfChannelClusterCancelRecordProgramCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Channel::Commands::CancelRecordProgram::DecodableType & commandData); /** * @brief Target Navigator Cluster NavigateTarget Command callback (from client) */ @@ -9549,6 +10649,24 @@ bool emberAfMediaPlaybackClusterSkipBackwardCallback( bool emberAfMediaPlaybackClusterSeekCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::MediaPlayback::Commands::Seek::DecodableType & commandData); +/** + * @brief Media Playback Cluster ActivateAudioTrack Command callback (from client) + */ +bool emberAfMediaPlaybackClusterActivateAudioTrackCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::DecodableType & commandData); +/** + * @brief Media Playback Cluster ActivateTextTrack Command callback (from client) + */ +bool emberAfMediaPlaybackClusterActivateTextTrackCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::DecodableType & commandData); +/** + * @brief Media Playback Cluster DeactivateTextTrack Command callback (from client) + */ +bool emberAfMediaPlaybackClusterDeactivateTextTrackCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::DecodableType & commandData); /** * @brief Media Input Cluster SelectInput Command callback (from client) */ @@ -9644,6 +10762,72 @@ bool emberAfAccountLoginClusterLoginCallback(chip::app::CommandHandler * command bool emberAfAccountLoginClusterLogoutCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::AccountLogin::Commands::Logout::DecodableType & commandData); +/** + * @brief Content Control Cluster UpdatePIN Command callback (from client) + */ +bool emberAfContentControlClusterUpdatePINCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::UpdatePIN::DecodableType & commandData); +/** + * @brief Content Control Cluster ResetPIN Command callback (from client) + */ +bool emberAfContentControlClusterResetPINCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::ResetPIN::DecodableType & commandData); +/** + * @brief Content Control Cluster Enable Command callback (from client) + */ +bool emberAfContentControlClusterEnableCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::Enable::DecodableType & commandData); +/** + * @brief Content Control Cluster Disable Command callback (from client) + */ +bool emberAfContentControlClusterDisableCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::Disable::DecodableType & commandData); +/** + * @brief Content Control Cluster AddBonusTime Command callback (from client) + */ +bool emberAfContentControlClusterAddBonusTimeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::AddBonusTime::DecodableType & commandData); +/** + * @brief Content Control Cluster SetScreenDailyTime Command callback (from client) + */ +bool emberAfContentControlClusterSetScreenDailyTimeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::DecodableType & commandData); +/** + * @brief Content Control Cluster BlockUnratedContent Command callback (from client) + */ +bool emberAfContentControlClusterBlockUnratedContentCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::DecodableType & commandData); +/** + * @brief Content Control Cluster UnblockUnratedContent Command callback (from client) + */ +bool emberAfContentControlClusterUnblockUnratedContentCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::DecodableType & commandData); +/** + * @brief Content Control Cluster SetOnDemandRatingThreshold Command callback (from client) + */ +bool emberAfContentControlClusterSetOnDemandRatingThresholdCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::DecodableType & commandData); +/** + * @brief Content Control Cluster SetScheduledContentRatingThreshold Command callback (from client) + */ +bool emberAfContentControlClusterSetScheduledContentRatingThresholdCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::DecodableType & commandData); +/** + * @brief Content App Observer Cluster ContentAppMessage Command callback (from client) + */ +bool emberAfContentAppObserverClusterContentAppMessageCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::DecodableType & commandData); /** * @brief Electrical Measurement Cluster GetProfileInfoCommand 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 42bfe8f79842eb..72f6654c5a3b8b 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 @@ -118,39 +118,25 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(OnOff::StartUpOnOffEnum } } -static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::MoveMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::MoveModeEnum val) { - using EnumType = LevelControl::MoveMode; + using EnumType = LevelControl::MoveModeEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kUp: case EnumType::kDown: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_MOVE_MODE_UP: - case EMBER_ZCL_MOVE_MODE_DOWN: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(2); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::StepMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::StepModeEnum val) { - using EnumType = LevelControl::StepMode; + using EnumType = LevelControl::StepModeEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kUp: case EnumType::kDown: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_STEP_MODE_UP: - case EMBER_ZCL_STEP_MODE_DOWN: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(2); @@ -998,9 +984,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnost using EnumType = EthernetNetworkDiagnostics::PHYRateEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kRate10M: case EnumType::kRate100M: case EnumType::kRate1G: @@ -1011,18 +994,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnost case EnumType::kRate100G: case EnumType::kRate200G: case EnumType::kRate400G: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_PHY_RATE_ENUM_RATE10_M: - case EMBER_ZCL_PHY_RATE_ENUM_RATE100_M: - case EMBER_ZCL_PHY_RATE_ENUM_RATE1_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE5_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE10_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE40_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE100_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE200_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE400_G: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(10); @@ -1217,9 +1188,24 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(GroupKeyManagement::Gro } } -static auto __attribute__((unused)) EnsureKnownEnumValue(OvenOperationalState::ErrorStateEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Timer::TimerStatusEnum val) { - using EnumType = OvenOperationalState::ErrorStateEnum; + using EnumType = Timer::TimerStatusEnum; + switch (val) + { + case EnumType::kRunning: + case EnumType::kPaused: + case EnumType::kExpired: + case EnumType::kReady: + return val; + default: + return static_cast(4); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenCavityOperationalState::ErrorStateEnum val) +{ + using EnumType = OvenCavityOperationalState::ErrorStateEnum; switch (val) { case EnumType::kNoError: @@ -1231,21 +1217,56 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(OvenOperationalState::E return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(OvenOperationalState::OperationalStateEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenCavityOperationalState::OperationalStateEnum val) { - using EnumType = OvenOperationalState::OperationalStateEnum; + using EnumType = OvenCavityOperationalState::OperationalStateEnum; switch (val) { - case EnumType::kPreheating: - case EnumType::kPreheated: - case EnumType::kCoolingDown: - case EnumType::kSelfCleaning: + case EnumType::kStopped: + case EnumType::kRunning: + case EnumType::kPaused: + case EnumType::kError: + return val; + default: + return static_cast(4); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenMode::ModeTag val) +{ + using EnumType = OvenMode::ModeTag; + switch (val) + { + case EnumType::kBake: + case EnumType::kConvection: + case EnumType::kGrill: + case EnumType::kRoast: + case EnumType::kClean: + case EnumType::kConvectionBake: + case EnumType::kConvectionRoast: + case EnumType::kWarming: + case EnumType::kProofing: return val; default: return static_cast(0); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryDryerControls::DrynessLevelEnum val) +{ + using EnumType = LaundryDryerControls::DrynessLevelEnum; + switch (val) + { + case EnumType::kLow: + case EnumType::kNormal: + case EnumType::kExtra: + case EnumType::kMax: + return val; + default: + return static_cast(4); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherControls::NumberOfRinsesEnum val) { using EnumType = LaundryWasherControls::NumberOfRinsesEnum; @@ -1487,6 +1508,269 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ActivatedCarbonFilterMo } } +static auto __attribute__((unused)) EnsureKnownEnumValue(ValveConfigurationAndControl::StatusCodeEnum val) +{ + using EnumType = ValveConfigurationAndControl::StatusCodeEnum; + switch (val) + { + case EnumType::kFailureDueToFault: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(ValveConfigurationAndControl::ValveStateEnum val) +{ + using EnumType = ValveConfigurationAndControl::ValveStateEnum; + switch (val) + { + case EnumType::kClosed: + case EnumType::kOpen: + case EnumType::kTransitioning: + return val; + default: + return static_cast(3); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(ElectricalEnergyMeasurement::MeasurementTypeEnum val) +{ + using EnumType = ElectricalEnergyMeasurement::MeasurementTypeEnum; + switch (val) + { + case EnumType::kUnspecified: + case EnumType::kVoltage: + case EnumType::kActiveCurrent: + case EnumType::kReactiveCurrent: + case EnumType::kApparentCurrent: + case EnumType::kActivePower: + case EnumType::kReactivePower: + case EnumType::kApparentPower: + case EnumType::kRMSVoltage: + case EnumType::kRMSCurrent: + case EnumType::kRMSPower: + case EnumType::kFrequency: + case EnumType::kPowerFactor: + case EnumType::kNeutralCurrent: + case EnumType::kElectricalEnergy: + return val; + default: + return static_cast(15); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::CriticalityLevelEnum val) +{ + using EnumType = DemandResponseLoadControl::CriticalityLevelEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kGreen: + case EnumType::kLevel1: + case EnumType::kLevel2: + case EnumType::kLevel3: + case EnumType::kLevel4: + case EnumType::kLevel5: + case EnumType::kEmergency: + case EnumType::kPlannedOutage: + case EnumType::kServiceDisconnect: + return val; + default: + return static_cast(10); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::HeatingSourceEnum val) +{ + using EnumType = DemandResponseLoadControl::HeatingSourceEnum; + switch (val) + { + case EnumType::kAny: + case EnumType::kElectric: + case EnumType::kNonElectric: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::LoadControlEventChangeSourceEnum val) +{ + using EnumType = DemandResponseLoadControl::LoadControlEventChangeSourceEnum; + switch (val) + { + case EnumType::kAutomatic: + case EnumType::kUserAction: + return val; + default: + return static_cast(2); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::LoadControlEventStatusEnum val) +{ + using EnumType = DemandResponseLoadControl::LoadControlEventStatusEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kReceived: + case EnumType::kInProgress: + case EnumType::kCompleted: + case EnumType::kOptedOut: + case EnumType::kOptedIn: + case EnumType::kCanceled: + case EnumType::kSuperseded: + case EnumType::kPartialOptedOut: + case EnumType::kPartialOptedIn: + case EnumType::kNoParticipation: + case EnumType::kUnavailable: + case EnumType::kFailed: + return val; + default: + return static_cast(13); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::CauseEnum val) +{ + using EnumType = DeviceEnergyManagement::CauseEnum; + switch (val) + { + case EnumType::kNormalCompletion: + case EnumType::kOffline: + case EnumType::kFault: + case EnumType::kUserOptOut: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::CostTypeEnum val) +{ + using EnumType = DeviceEnergyManagement::CostTypeEnum; + switch (val) + { + case EnumType::kFinancial: + case EnumType::kGHGEmissions: + case EnumType::kComfort: + case EnumType::kTemperature: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::ESAStateEnum val) +{ + using EnumType = DeviceEnergyManagement::ESAStateEnum; + switch (val) + { + case EnumType::kOffline: + case EnumType::kOnline: + case EnumType::kFault: + case EnumType::kUserOptOut: + case EnumType::kPowerAdjustActive: + case EnumType::kPaused: + return val; + default: + return static_cast(6); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(DeviceEnergyManagement::ESATypeEnum val) +{ + using EnumType = DeviceEnergyManagement::ESATypeEnum; + switch (val) + { + case EnumType::kEvse: + case EnumType::kSpaceHeating: + case EnumType::kWaterHeating: + case EnumType::kSpaceCooling: + case EnumType::kSpaceHeatingCooling: + case EnumType::kBatteryStorage: + case EnumType::kSolarPV: + case EnumType::kFridgeFreezer: + case EnumType::kWashingMachine: + case EnumType::kDishwasher: + case EnumType::kCooking: + case EnumType::kHomeWaterPump: + case EnumType::kIrrigationWaterPump: + case EnumType::kPoolPump: + case EnumType::kOther: + return val; + default: + return static_cast(14); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(EnergyEvse::EnergyTransferStoppedReasonEnum val) +{ + using EnumType = EnergyEvse::EnergyTransferStoppedReasonEnum; + switch (val) + { + case EnumType::kEVStopped: + case EnumType::kEVSEStopped: + case EnumType::kOther: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(EnergyEvse::FaultStateEnum val) +{ + using EnumType = EnergyEvse::FaultStateEnum; + switch (val) + { + case EnumType::kNoError: + case EnumType::kMeterFailure: + case EnumType::kOverVoltage: + case EnumType::kUnderVoltage: + case EnumType::kOverCurrent: + case EnumType::kContactWetFailure: + case EnumType::kContactDryFailure: + case EnumType::kGroundFault: + case EnumType::kPowerLoss: + case EnumType::kPowerQuality: + case EnumType::kPilotShortCircuit: + case EnumType::kEmergencyStop: + case EnumType::kEVDisconnected: + case EnumType::kWrongPowerSupply: + case EnumType::kLiveNeutralSwap: + case EnumType::kOverTemperature: + case EnumType::kOther: + return val; + default: + return static_cast(16); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(EnergyEvse::StateEnum val) +{ + using EnumType = EnergyEvse::StateEnum; + switch (val) + { + case EnumType::kNotPluggedIn: + case EnumType::kPluggedInNoDemand: + case EnumType::kPluggedInDemand: + case EnumType::kPluggedInCharging: + case EnumType::kPluggedInDischarging: + case EnumType::kSessionEnding: + case EnumType::kFault: + return val; + default: + return static_cast(7); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(EnergyEvse::SupplyStateEnum val) +{ + using EnumType = EnergyEvse::SupplyStateEnum; + switch (val) + { + case EnumType::kDisabled: + case EnumType::kChargingEnabled: + case EnumType::kDischargingEnabled: + case EnumType::kDisabledError: + case EnumType::kDisabledDiagnostics: + return val; + default: + return static_cast(5); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::AlarmCodeEnum val) { using EnumType = DoorLock::AlarmCodeEnum; @@ -1910,22 +2194,78 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PumpConfigurationAndCon } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointAdjustMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCapacityFormatEnum val) { - using EnumType = Thermostat::SetpointAdjustMode; + using EnumType = Thermostat::ACCapacityFormatEnum; switch (val) { - case EnumType::kHeat: - case EnumType::kCool: - case EnumType::kBoth: + case EnumType::kBTUh: return val; default: - return static_cast(3); + return static_cast(1); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatControlSequence val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCompressorTypeEnum val) { - using EnumType = Thermostat::ThermostatControlSequence; + using EnumType = Thermostat::ACCompressorTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kT1: + case EnumType::kT2: + case EnumType::kT3: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACLouverPositionEnum val) +{ + using EnumType = Thermostat::ACLouverPositionEnum; + switch (val) + { + case EnumType::kClosed: + case EnumType::kOpen: + case EnumType::kQuarter: + case EnumType::kHalf: + case EnumType::kThreeQuarters: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACRefrigerantTypeEnum val) +{ + using EnumType = Thermostat::ACRefrigerantTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kR22: + case EnumType::kR410a: + case EnumType::kR407c: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACTypeEnum val) +{ + using EnumType = Thermostat::ACTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kCoolingFixed: + case EnumType::kHeatPumpFixed: + case EnumType::kCoolingInverter: + case EnumType::kHeatPumpInverter: + return val; + default: + return static_cast(5); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ControlSequenceOfOperationEnum val) +{ + using EnumType = Thermostat::ControlSequenceOfOperationEnum; switch (val) { case EnumType::kCoolingOnly: @@ -1939,22 +2279,52 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatC return static_cast(6); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointChangeSourceEnum val) { - using EnumType = Thermostat::ThermostatRunningMode; + using EnumType = Thermostat::SetpointChangeSourceEnum; + switch (val) + { + case EnumType::kManual: + case EnumType::kSchedule: + case EnumType::kExternal: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointRaiseLowerModeEnum val) +{ + using EnumType = Thermostat::SetpointRaiseLowerModeEnum; switch (val) { - case EnumType::kOff: - case EnumType::kCool: case EnumType::kHeat: + case EnumType::kCool: + case EnumType::kBoth: return val; default: - return static_cast(1); + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::StartOfWeekEnum val) +{ + using EnumType = Thermostat::StartOfWeekEnum; + switch (val) + { + case EnumType::kSunday: + case EnumType::kMonday: + case EnumType::kTuesday: + case EnumType::kWednesday: + case EnumType::kThursday: + case EnumType::kFriday: + case EnumType::kSaturday: + return val; + default: + return static_cast(7); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatSystemMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SystemModeEnum val) { - using EnumType = Thermostat::ThermostatSystemMode; + using EnumType = Thermostat::SystemModeEnum; switch (val) { case EnumType::kOff: @@ -1971,6 +2341,31 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatS return static_cast(2); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::TemperatureSetpointHoldEnum val) +{ + using EnumType = Thermostat::TemperatureSetpointHoldEnum; + switch (val) + { + case EnumType::kSetpointHoldOff: + case EnumType::kSetpointHoldOn: + return val; + default: + return static_cast(2); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningModeEnum val) +{ + using EnumType = Thermostat::ThermostatRunningModeEnum; + switch (val) + { + case EnumType::kOff: + case EnumType::kCool: + case EnumType::kHeat: + return val; + default: + return static_cast(1); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::AirflowDirectionEnum val) { @@ -2030,6 +2425,48 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::StepDirecti } } +static auto __attribute__((unused)) EnsureKnownEnumValue(ThermostatUserInterfaceConfiguration::KeypadLockoutEnum val) +{ + using EnumType = ThermostatUserInterfaceConfiguration::KeypadLockoutEnum; + switch (val) + { + case EnumType::kNoLockout: + case EnumType::kLockout1: + case EnumType::kLockout2: + case EnumType::kLockout3: + case EnumType::kLockout4: + case EnumType::kLockout5: + return val; + default: + return static_cast(6); + } +} +static auto __attribute__((unused)) +EnsureKnownEnumValue(ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum val) +{ + using EnumType = ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum; + switch (val) + { + case EnumType::kScheduleProgrammingPermitted: + case EnumType::kScheduleProgrammingDenied: + return val; + default: + return static_cast(2); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum val) +{ + using EnumType = ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum; + switch (val) + { + case EnumType::kCelsius: + case EnumType::kFahrenheit: + return val; + default: + return static_cast(2); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopAction val) { using EnumType = ColorControl::ColorLoopAction; @@ -2060,17 +2497,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorMode using EnumType = ColorControl::ColorMode; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kCurrentHueAndCurrentSaturation: case EnumType::kCurrentXAndCurrentY: case EnumType::kColorTemperature: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION: - case EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y: - case EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(3); @@ -2641,6 +3070,19 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(RadonConcentrationMeasu } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::ChannelTypeEnum val) +{ + using EnumType = Channel::ChannelTypeEnum; + switch (val) + { + case EnumType::kSatellite: + case EnumType::kCable: + case EnumType::kTerrestrial: + return val; + default: + return static_cast(3); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::LineupInfoTypeEnum val) { using EnumType = Channel::LineupInfoTypeEnum; @@ -2666,9 +3108,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::StatusEnum val } } -static auto __attribute__((unused)) EnsureKnownEnumValue(TargetNavigator::TargetNavigatorStatusEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(TargetNavigator::StatusEnum val) { - using EnumType = TargetNavigator::TargetNavigatorStatusEnum; + using EnumType = TargetNavigator::StatusEnum; switch (val) { case EnumType::kSuccess: @@ -2680,6 +3122,34 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(TargetNavigator::Target } } +static auto __attribute__((unused)) EnsureKnownEnumValue(MediaPlayback::CharacteristicEnum val) +{ + using EnumType = MediaPlayback::CharacteristicEnum; + switch (val) + { + case EnumType::kForcedSubtitles: + case EnumType::kDescribesVideo: + case EnumType::kEasyToRead: + case EnumType::kFrameBased: + case EnumType::kMainProgram: + case EnumType::kOriginalContent: + case EnumType::kVoiceOverTranslation: + case EnumType::kCaption: + case EnumType::kSubtitle: + case EnumType::kAlternate: + case EnumType::kSupplementary: + case EnumType::kCommentary: + case EnumType::kDubbedTranslation: + case EnumType::kDescription: + case EnumType::kMetadata: + case EnumType::kEnhancedAudioIntelligibility: + case EnumType::kEmergency: + case EnumType::kKaraoke: + return val; + default: + return static_cast(18); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(MediaPlayback::PlaybackStateEnum val) { using EnumType = MediaPlayback::PlaybackStateEnum; @@ -2734,9 +3204,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(MediaInput::InputTypeEn } } -static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::CecKeyCode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::CECKeyCodeEnum val) { - using EnumType = KeypadInput::CecKeyCode; + using EnumType = KeypadInput::CECKeyCodeEnum; switch (val) { case EnumType::kSelect: @@ -2844,6 +3314,34 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::StatusEnum } } +static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::CharacteristicEnum val) +{ + using EnumType = ContentLauncher::CharacteristicEnum; + switch (val) + { + case EnumType::kForcedSubtitles: + case EnumType::kDescribesVideo: + case EnumType::kEasyToRead: + case EnumType::kFrameBased: + case EnumType::kMainProgram: + case EnumType::kOriginalContent: + case EnumType::kVoiceOverTranslation: + case EnumType::kCaption: + case EnumType::kSubtitle: + case EnumType::kAlternate: + case EnumType::kSupplementary: + case EnumType::kCommentary: + case EnumType::kDubbedTranslation: + case EnumType::kDescription: + case EnumType::kMetadata: + case EnumType::kEnhancedAudioIntelligibility: + case EnumType::kEmergency: + case EnumType::kKaraoke: + return val; + default: + return static_cast(18); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::MetricTypeEnum val) { using EnumType = ContentLauncher::MetricTypeEnum; @@ -2875,9 +3373,12 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::Parame case EnumType::kSportsTeam: case EnumType::kType: case EnumType::kVideo: + case EnumType::kSeason: + case EnumType::kEpisode: + case EnumType::kAny: return val; default: - return static_cast(14); + return static_cast(17); } } static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::StatusEnum val) @@ -2888,9 +3389,11 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::Status case EnumType::kSuccess: case EnumType::kURLNotAvailable: case EnumType::kAuthFailed: + case EnumType::kTextTrackNotAvailable: + case EnumType::kAudioTrackNotAvailable: return val; default: - return static_cast(3); + return static_cast(5); } } @@ -2940,6 +3443,19 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ApplicationBasic::Appli } } +static auto __attribute__((unused)) EnsureKnownEnumValue(ContentAppObserver::StatusEnum val) +{ + using EnumType = ContentAppObserver::StatusEnum; + switch (val) + { + case EnumType::kSuccess: + case EnumType::kUnexpectedData: + return val; + default: + return static_cast(2); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(UnitTesting::SimpleEnum val) { using EnumType = UnitTesting::SimpleEnum; 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 81e9cfc21cb152..274bea95b7a097 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 @@ -21,8 +21,6 @@ #include -#include - namespace chip { namespace app { namespace Clusters { @@ -182,11 +180,8 @@ namespace OnOffSwitchConfiguration {} // namespace OnOffSwitchConfiguration namespace LevelControl { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for MoveMode -enum class MoveMode : uint8_t +// Enum for MoveModeEnum +enum class MoveModeEnum : uint8_t { kUp = 0x00, kDown = 0x01, @@ -196,16 +191,9 @@ enum class MoveMode : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MoveMode = EmberAfMoveMode; -static MoveMode __attribute__((unused)) kMoveModekUnknownEnumValue = static_cast(2); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for StepMode -enum class StepMode : uint8_t +// Enum for StepModeEnum +enum class StepModeEnum : uint8_t { kUp = 0x00, kDown = 0x01, @@ -215,10 +203,6 @@ enum class StepMode : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StepMode = EmberAfStepMode; -static StepMode __attribute__((unused)) kStepModekUnknownEnumValue = static_cast(2); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature enum class Feature : uint32_t @@ -228,8 +212,8 @@ enum class Feature : uint32_t kFrequency = 0x4, }; -// Bitmap for LevelControlOptions -enum class LevelControlOptions : uint8_t +// Bitmap for OptionsBitmap +enum class OptionsBitmap : uint8_t { kExecuteIfOff = 0x1, kCoupleColorTempToLevel = 0x2, @@ -1214,9 +1198,6 @@ enum class Feature : uint32_t namespace EthernetNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PHYRateEnum enum class PHYRateEnum : uint8_t { @@ -1236,10 +1217,6 @@ enum class PHYRateEnum : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 10, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateEnum = EmberAfPHYRateEnum; -static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature enum class Feature : uint32_t @@ -1526,7 +1503,30 @@ enum class UserActiveModeTriggerBitmap : uint32_t }; } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { + +// Enum for TimerStatusEnum +enum class TimerStatusEnum : uint8_t +{ + kRunning = 0x00, + kPaused = 0x01, + kExpired = 0x02, + kReady = 0x03, + // 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 = 4, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kReset = 0x1, +}; +} // namespace Timer + +namespace OvenCavityOperationalState { // Enum for ErrorStateEnum enum class ErrorStateEnum : uint8_t @@ -1545,17 +1545,62 @@ enum class ErrorStateEnum : uint8_t // Enum for OperationalStateEnum enum class OperationalStateEnum : uint8_t { - kPreheating = 0x40, - kPreheated = 0x41, - kCoolingDown = 0x42, - kSelfCleaning = 0x43, + kStopped = 0x00, + kRunning = 0x01, + kPaused = 0x02, + kError = 0x03, + // 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 = 4, +}; +} // namespace OvenCavityOperationalState + +namespace OvenMode { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kBake = 0x4000, + kConvection = 0x4001, + kGrill = 0x4002, + kRoast = 0x4003, + kClean = 0x4004, + kConvectionBake = 0x4005, + kConvectionRoast = 0x4006, + kWarming = 0x4007, + kProofing = 0x4008, // 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 = 0, }; -} // namespace OvenOperationalState + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, +}; +} // namespace OvenMode + +namespace LaundryDryerControls { + +// Enum for DrynessLevelEnum +enum class DrynessLevelEnum : uint8_t +{ + kLow = 0x00, + kNormal = 0x01, + kExtra = 0x02, + kMax = 0x03, + // 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 = 4, +}; +} // namespace LaundryDryerControls namespace ModeSelect { @@ -2080,6 +2125,415 @@ enum class Feature : uint32_t }; } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanStateConfiguration { + +// Bitmap for AlarmModeBitmap +enum class AlarmModeBitmap : uint8_t +{ + kVisual = 0x1, + kAudible = 0x2, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kVisual = 0x1, + kAudible = 0x2, + kAlarmSuppress = 0x4, + kSensitivityLevel = 0x8, +}; + +// Bitmap for SensorFaultBitmap +enum class SensorFaultBitmap : uint16_t +{ + kGeneralFault = 0x1, +}; +} // namespace BooleanStateConfiguration + +namespace ValveConfigurationAndControl { + +// Enum for StatusCodeEnum +enum class StatusCodeEnum : uint8_t +{ + kFailureDueToFault = 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 = 0, +}; + +// Enum for ValveStateEnum +enum class ValveStateEnum : uint8_t +{ + kClosed = 0x00, + kOpen = 0x01, + kTransitioning = 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, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kTimeSync = 0x1, + kLevel = 0x2, +}; + +// Bitmap for ValveFaultBitmap +enum class ValveFaultBitmap : uint16_t +{ + kGeneralFault = 0x1, + kBlocked = 0x2, + kLeaking = 0x4, + kNotConnected = 0x8, + kShortCircuit = 0x10, + kCurrentExceeded = 0x20, +}; +} // namespace ValveConfigurationAndControl + +namespace ElectricalEnergyMeasurement { + +// Enum for MeasurementTypeEnum +enum class MeasurementTypeEnum : uint16_t +{ + kUnspecified = 0x00, + kVoltage = 0x01, + kActiveCurrent = 0x02, + kReactiveCurrent = 0x03, + kApparentCurrent = 0x04, + kActivePower = 0x05, + kReactivePower = 0x06, + kApparentPower = 0x07, + kRMSVoltage = 0x08, + kRMSCurrent = 0x09, + kRMSPower = 0x0A, + kFrequency = 0x0B, + kPowerFactor = 0x0C, + kNeutralCurrent = 0x0D, + kElectricalEnergy = 0x0E, + // 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 = 15, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kImportedEnergy = 0x1, + kExportedEnergy = 0x2, + kCumulativeEnergy = 0x4, + kPeriodicEnergy = 0x8, +}; +} // namespace ElectricalEnergyMeasurement + +namespace DemandResponseLoadControl { + +// Enum for CriticalityLevelEnum +enum class CriticalityLevelEnum : uint8_t +{ + kUnknown = 0x00, + kGreen = 0x01, + kLevel1 = 0x02, + kLevel2 = 0x03, + kLevel3 = 0x04, + kLevel4 = 0x05, + kLevel5 = 0x06, + kEmergency = 0x07, + kPlannedOutage = 0x08, + kServiceDisconnect = 0x09, + // 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 = 10, +}; + +// Enum for HeatingSourceEnum +enum class HeatingSourceEnum : uint8_t +{ + kAny = 0x00, + kElectric = 0x01, + kNonElectric = 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 LoadControlEventChangeSourceEnum +enum class LoadControlEventChangeSourceEnum : uint8_t +{ + kAutomatic = 0x00, + kUserAction = 0x01, + // 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 = 2, +}; + +// Enum for LoadControlEventStatusEnum +enum class LoadControlEventStatusEnum : uint8_t +{ + kUnknown = 0x00, + kReceived = 0x01, + kInProgress = 0x02, + kCompleted = 0x03, + kOptedOut = 0x04, + kOptedIn = 0x05, + kCanceled = 0x06, + kSuperseded = 0x07, + kPartialOptedOut = 0x08, + kPartialOptedIn = 0x09, + kNoParticipation = 0x0A, + kUnavailable = 0x0B, + kFailed = 0x0C, + // 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 = 13, +}; + +// Bitmap for CancelControlBitmap +enum class CancelControlBitmap : uint16_t +{ + kRandomEnd = 0x1, +}; + +// Bitmap for DeviceClassBitmap +enum class DeviceClassBitmap : uint32_t +{ + kHvac = 0x1, + kStripHeater = 0x2, + kWaterHeater = 0x4, + kPoolPump = 0x8, + kSmartAppliance = 0x10, + kIrrigationPump = 0x20, + kCommercialLoad = 0x40, + kResidentialLoad = 0x80, + kExteriorLighting = 0x100, + kInteriorLighting = 0x200, + kEv = 0x400, + kGenerationSystem = 0x800, + kSmartInverter = 0x1000, + kEvse = 0x2000, + kResu = 0x4000, + kEms = 0x8000, + kSem = 0x10000, +}; + +// Bitmap for EventControlBitmap +enum class EventControlBitmap : uint16_t +{ + kRandomStart = 0x1, +}; + +// Bitmap for EventTransitionControlBitmap +enum class EventTransitionControlBitmap : uint16_t +{ + kRandomDuration = 0x1, + kIgnoreOptOut = 0x2, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kEnrollmentGroups = 0x1, + kTemperatureOffset = 0x2, + kTemperatureSetpoint = 0x4, + kLoadAdjustment = 0x8, + kDutyCycle = 0x10, + kPowerSavings = 0x20, + kHeatingSource = 0x40, +}; +} // namespace DemandResponseLoadControl + +namespace DeviceEnergyManagement { + +// Enum for CauseEnum +enum class CauseEnum : uint8_t +{ + kNormalCompletion = 0x00, + kOffline = 0x01, + kFault = 0x02, + kUserOptOut = 0x03, + // 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 = 4, +}; + +// Enum for CostTypeEnum +enum class CostTypeEnum : uint8_t +{ + kFinancial = 0x00, + kGHGEmissions = 0x01, + kComfort = 0x02, + kTemperature = 0x03, + // 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 = 4, +}; + +// Enum for ESAStateEnum +enum class ESAStateEnum : uint8_t +{ + kOffline = 0x00, + kOnline = 0x01, + kFault = 0x02, + kUserOptOut = 0x03, + kPowerAdjustActive = 0x04, + kPaused = 0x05, + // 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 = 6, +}; + +// Enum for ESATypeEnum +enum class ESATypeEnum : uint8_t +{ + kEvse = 0x00, + kSpaceHeating = 0x01, + kWaterHeating = 0x02, + kSpaceCooling = 0x03, + kSpaceHeatingCooling = 0x04, + kBatteryStorage = 0x05, + kSolarPV = 0x06, + kFridgeFreezer = 0x07, + kWashingMachine = 0x08, + kDishwasher = 0x09, + kCooking = 0x0A, + kHomeWaterPump = 0x0B, + kIrrigationWaterPump = 0x0C, + kPoolPump = 0x0D, + kOther = 0xFF, + // 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 = 14, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kPowerAdjustment = 0x1, + kPowerForecastReporting = 0x2, + kStateForecastReporting = 0x4, + kForecastAdjustment = 0x8, +}; +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { + +// Enum for EnergyTransferStoppedReasonEnum +enum class EnergyTransferStoppedReasonEnum : uint8_t +{ + kEVStopped = 0x00, + kEVSEStopped = 0x01, + kOther = 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 FaultStateEnum +enum class FaultStateEnum : uint8_t +{ + kNoError = 0x00, + kMeterFailure = 0x01, + kOverVoltage = 0x02, + kUnderVoltage = 0x03, + kOverCurrent = 0x04, + kContactWetFailure = 0x05, + kContactDryFailure = 0x06, + kGroundFault = 0x07, + kPowerLoss = 0x08, + kPowerQuality = 0x09, + kPilotShortCircuit = 0x0A, + kEmergencyStop = 0x0B, + kEVDisconnected = 0x0C, + kWrongPowerSupply = 0x0D, + kLiveNeutralSwap = 0x0E, + kOverTemperature = 0x0F, + kOther = 0xFF, + // 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 = 16, +}; + +// Enum for StateEnum +enum class StateEnum : uint8_t +{ + kNotPluggedIn = 0x00, + kPluggedInNoDemand = 0x01, + kPluggedInDemand = 0x02, + kPluggedInCharging = 0x03, + kPluggedInDischarging = 0x04, + kSessionEnding = 0x05, + kFault = 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 SupplyStateEnum +enum class SupplyStateEnum : uint8_t +{ + kDisabled = 0x00, + kChargingEnabled = 0x01, + kDischargingEnabled = 0x02, + kDisabledError = 0x03, + kDisabledDiagnostics = 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 + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kChargingPreferences = 0x1, + kSoCReporting = 0x2, + kPlugAndCharge = 0x4, + kRfid = 0x8, + kV2x = 0x10, +}; + +// Bitmap for TargetDayOfWeekBitmap +enum class TargetDayOfWeekBitmap : uint8_t +{ + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, +}; +} // namespace EnergyEvse + namespace DoorLock { // Enum for AlarmCodeEnum @@ -2782,21 +3236,77 @@ enum class PumpStatusBitmap : uint16_t namespace Thermostat { -// Enum for SetpointAdjustMode -enum class SetpointAdjustMode : uint8_t +// Enum for ACCapacityFormatEnum +enum class ACCapacityFormatEnum : uint8_t { - kHeat = 0x00, - kCool = 0x01, - kBoth = 0x02, + kBTUh = 0x00, // 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, + kUnknownEnumValue = 1, +}; + +// Enum for ACCompressorTypeEnum +enum class ACCompressorTypeEnum : uint8_t +{ + kUnknown = 0x00, + kT1 = 0x01, + kT2 = 0x02, + kT3 = 0x03, + // 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 = 4, +}; + +// Enum for ACLouverPositionEnum +enum class ACLouverPositionEnum : uint8_t +{ + kClosed = 0x01, + kOpen = 0x02, + kQuarter = 0x03, + kHalf = 0x04, + kThreeQuarters = 0x05, + // 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 = 0, +}; + +// Enum for ACRefrigerantTypeEnum +enum class ACRefrigerantTypeEnum : uint8_t +{ + kUnknown = 0x00, + kR22 = 0x01, + kR410a = 0x02, + kR407c = 0x03, + // 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 = 4, +}; + +// Enum for ACTypeEnum +enum class ACTypeEnum : uint8_t +{ + kUnknown = 0x00, + kCoolingFixed = 0x01, + kHeatPumpFixed = 0x02, + kCoolingInverter = 0x03, + kHeatPumpInverter = 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 + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, }; -// Enum for ThermostatControlSequence -enum class ThermostatControlSequence : uint8_t +// Enum for ControlSequenceOfOperationEnum +enum class ControlSequenceOfOperationEnum : uint8_t { kCoolingOnly = 0x00, kCoolingWithReheat = 0x01, @@ -2811,21 +3321,51 @@ enum class ThermostatControlSequence : uint8_t kUnknownEnumValue = 6, }; -// Enum for ThermostatRunningMode -enum class ThermostatRunningMode : uint8_t +// Enum for SetpointChangeSourceEnum +enum class SetpointChangeSourceEnum : uint8_t { - kOff = 0x00, - kCool = 0x03, - kHeat = 0x04, + kManual = 0x00, + kSchedule = 0x01, + kExternal = 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 = 1, + kUnknownEnumValue = 3, }; -// Enum for ThermostatSystemMode -enum class ThermostatSystemMode : uint8_t +// Enum for SetpointRaiseLowerModeEnum +enum class SetpointRaiseLowerModeEnum : uint8_t +{ + kHeat = 0x00, + kCool = 0x01, + kBoth = 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 StartOfWeekEnum +enum class StartOfWeekEnum : uint8_t +{ + kSunday = 0x00, + kMonday = 0x01, + kTuesday = 0x02, + kWednesday = 0x03, + kThursday = 0x04, + kFriday = 0x05, + kSaturday = 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 SystemModeEnum +enum class SystemModeEnum : uint8_t { kOff = 0x00, kAuto = 0x01, @@ -2843,17 +3383,39 @@ enum class ThermostatSystemMode : uint8_t kUnknownEnumValue = 2, }; -// Bitmap for DayOfWeek -enum class DayOfWeek : uint8_t +// Enum for TemperatureSetpointHoldEnum +enum class TemperatureSetpointHoldEnum : uint8_t { - kSunday = 0x1, - kMonday = 0x2, - kTuesday = 0x4, - kWednesday = 0x8, - kThursday = 0x10, - kFriday = 0x20, - kSaturday = 0x40, - kAway = 0x80, + kSetpointHoldOff = 0x00, + kSetpointHoldOn = 0x01, + // 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 = 2, +}; + +// Enum for ThermostatRunningModeEnum +enum class ThermostatRunningModeEnum : uint8_t +{ + kOff = 0x00, + kCool = 0x03, + kHeat = 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 + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, +}; + +// Bitmap for ACErrorCodeBitmap +enum class ACErrorCodeBitmap : uint32_t +{ + kCompressorFail = 0x1, + kRoomSensorFail = 0x2, + kOutdoorSensorFail = 0x4, + kCoilSensorFail = 0x8, + kFanFail = 0x10, }; // Bitmap for Feature @@ -2868,8 +3430,58 @@ enum class Feature : uint32_t kLocalTemperatureNotExposed = 0x40, }; -// Bitmap for ModeForSequence -enum class ModeForSequence : uint8_t +// Bitmap for HVACSystemTypeBitmap +enum class HVACSystemTypeBitmap : uint8_t +{ + kCoolingStage = 0x3, + kHeatingStage = 0xC, + kHeatingIsHeatPump = 0x10, + kHeatingUsesFuel = 0x20, +}; + +// Bitmap for ProgrammingOperationModeBitmap +enum class ProgrammingOperationModeBitmap : uint8_t +{ + kScheduleActive = 0x1, + kAutoRecovery = 0x2, + kEconomy = 0x4, +}; + +// Bitmap for RelayStateBitmap +enum class RelayStateBitmap : uint16_t +{ + kHeat = 0x1, + kCool = 0x2, + kFan = 0x4, + kHeatStage2 = 0x8, + kCoolStage2 = 0x10, + kFanStage2 = 0x20, + kFanStage3 = 0x40, +}; + +// Bitmap for RemoteSensingBitmap +enum class RemoteSensingBitmap : uint8_t +{ + kLocalTemperature = 0x1, + kOutdoorTemperature = 0x2, + kOccupancy = 0x4, +}; + +// Bitmap for ScheduleDayOfWeekBitmap +enum class ScheduleDayOfWeekBitmap : uint8_t +{ + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, + kAway = 0x80, +}; + +// Bitmap for ScheduleModeBitmap +enum class ScheduleModeBitmap : uint8_t { kHeatSetpointPresent = 0x1, kCoolSetpointPresent = 0x2, @@ -2962,7 +3574,48 @@ enum class WindBitmap : uint8_t }; } // namespace FanControl -namespace ThermostatUserInterfaceConfiguration {} // namespace ThermostatUserInterfaceConfiguration +namespace ThermostatUserInterfaceConfiguration { + +// Enum for KeypadLockoutEnum +enum class KeypadLockoutEnum : uint8_t +{ + kNoLockout = 0x00, + kLockout1 = 0x01, + kLockout2 = 0x02, + kLockout3 = 0x03, + kLockout4 = 0x04, + kLockout5 = 0x05, + // 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 = 6, +}; + +// Enum for ScheduleProgrammingVisibilityEnum +enum class ScheduleProgrammingVisibilityEnum : uint8_t +{ + kScheduleProgrammingPermitted = 0x00, + kScheduleProgrammingDenied = 0x01, + // 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 = 2, +}; + +// Enum for TemperatureDisplayModeEnum +enum class TemperatureDisplayModeEnum : uint8_t +{ + kCelsius = 0x00, + kFahrenheit = 0x01, + // 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 = 2, +}; +} // namespace ThermostatUserInterfaceConfiguration namespace ColorControl { @@ -2991,9 +3644,6 @@ enum class ColorLoopDirection : uint8_t kUnknownEnumValue = 2, }; -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ColorMode enum class ColorMode : uint8_t { @@ -3006,10 +3656,6 @@ enum class ColorMode : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 3, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; -static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for HueDirection enum class HueDirection : uint8_t @@ -3786,6 +4432,19 @@ namespace WakeOnLan {} // namespace WakeOnLan namespace Channel { +// Enum for ChannelTypeEnum +enum class ChannelTypeEnum : uint8_t +{ + kSatellite = 0x00, + kCable = 0x01, + kTerrestrial = 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 LineupInfoTypeEnum enum class LineupInfoTypeEnum : uint8_t { @@ -3813,15 +4472,25 @@ enum class StatusEnum : uint8_t // Bitmap for Feature enum class Feature : uint32_t { - kChannelList = 0x1, - kLineupInfo = 0x2, + kChannelList = 0x1, + kLineupInfo = 0x2, + kElectronicGuide = 0x3, + kRecordProgram = 0x4, +}; + +// Bitmap for RecordingFlagBitmap +enum class RecordingFlagBitmap : uint32_t +{ + kScheduled = 0x1, + kRecordSeries = 0x2, + kRecorded = 0x3, }; } // namespace Channel namespace TargetNavigator { -// Enum for TargetNavigatorStatusEnum -enum class TargetNavigatorStatusEnum : uint8_t +// Enum for StatusEnum +enum class StatusEnum : uint8_t { kSuccess = 0x00, kTargetNotFound = 0x01, @@ -3836,6 +4505,34 @@ enum class TargetNavigatorStatusEnum : uint8_t namespace MediaPlayback { +// Enum for CharacteristicEnum +enum class CharacteristicEnum : uint8_t +{ + kForcedSubtitles = 0x00, + kDescribesVideo = 0x01, + kEasyToRead = 0x02, + kFrameBased = 0x03, + kMainProgram = 0x04, + kOriginalContent = 0x05, + kVoiceOverTranslation = 0x06, + kCaption = 0x07, + kSubtitle = 0x08, + kAlternate = 0x09, + kSupplementary = 0x0A, + kCommentary = 0x0B, + kDubbedTranslation = 0x0C, + kDescription = 0x0D, + kMetadata = 0x0E, + kEnhancedAudioIntelligibility = 0x0F, + kEmergency = 0x10, + kKaraoke = 0x11, + // 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 = 18, +}; + // Enum for PlaybackStateEnum enum class PlaybackStateEnum : uint8_t { @@ -3871,6 +4568,9 @@ enum class Feature : uint32_t { kAdvancedSeek = 0x1, kVariableSpeed = 0x2, + kTextTracks = 0x3, + kAudioTracks = 0x4, + kAudioAdvance = 0x5, }; } // namespace MediaPlayback @@ -3909,8 +4609,8 @@ namespace LowPower {} // namespace LowPower namespace KeypadInput { -// Enum for CecKeyCode -enum class CecKeyCode : uint8_t +// Enum for CECKeyCodeEnum +enum class CECKeyCodeEnum : uint8_t { kSelect = 0x00, kUp = 0x01, @@ -4029,6 +4729,34 @@ enum class Feature : uint32_t namespace ContentLauncher { +// Enum for CharacteristicEnum +enum class CharacteristicEnum : uint8_t +{ + kForcedSubtitles = 0x00, + kDescribesVideo = 0x01, + kEasyToRead = 0x02, + kFrameBased = 0x03, + kMainProgram = 0x04, + kOriginalContent = 0x05, + kVoiceOverTranslation = 0x06, + kCaption = 0x07, + kSubtitle = 0x08, + kAlternate = 0x09, + kSupplementary = 0x0A, + kCommentary = 0x0B, + kDubbedTranslation = 0x0C, + kDescription = 0x0D, + kMetadata = 0x0E, + kEnhancedAudioIntelligibility = 0x0F, + kEmergency = 0x10, + kKaraoke = 0x11, + // 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 = 18, +}; + // Enum for MetricTypeEnum enum class MetricTypeEnum : uint8_t { @@ -4058,24 +4786,29 @@ enum class ParameterEnum : uint8_t kSportsTeam = 0x0B, kType = 0x0C, kVideo = 0x0D, + kSeason = 0x0E, + kEpisode = 0x0F, + kAny = 0x10, // 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 = 14, + kUnknownEnumValue = 17, }; // Enum for StatusEnum enum class StatusEnum : uint8_t { - kSuccess = 0x00, - kURLNotAvailable = 0x01, - kAuthFailed = 0x02, + kSuccess = 0x00, + kURLNotAvailable = 0x01, + kAuthFailed = 0x02, + kTextTrackNotAvailable = 0x03, + kAudioTrackNotAvailable = 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 // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 5, }; // Bitmap for Feature @@ -4083,13 +4816,17 @@ enum class Feature : uint32_t { kContentSearch = 0x1, kURLPlayback = 0x2, + kAdvancedSeek = 0x3, + kTextTracks = 0x4, + kAudioTracks = 0x5, }; // Bitmap for SupportedProtocolsBitmap enum class SupportedProtocolsBitmap : uint32_t { - kDash = 0x1, - kHls = 0x2, + kDash = 0x1, + kHls = 0x2, + kWebRTC = 0x2, }; } // namespace ContentLauncher @@ -4159,6 +4896,34 @@ enum class ApplicationStatusEnum : uint8_t namespace AccountLogin {} // namespace AccountLogin +namespace ContentControl { + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kScreenTime = 0x1, + kPINManagement = 0x2, + kBlockUnrated = 0x3, + kOnDemandContentRating = 0x4, + kScheduledContentRating = 0x5, +}; +} // namespace ContentControl + +namespace ContentAppObserver { + +// Enum for StatusEnum +enum class StatusEnum : uint8_t +{ + kSuccess = 0x00, + kUnexpectedData = 0x01, + // 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 = 2, +}; +} // namespace ContentAppObserver + namespace ElectricalMeasurement {} // namespace ElectricalMeasurement namespace UnitTesting { 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 afb50e913a4757..4ec4eb107d019c 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 @@ -924,6 +924,93 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ExtensionFieldSet + +namespace SceneInfoStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +{ + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + encoder.Encode(to_underlying(Fields::kSceneCount), sceneCount); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentScene), currentScene); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentGroup), currentGroup); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kSceneValid), sceneValid); + } + encoder.Encode(to_underlying(Fields::kRemainingCapacity), remainingCapacity); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + + 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::kSceneCount)) + { + err = DataModel::Decode(reader, sceneCount); + } + else if (__context_tag == to_underlying(Fields::kCurrentScene)) + { + err = DataModel::Decode(reader, currentScene); + } + else if (__context_tag == to_underlying(Fields::kCurrentGroup)) + { + err = DataModel::Decode(reader, currentGroup); + } + else if (__context_tag == to_underlying(Fields::kSceneValid)) + { + err = DataModel::Decode(reader, sceneValid); + } + else if (__context_tag == to_underlying(Fields::kRemainingCapacity)) + { + err = DataModel::Decode(reader, remainingCapacity); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace SceneInfoStruct } // namespace Structs namespace Commands { @@ -1804,8 +1891,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, lastConfiguredBy); case Attributes::SceneTableSize::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, sceneTableSize); - case Attributes::RemainingCapacity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, remainingCapacity); + case Attributes::FabricSceneInfo::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fabricSceneInfo); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -4099,6 +4186,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, capabilityMinima); case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, productAppearance); + case Attributes::SpecificationVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, specificationVersion); + case Attributes::MaxPathsPerInvoke::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPathsPerInvoke); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -6594,8 +6685,8 @@ namespace TimeSnapshotResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSystemTimeUs), systemTimeUs); - encoder.Encode(to_underlying(Fields::kUTCTimeUs), UTCTimeUs); + encoder.Encode(to_underlying(Fields::kSystemTimeMs), systemTimeMs); + encoder.Encode(to_underlying(Fields::kPosixTimeMs), posixTimeMs); return encoder.Finalize(); } @@ -6613,13 +6704,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::kSystemTimeUs)) + if (__context_tag == to_underlying(Fields::kSystemTimeMs)) { - err = DataModel::Decode(reader, systemTimeUs); + err = DataModel::Decode(reader, systemTimeMs); } - else if (__context_tag == to_underlying(Fields::kUTCTimeUs)) + else if (__context_tag == to_underlying(Fields::kPosixTimeMs)) { - err = DataModel::Decode(reader, UTCTimeUs); + err = DataModel::Decode(reader, posixTimeMs); } else { @@ -10588,6 +10679,40 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace StayActiveRequest. +namespace StayActiveResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPromisedActiveDuration), promisedActiveDuration); + 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::kPromisedActiveDuration)) + { + err = DataModel::Decode(reader, promisedActiveDuration); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StayActiveResponse. } // namespace Commands namespace Attributes { @@ -10632,7 +10757,166 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { + +namespace Commands { +namespace SetTimer { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewTime), newTime); + 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::kNewTime)) + { + err = DataModel::Decode(reader, newTime); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetTimer. +namespace ResetTimer { +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 ResetTimer. +namespace AddTime { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAdditionalTime), additionalTime); + 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::kAdditionalTime)) + { + err = DataModel::Decode(reader, additionalTime); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace AddTime. +namespace ReduceTime { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeReduction), timeReduction); + 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::kTimeReduction)) + { + err = DataModel::Decode(reader, timeReduction); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ReduceTime. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SetTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setTime); + case Attributes::TimeRemaining::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeRemaining); + case Attributes::TimerState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timerState); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Timer +namespace OvenCavityOperationalState { namespace Structs {} // namespace Structs namespace Commands { @@ -10870,16 +11154,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace OperationCompletion. } // namespace Events -} // namespace OvenOperationalState -namespace ModeSelect { -namespace Structs { +} // namespace OvenCavityOperationalState +namespace OvenMode { +namespace Structs {} // namespace Structs -namespace SemanticTagStruct { +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); - encoder.Encode(to_underlying(Fields::kValue), value); + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -10897,13 +11181,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::kMfgCode)) - { - err = DataModel::Decode(reader, mfgCode); - } - else if (__context_tag == to_underlying(Fields::kValue)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - err = DataModel::Decode(reader, value); + err = DataModel::Decode(reader, newMode); } else { @@ -10912,10 +11192,161 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace SemanticTagStruct - -namespace ModeOptionStruct { +} // namespace ChangeToMode. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); + 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::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OvenMode +namespace LaundryDryerControls { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SupportedDrynessLevels::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedDrynessLevels); + case Attributes::SelectedDrynessLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedDrynessLevel); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace LaundryDryerControls +namespace ModeSelect { +namespace Structs { + +namespace SemanticTagStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); + encoder.Encode(to_underlying(Fields::kValue), value); + 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::kMfgCode)) + { + err = DataModel::Decode(reader, mfgCode); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace SemanticTagStruct + +namespace ModeOptionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -13218,15 +13649,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace ActivatedCarbonFilterMonitoring -namespace DoorLock { -namespace Structs { +namespace BooleanStateConfiguration { -namespace CredentialStruct { +namespace Commands { +namespace SuppressAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCredentialType), credentialType); - encoder.Encode(to_underlying(Fields::kCredentialIndex), credentialIndex); + encoder.Encode(to_underlying(Fields::kAlarmsToSuppress), alarmsToSuppress); return encoder.Finalize(); } @@ -13244,13 +13674,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::kCredentialType)) - { - err = DataModel::Decode(reader, credentialType); - } - else if (__context_tag == to_underlying(Fields::kCredentialIndex)) + if (__context_tag == to_underlying(Fields::kAlarmsToSuppress)) { - err = DataModel::Decode(reader, credentialIndex); + err = DataModel::Decode(reader, alarmsToSuppress); } else { @@ -13259,16 +13685,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace CredentialStruct -} // namespace Structs - -namespace Commands { -namespace LockDoor { +} // namespace SuppressAlarm. +namespace EnableDisableAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPINCode), PINCode); + encoder.Encode(to_underlying(Fields::kAlarmsToEnableDisable), alarmsToEnableDisable); return encoder.Finalize(); } @@ -13286,9 +13708,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::kPINCode)) + if (__context_tag == to_underlying(Fields::kAlarmsToEnableDisable)) { - err = DataModel::Decode(reader, PINCode); + err = DataModel::Decode(reader, alarmsToEnableDisable); } else { @@ -13297,13 +13719,57 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LockDoor. -namespace UnlockDoor { +} // namespace EnableDisableAlarm. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::CurrentSensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentSensitivityLevel); + case Attributes::SupportedSensitivityLevels::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedSensitivityLevels); + case Attributes::DefaultSensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultSensitivityLevel); + case Attributes::AlarmsActive::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsActive); + case Attributes::AlarmsSuppressed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsSuppressed); + case Attributes::AlarmsEnabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsEnabled); + case Attributes::AlarmsSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsSupported); + case Attributes::SensorFault::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sensorFault); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace AlarmsStateChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPINCode), PINCode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmsActive), alarmsActive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmsSuppressed), alarmsSuppressed)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13320,9 +13786,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::kPINCode)) + if (__context_tag == to_underlying(Fields::kAlarmsActive)) { - err = DataModel::Decode(reader, PINCode); + err = DataModel::Decode(reader, alarmsActive); + } + else if (__context_tag == to_underlying(Fields::kAlarmsSuppressed)) + { + err = DataModel::Decode(reader, alarmsSuppressed); } else { @@ -13331,14 +13801,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UnlockDoor. -namespace UnlockWithTimeout { +} // namespace AlarmsStateChanged. +namespace SensorFault { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTimeout), timeout); - encoder.Encode(to_underlying(Fields::kPINCode), PINCode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSensorFault), sensorFault)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13355,13 +13825,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::kTimeout)) - { - err = DataModel::Decode(reader, timeout); - } - else if (__context_tag == to_underlying(Fields::kPINCode)) + if (__context_tag == to_underlying(Fields::kSensorFault)) { - err = DataModel::Decode(reader, PINCode); + err = DataModel::Decode(reader, sensorFault); } else { @@ -13370,18 +13836,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UnlockWithTimeout. -namespace SetWeekDaySchedule { +} // namespace SensorFault. +} // namespace Events + +} // namespace BooleanStateConfiguration +namespace ValveConfigurationAndControl { + +namespace Commands { +namespace Open { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kDaysMask), daysMask); - encoder.Encode(to_underlying(Fields::kStartHour), startHour); - encoder.Encode(to_underlying(Fields::kStartMinute), startMinute); - encoder.Encode(to_underlying(Fields::kEndHour), endHour); - encoder.Encode(to_underlying(Fields::kEndMinute), endMinute); + encoder.Encode(to_underlying(Fields::kOpenDuration), openDuration); + encoder.Encode(to_underlying(Fields::kTargetLevel), targetLevel); return encoder.Finalize(); } @@ -13399,48 +13866,26 @@ 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::kWeekDayIndex)) - { - err = DataModel::Decode(reader, weekDayIndex); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kDaysMask)) - { - err = DataModel::Decode(reader, daysMask); - } - else if (__context_tag == to_underlying(Fields::kStartHour)) - { - err = DataModel::Decode(reader, startHour); - } - else if (__context_tag == to_underlying(Fields::kStartMinute)) + if (__context_tag == to_underlying(Fields::kOpenDuration)) { - err = DataModel::Decode(reader, startMinute); + err = DataModel::Decode(reader, openDuration); } - else if (__context_tag == to_underlying(Fields::kEndHour)) + else if (__context_tag == to_underlying(Fields::kTargetLevel)) { - err = DataModel::Decode(reader, endHour); + err = DataModel::Decode(reader, targetLevel); } - else if (__context_tag == to_underlying(Fields::kEndMinute)) - { - err = DataModel::Decode(reader, endMinute); - } - else + else { } ReturnErrorOnFailure(err); } } -} // namespace SetWeekDaySchedule. -namespace GetWeekDaySchedule { +} // namespace Open. +namespace Close { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -13454,39 +13899,63 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace Close. +} // namespace Commands - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kWeekDayIndex)) - { - err = DataModel::Decode(reader, weekDayIndex); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else - { - } - - ReturnErrorOnFailure(err); +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::OpenDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, openDuration); + case Attributes::DefaultOpenDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultOpenDuration); + case Attributes::AutoCloseTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, autoCloseTime); + case Attributes::RemainingDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remainingDuration); + case Attributes::CurrentState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentState); + case Attributes::TargetState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetState); + case Attributes::CurrentLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentLevel); + case Attributes::TargetLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetLevel); + case Attributes::DefaultOpenLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultOpenLevel); + case Attributes::ValveFault::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, valveFault); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace GetWeekDaySchedule. -namespace GetWeekDayScheduleResponse { +} // namespace Attributes + +namespace Events { +namespace ValveStateChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kDaysMask), daysMask); - encoder.Encode(to_underlying(Fields::kStartHour), startHour); - encoder.Encode(to_underlying(Fields::kStartMinute), startMinute); - encoder.Encode(to_underlying(Fields::kEndHour), endHour); - encoder.Encode(to_underlying(Fields::kEndMinute), endMinute); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValveState), valveState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValveLevel), valveLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13503,37 +13972,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::kWeekDayIndex)) - { - err = DataModel::Decode(reader, weekDayIndex); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kDaysMask)) + if (__context_tag == to_underlying(Fields::kValveState)) { - err = DataModel::Decode(reader, daysMask); - } - else if (__context_tag == to_underlying(Fields::kStartHour)) - { - err = DataModel::Decode(reader, startHour); - } - else if (__context_tag == to_underlying(Fields::kStartMinute)) - { - err = DataModel::Decode(reader, startMinute); - } - else if (__context_tag == to_underlying(Fields::kEndHour)) - { - err = DataModel::Decode(reader, endHour); + err = DataModel::Decode(reader, valveState); } - else if (__context_tag == to_underlying(Fields::kEndMinute)) + else if (__context_tag == to_underlying(Fields::kValveLevel)) { - err = DataModel::Decode(reader, endMinute); + err = DataModel::Decode(reader, valveLevel); } else { @@ -13542,14 +13987,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetWeekDayScheduleResponse. -namespace ClearWeekDaySchedule { +} // namespace ValveStateChanged. +namespace ValveFault { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValveFault), valveFault)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13566,13 +14011,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::kWeekDayIndex)) - { - err = DataModel::Decode(reader, weekDayIndex); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + if (__context_tag == to_underlying(Fields::kValveFault)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, valveFault); } else { @@ -13581,15 +14022,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ClearWeekDaySchedule. -namespace SetYearDaySchedule { +} // namespace ValveFault. +} // namespace Events + +} // namespace ValveConfigurationAndControl +namespace ElectricalEnergyMeasurement { +namespace Structs { + +namespace MeasurementAccuracyRangeStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); - encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); + encoder.Encode(to_underlying(Fields::kRangeMin), rangeMin); + encoder.Encode(to_underlying(Fields::kRangeMax), rangeMax); + encoder.Encode(to_underlying(Fields::kPercentMax), percentMax); + encoder.Encode(to_underlying(Fields::kPercentMin), percentMin); + encoder.Encode(to_underlying(Fields::kPercentTypical), percentTypical); + encoder.Encode(to_underlying(Fields::kFixedMax), fixedMax); + encoder.Encode(to_underlying(Fields::kFixedMin), fixedMin); + encoder.Encode(to_underlying(Fields::kFixedTypical), fixedTypical); return encoder.Finalize(); } @@ -13607,21 +14058,37 @@ 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::kYearDayIndex)) + if (__context_tag == to_underlying(Fields::kRangeMin)) { - err = DataModel::Decode(reader, yearDayIndex); + err = DataModel::Decode(reader, rangeMin); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kRangeMax)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, rangeMax); } - else if (__context_tag == to_underlying(Fields::kLocalStartTime)) + else if (__context_tag == to_underlying(Fields::kPercentMax)) { - err = DataModel::Decode(reader, localStartTime); + err = DataModel::Decode(reader, percentMax); } - else if (__context_tag == to_underlying(Fields::kLocalEndTime)) + else if (__context_tag == to_underlying(Fields::kPercentMin)) { - err = DataModel::Decode(reader, localEndTime); + err = DataModel::Decode(reader, percentMin); + } + else if (__context_tag == to_underlying(Fields::kPercentTypical)) + { + err = DataModel::Decode(reader, percentTypical); + } + else if (__context_tag == to_underlying(Fields::kFixedMax)) + { + err = DataModel::Decode(reader, fixedMax); + } + else if (__context_tag == to_underlying(Fields::kFixedMin)) + { + err = DataModel::Decode(reader, fixedMin); + } + else if (__context_tag == to_underlying(Fields::kFixedTypical)) + { + err = DataModel::Decode(reader, fixedTypical); } else { @@ -13630,13 +14097,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetYearDaySchedule. -namespace GetYearDaySchedule { + +} // namespace MeasurementAccuracyRangeStruct + +namespace MeasurementAccuracyStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kMeasurementType), measurementType); + encoder.Encode(to_underlying(Fields::kMeasured), measured); + encoder.Encode(to_underlying(Fields::kMinMeasuredValue), minMeasuredValue); + encoder.Encode(to_underlying(Fields::kMaxMeasuredValue), maxMeasuredValue); + encoder.Encode(to_underlying(Fields::kAccuracyRanges), accuracyRanges); return encoder.Finalize(); } @@ -13654,13 +14126,25 @@ 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::kYearDayIndex)) + if (__context_tag == to_underlying(Fields::kMeasurementType)) { - err = DataModel::Decode(reader, yearDayIndex); + err = DataModel::Decode(reader, measurementType); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kMeasured)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, measured); + } + else if (__context_tag == to_underlying(Fields::kMinMeasuredValue)) + { + err = DataModel::Decode(reader, minMeasuredValue); + } + else if (__context_tag == to_underlying(Fields::kMaxMeasuredValue)) + { + err = DataModel::Decode(reader, maxMeasuredValue); + } + else if (__context_tag == to_underlying(Fields::kAccuracyRanges)) + { + err = DataModel::Decode(reader, accuracyRanges); } else { @@ -13669,16 +14153,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetYearDaySchedule. -namespace GetYearDayScheduleResponse { + +} // namespace MeasurementAccuracyStruct + +namespace EnergyMeasurementStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); - encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); + encoder.Encode(to_underlying(Fields::kEnergy), energy); + encoder.Encode(to_underlying(Fields::kStartTimestamp), startTimestamp); + encoder.Encode(to_underlying(Fields::kEndTimestamp), endTimestamp); + encoder.Encode(to_underlying(Fields::kStartSystime), startSystime); + encoder.Encode(to_underlying(Fields::kEndSystime), endSystime); return encoder.Finalize(); } @@ -13696,25 +14182,25 @@ 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::kYearDayIndex)) + if (__context_tag == to_underlying(Fields::kEnergy)) { - err = DataModel::Decode(reader, yearDayIndex); + err = DataModel::Decode(reader, energy); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kStartTimestamp)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, startTimestamp); } - else if (__context_tag == to_underlying(Fields::kStatus)) + else if (__context_tag == to_underlying(Fields::kEndTimestamp)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, endTimestamp); } - else if (__context_tag == to_underlying(Fields::kLocalStartTime)) + else if (__context_tag == to_underlying(Fields::kStartSystime)) { - err = DataModel::Decode(reader, localStartTime); + err = DataModel::Decode(reader, startSystime); } - else if (__context_tag == to_underlying(Fields::kLocalEndTime)) + else if (__context_tag == to_underlying(Fields::kEndSystime)) { - err = DataModel::Decode(reader, localEndTime); + err = DataModel::Decode(reader, endSystime); } else { @@ -13723,14 +14209,54 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetYearDayScheduleResponse. -namespace ClearYearDaySchedule { + +} // namespace EnergyMeasurementStruct +} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Accuracy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, accuracy); + case Attributes::CumulativeEnergyImported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, cumulativeEnergyImported); + case Attributes::CumulativeEnergyExported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, cumulativeEnergyExported); + case Attributes::PeriodicEnergyImported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, periodicEnergyImported); + case Attributes::PeriodicEnergyExported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, periodicEnergyExported); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace CumulativeEnergyMeasured { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyImported), energyImported)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyExported), energyExported)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13747,13 +14273,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::kYearDayIndex)) + if (__context_tag == to_underlying(Fields::kEnergyImported)) { - err = DataModel::Decode(reader, yearDayIndex); + err = DataModel::Decode(reader, energyImported); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kEnergyExported)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, energyExported); } else { @@ -13762,16 +14288,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ClearYearDaySchedule. -namespace SetHolidaySchedule { +} // namespace CumulativeEnergyMeasured. +namespace PeriodicEnergyMeasured { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); - encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); - encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); - encoder.Encode(to_underlying(Fields::kOperatingMode), operatingMode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyImported), energyImported)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyExported), energyExported)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13788,21 +14313,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::kHolidayIndex)) - { - err = DataModel::Decode(reader, holidayIndex); - } - else if (__context_tag == to_underlying(Fields::kLocalStartTime)) - { - err = DataModel::Decode(reader, localStartTime); - } - else if (__context_tag == to_underlying(Fields::kLocalEndTime)) + if (__context_tag == to_underlying(Fields::kEnergyImported)) { - err = DataModel::Decode(reader, localEndTime); + err = DataModel::Decode(reader, energyImported); } - else if (__context_tag == to_underlying(Fields::kOperatingMode)) + else if (__context_tag == to_underlying(Fields::kEnergyExported)) { - err = DataModel::Decode(reader, operatingMode); + err = DataModel::Decode(reader, energyExported); } else { @@ -13811,12 +14328,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetHolidaySchedule. -namespace GetHolidaySchedule { +} // namespace PeriodicEnergyMeasured. +} // namespace Events + +} // namespace ElectricalEnergyMeasurement +namespace DemandResponseLoadControl { +namespace Structs { + +namespace HeatingSourceControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); + encoder.Encode(to_underlying(Fields::kHeatingSource), heatingSource); return encoder.Finalize(); } @@ -13834,9 +14357,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::kHolidayIndex)) + if (__context_tag == to_underlying(Fields::kHeatingSource)) { - err = DataModel::Decode(reader, holidayIndex); + err = DataModel::Decode(reader, heatingSource); } else { @@ -13845,16 +14368,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetHolidaySchedule. -namespace GetHolidayScheduleResponse { + +} // namespace HeatingSourceControlStruct + +namespace PowerSavingsControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); - encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); - encoder.Encode(to_underlying(Fields::kOperatingMode), operatingMode); + encoder.Encode(to_underlying(Fields::kPowerSavings), powerSavings); return encoder.Finalize(); } @@ -13872,25 +14393,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::kHolidayIndex)) + if (__context_tag == to_underlying(Fields::kPowerSavings)) { - err = DataModel::Decode(reader, holidayIndex); - } - else if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kLocalStartTime)) - { - err = DataModel::Decode(reader, localStartTime); - } - else if (__context_tag == to_underlying(Fields::kLocalEndTime)) - { - err = DataModel::Decode(reader, localEndTime); - } - else if (__context_tag == to_underlying(Fields::kOperatingMode)) - { - err = DataModel::Decode(reader, operatingMode); + err = DataModel::Decode(reader, powerSavings); } else { @@ -13899,12 +14404,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetHolidayScheduleResponse. -namespace ClearHolidaySchedule { + +} // namespace PowerSavingsControlStruct + +namespace DutyCycleControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); + encoder.Encode(to_underlying(Fields::kDutyCycle), dutyCycle); return encoder.Finalize(); } @@ -13922,9 +14429,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::kHolidayIndex)) + if (__context_tag == to_underlying(Fields::kDutyCycle)) { - err = DataModel::Decode(reader, holidayIndex); + err = DataModel::Decode(reader, dutyCycle); } else { @@ -13933,18 +14440,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ClearHolidaySchedule. -namespace SetUser { + +} // namespace DutyCycleControlStruct + +namespace AverageLoadControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOperationType), operationType); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kUserName), userName); - encoder.Encode(to_underlying(Fields::kUserUniqueID), userUniqueID); - encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); - encoder.Encode(to_underlying(Fields::kUserType), userType); - encoder.Encode(to_underlying(Fields::kCredentialRule), credentialRule); + encoder.Encode(to_underlying(Fields::kLoadAdjustment), loadAdjustment); return encoder.Finalize(); } @@ -13962,33 +14465,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::kOperationType)) - { - err = DataModel::Decode(reader, operationType); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kUserName)) - { - err = DataModel::Decode(reader, userName); - } - else if (__context_tag == to_underlying(Fields::kUserUniqueID)) - { - err = DataModel::Decode(reader, userUniqueID); - } - else if (__context_tag == to_underlying(Fields::kUserStatus)) - { - err = DataModel::Decode(reader, userStatus); - } - else if (__context_tag == to_underlying(Fields::kUserType)) - { - err = DataModel::Decode(reader, userType); - } - else if (__context_tag == to_underlying(Fields::kCredentialRule)) + if (__context_tag == to_underlying(Fields::kLoadAdjustment)) { - err = DataModel::Decode(reader, credentialRule); + err = DataModel::Decode(reader, loadAdjustment); } else { @@ -13997,12 +14476,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetUser. -namespace GetUser { + +} // namespace AverageLoadControlStruct + +namespace TemperatureControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kCoolingTempOffset), coolingTempOffset); + encoder.Encode(to_underlying(Fields::kHeatingtTempOffset), heatingtTempOffset); + encoder.Encode(to_underlying(Fields::kCoolingTempSetpoint), coolingTempSetpoint); + encoder.Encode(to_underlying(Fields::kHeatingTempSetpoint), heatingTempSetpoint); return encoder.Finalize(); } @@ -14020,9 +14504,21 @@ 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::kUserIndex)) + if (__context_tag == to_underlying(Fields::kCoolingTempOffset)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, coolingTempOffset); + } + else if (__context_tag == to_underlying(Fields::kHeatingtTempOffset)) + { + err = DataModel::Decode(reader, heatingtTempOffset); + } + else if (__context_tag == to_underlying(Fields::kCoolingTempSetpoint)) + { + err = DataModel::Decode(reader, coolingTempSetpoint); + } + else if (__context_tag == to_underlying(Fields::kHeatingTempSetpoint)) + { + err = DataModel::Decode(reader, heatingTempSetpoint); } else { @@ -14031,21 +14527,20 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetUser. -namespace GetUserResponse { + +} // namespace TemperatureControlStruct + +namespace LoadControlEventTransitionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kUserName), userName); - encoder.Encode(to_underlying(Fields::kUserUniqueID), userUniqueID); - encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); - encoder.Encode(to_underlying(Fields::kUserType), userType); - encoder.Encode(to_underlying(Fields::kCredentialRule), credentialRule); - encoder.Encode(to_underlying(Fields::kCredentials), credentials); - encoder.Encode(to_underlying(Fields::kCreatorFabricIndex), creatorFabricIndex); - encoder.Encode(to_underlying(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex); - encoder.Encode(to_underlying(Fields::kNextUserIndex), nextUserIndex); + encoder.Encode(to_underlying(Fields::kDuration), duration); + encoder.Encode(to_underlying(Fields::kControl), control); + encoder.Encode(to_underlying(Fields::kTemperatureControl), temperatureControl); + encoder.Encode(to_underlying(Fields::kAverageLoadControl), averageLoadControl); + encoder.Encode(to_underlying(Fields::kDutyCycleControl), dutyCycleControl); + encoder.Encode(to_underlying(Fields::kPowerSavingsControl), powerSavingsControl); + encoder.Encode(to_underlying(Fields::kHeatingSourceControl), heatingSourceControl); return encoder.Finalize(); } @@ -14063,45 +14558,33 @@ 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::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kUserName)) - { - err = DataModel::Decode(reader, userName); - } - else if (__context_tag == to_underlying(Fields::kUserUniqueID)) - { - err = DataModel::Decode(reader, userUniqueID); - } - else if (__context_tag == to_underlying(Fields::kUserStatus)) + if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, userStatus); + err = DataModel::Decode(reader, duration); } - else if (__context_tag == to_underlying(Fields::kUserType)) + else if (__context_tag == to_underlying(Fields::kControl)) { - err = DataModel::Decode(reader, userType); + err = DataModel::Decode(reader, control); } - else if (__context_tag == to_underlying(Fields::kCredentialRule)) + else if (__context_tag == to_underlying(Fields::kTemperatureControl)) { - err = DataModel::Decode(reader, credentialRule); + err = DataModel::Decode(reader, temperatureControl); } - else if (__context_tag == to_underlying(Fields::kCredentials)) + else if (__context_tag == to_underlying(Fields::kAverageLoadControl)) { - err = DataModel::Decode(reader, credentials); + err = DataModel::Decode(reader, averageLoadControl); } - else if (__context_tag == to_underlying(Fields::kCreatorFabricIndex)) + else if (__context_tag == to_underlying(Fields::kDutyCycleControl)) { - err = DataModel::Decode(reader, creatorFabricIndex); + err = DataModel::Decode(reader, dutyCycleControl); } - else if (__context_tag == to_underlying(Fields::kLastModifiedFabricIndex)) + else if (__context_tag == to_underlying(Fields::kPowerSavingsControl)) { - err = DataModel::Decode(reader, lastModifiedFabricIndex); + err = DataModel::Decode(reader, powerSavingsControl); } - else if (__context_tag == to_underlying(Fields::kNextUserIndex)) + else if (__context_tag == to_underlying(Fields::kHeatingSourceControl)) { - err = DataModel::Decode(reader, nextUserIndex); + err = DataModel::Decode(reader, heatingSourceControl); } else { @@ -14110,12 +14593,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetUserResponse. -namespace ClearUser { + +} // namespace LoadControlEventTransitionStruct + +namespace LoadControlEventStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kEventID), eventID); + encoder.Encode(to_underlying(Fields::kProgramID), programID); + encoder.Encode(to_underlying(Fields::kControl), control); + encoder.Encode(to_underlying(Fields::kDeviceClass), deviceClass); + encoder.Encode(to_underlying(Fields::kEnrollmentGroup), enrollmentGroup); + encoder.Encode(to_underlying(Fields::kCriticality), criticality); + encoder.Encode(to_underlying(Fields::kStartTime), startTime); + encoder.Encode(to_underlying(Fields::kTransitions), transitions); return encoder.Finalize(); } @@ -14133,9 +14625,37 @@ 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::kUserIndex)) + if (__context_tag == to_underlying(Fields::kEventID)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, eventID); + } + else if (__context_tag == to_underlying(Fields::kProgramID)) + { + err = DataModel::Decode(reader, programID); + } + else if (__context_tag == to_underlying(Fields::kControl)) + { + err = DataModel::Decode(reader, control); + } + else if (__context_tag == to_underlying(Fields::kDeviceClass)) + { + err = DataModel::Decode(reader, deviceClass); + } + else if (__context_tag == to_underlying(Fields::kEnrollmentGroup)) + { + err = DataModel::Decode(reader, enrollmentGroup); + } + else if (__context_tag == to_underlying(Fields::kCriticality)) + { + err = DataModel::Decode(reader, criticality); + } + else if (__context_tag == to_underlying(Fields::kStartTime)) + { + err = DataModel::Decode(reader, startTime); + } + else if (__context_tag == to_underlying(Fields::kTransitions)) + { + err = DataModel::Decode(reader, transitions); } else { @@ -14144,17 +14664,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ClearUser. -namespace SetCredential { + +} // namespace LoadControlEventStruct + +namespace LoadControlProgramStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOperationType), operationType); - encoder.Encode(to_underlying(Fields::kCredential), credential); - encoder.Encode(to_underlying(Fields::kCredentialData), credentialData); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); - encoder.Encode(to_underlying(Fields::kUserType), userType); + encoder.Encode(to_underlying(Fields::kProgramID), programID); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kEnrollmentGroup), enrollmentGroup); + encoder.Encode(to_underlying(Fields::kRandomStartMinutes), randomStartMinutes); + encoder.Encode(to_underlying(Fields::kRandomDurationMinutes), randomDurationMinutes); return encoder.Finalize(); } @@ -14172,29 +14693,25 @@ 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::kOperationType)) - { - err = DataModel::Decode(reader, operationType); - } - else if (__context_tag == to_underlying(Fields::kCredential)) + if (__context_tag == to_underlying(Fields::kProgramID)) { - err = DataModel::Decode(reader, credential); + err = DataModel::Decode(reader, programID); } - else if (__context_tag == to_underlying(Fields::kCredentialData)) + else if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, credentialData); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kEnrollmentGroup)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, enrollmentGroup); } - else if (__context_tag == to_underlying(Fields::kUserStatus)) + else if (__context_tag == to_underlying(Fields::kRandomStartMinutes)) { - err = DataModel::Decode(reader, userStatus); + err = DataModel::Decode(reader, randomStartMinutes); } - else if (__context_tag == to_underlying(Fields::kUserType)) + else if (__context_tag == to_underlying(Fields::kRandomDurationMinutes)) { - err = DataModel::Decode(reader, userType); + err = DataModel::Decode(reader, randomDurationMinutes); } else { @@ -14203,14 +14720,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetCredential. -namespace SetCredentialResponse { + +} // namespace LoadControlProgramStruct +} // namespace Structs + +namespace Commands { +namespace RegisterLoadControlProgramRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kNextCredentialIndex), nextCredentialIndex); + encoder.Encode(to_underlying(Fields::kLoadControlProgram), loadControlProgram); return encoder.Finalize(); } @@ -14228,17 +14747,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::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kNextCredentialIndex)) + if (__context_tag == to_underlying(Fields::kLoadControlProgram)) { - err = DataModel::Decode(reader, nextCredentialIndex); + err = DataModel::Decode(reader, loadControlProgram); } else { @@ -14247,12 +14758,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetCredentialResponse. -namespace GetCredentialStatus { +} // namespace RegisterLoadControlProgramRequest. +namespace UnregisterLoadControlProgramRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCredential), credential); + encoder.Encode(to_underlying(Fields::kLoadControlProgramID), loadControlProgramID); return encoder.Finalize(); } @@ -14270,9 +14781,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::kCredential)) + if (__context_tag == to_underlying(Fields::kLoadControlProgramID)) { - err = DataModel::Decode(reader, credential); + err = DataModel::Decode(reader, loadControlProgramID); } else { @@ -14281,16 +14792,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetCredentialStatus. -namespace GetCredentialStatusResponse { +} // namespace UnregisterLoadControlProgramRequest. +namespace AddLoadControlEventRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCredentialExists), credentialExists); - encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); - encoder.Encode(to_underlying(Fields::kCreatorFabricIndex), creatorFabricIndex); - encoder.Encode(to_underlying(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex); - encoder.Encode(to_underlying(Fields::kNextCredentialIndex), nextCredentialIndex); + encoder.Encode(to_underlying(Fields::kEvent), event); return encoder.Finalize(); } @@ -14308,25 +14815,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::kCredentialExists)) - { - err = DataModel::Decode(reader, credentialExists); - } - else if (__context_tag == to_underlying(Fields::kUserIndex)) - { - err = DataModel::Decode(reader, userIndex); - } - else if (__context_tag == to_underlying(Fields::kCreatorFabricIndex)) - { - err = DataModel::Decode(reader, creatorFabricIndex); - } - else if (__context_tag == to_underlying(Fields::kLastModifiedFabricIndex)) - { - err = DataModel::Decode(reader, lastModifiedFabricIndex); - } - else if (__context_tag == to_underlying(Fields::kNextCredentialIndex)) + if (__context_tag == to_underlying(Fields::kEvent)) { - err = DataModel::Decode(reader, nextCredentialIndex); + err = DataModel::Decode(reader, event); } else { @@ -14335,12 +14826,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetCredentialStatusResponse. -namespace ClearCredential { +} // namespace AddLoadControlEventRequest. +namespace RemoveLoadControlEventRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCredential), credential); + encoder.Encode(to_underlying(Fields::kEventID), eventID); + encoder.Encode(to_underlying(Fields::kCancelControl), cancelControl); return encoder.Finalize(); } @@ -14358,9 +14850,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::kCredential)) + if (__context_tag == to_underlying(Fields::kEventID)) { - err = DataModel::Decode(reader, credential); + err = DataModel::Decode(reader, eventID); + } + else if (__context_tag == to_underlying(Fields::kCancelControl)) + { + err = DataModel::Decode(reader, cancelControl); } else { @@ -14369,12 +14865,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ClearCredential. -namespace UnboltDoor { +} // namespace RemoveLoadControlEventRequest. +namespace ClearLoadControlEventsRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -14388,22 +14883,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kPINCode)) - { - err = DataModel::Decode(reader, PINCode); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace UnboltDoor. +} // namespace ClearLoadControlEventsRequest. } // namespace Commands namespace Attributes { @@ -14411,78 +14893,22 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::LockState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lockState); - case Attributes::LockType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lockType); - case Attributes::ActuatorEnabled::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, actuatorEnabled); - case Attributes::DoorState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, doorState); - case Attributes::DoorOpenEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, doorOpenEvents); - case Attributes::DoorClosedEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, doorClosedEvents); - case Attributes::OpenPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, openPeriod); - case Attributes::NumberOfTotalUsersSupported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfTotalUsersSupported); - case Attributes::NumberOfPINUsersSupported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfPINUsersSupported); - case Attributes::NumberOfRFIDUsersSupported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfRFIDUsersSupported); - case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfWeekDaySchedulesSupportedPerUser); - case Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfYearDaySchedulesSupportedPerUser); - case Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfHolidaySchedulesSupported); - case Attributes::MaxPINCodeLength::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxPINCodeLength); - case Attributes::MinPINCodeLength::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minPINCodeLength); - case Attributes::MaxRFIDCodeLength::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxRFIDCodeLength); - case Attributes::MinRFIDCodeLength::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minRFIDCodeLength); - case Attributes::CredentialRulesSupport::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, credentialRulesSupport); - case Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfCredentialsSupportedPerUser); - case Attributes::Language::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, language); - case Attributes::LEDSettings::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, LEDSettings); - case Attributes::AutoRelockTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, autoRelockTime); - case Attributes::SoundVolume::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, soundVolume); - case Attributes::OperatingMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operatingMode); - case Attributes::SupportedOperatingModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedOperatingModes); - case Attributes::DefaultConfigurationRegister::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, defaultConfigurationRegister); - case Attributes::EnableLocalProgramming::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enableLocalProgramming); - case Attributes::EnableOneTouchLocking::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enableOneTouchLocking); - case Attributes::EnableInsideStatusLED::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enableInsideStatusLED); - case Attributes::EnablePrivacyModeButton::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enablePrivacyModeButton); - case Attributes::LocalProgrammingFeatures::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, localProgrammingFeatures); - case Attributes::WrongCodeEntryLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wrongCodeEntryLimit); - case Attributes::UserCodeTemporaryDisableTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, userCodeTemporaryDisableTime); - case Attributes::SendPINOverTheAir::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sendPINOverTheAir); - case Attributes::RequirePINforRemoteOperation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, requirePINforRemoteOperation); - case Attributes::ExpiringUserTimeout::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, expiringUserTimeout); + case Attributes::LoadControlPrograms::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, loadControlPrograms); + case Attributes::NumberOfLoadControlPrograms::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfLoadControlPrograms); + case Attributes::Events::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, events); + case Attributes::ActiveEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeEvents); + case Attributes::NumberOfEventsPerProgram::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfEventsPerProgram); + case Attributes::NumberOfTransitions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfTransitions); + case Attributes::DefaultRandomStart::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultRandomStart); + case Attributes::DefaultRandomDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultRandomDuration); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -14502,12 +14928,21 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace DoorLockAlarm { +namespace LoadControlEventStatusChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmCode), alarmCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEventID), eventID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionIndex), transitionIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCriticality), criticality)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kControl), control)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTemperatureControl), temperatureControl)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAverageLoadControl), averageLoadControl)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDutyCycleControl), dutyCycleControl)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPowerSavingsControl), powerSavingsControl)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHeatingSourceControl), heatingSourceControl)); return aWriter.EndContainer(outer); } @@ -14525,9 +14960,45 @@ 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::kAlarmCode)) + if (__context_tag == to_underlying(Fields::kEventID)) { - err = DataModel::Decode(reader, alarmCode); + err = DataModel::Decode(reader, eventID); + } + else if (__context_tag == to_underlying(Fields::kTransitionIndex)) + { + err = DataModel::Decode(reader, transitionIndex); + } + else if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kCriticality)) + { + err = DataModel::Decode(reader, criticality); + } + else if (__context_tag == to_underlying(Fields::kControl)) + { + err = DataModel::Decode(reader, control); + } + else if (__context_tag == to_underlying(Fields::kTemperatureControl)) + { + err = DataModel::Decode(reader, temperatureControl); + } + else if (__context_tag == to_underlying(Fields::kAverageLoadControl)) + { + err = DataModel::Decode(reader, averageLoadControl); + } + else if (__context_tag == to_underlying(Fields::kDutyCycleControl)) + { + err = DataModel::Decode(reader, dutyCycleControl); + } + else if (__context_tag == to_underlying(Fields::kPowerSavingsControl)) + { + err = DataModel::Decode(reader, powerSavingsControl); + } + else if (__context_tag == to_underlying(Fields::kHeatingSourceControl)) + { + err = DataModel::Decode(reader, heatingSourceControl); } else { @@ -14536,14 +15007,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DoorLockAlarm. -namespace DoorStateChange { +} // namespace LoadControlEventStatusChange. +} // namespace Events + +} // namespace DemandResponseLoadControl +namespace DeviceEnergyManagement { +namespace Structs { + +namespace CostStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDoorState), doorState)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCostType), costType); + encoder.Encode(to_underlying(Fields::kValue), value); + encoder.Encode(to_underlying(Fields::kDecimalPoints), decimalPoints); + encoder.Encode(to_underlying(Fields::kCurrency), currency); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -14560,9 +15039,21 @@ 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::kDoorState)) + if (__context_tag == to_underlying(Fields::kCostType)) { - err = DataModel::Decode(reader, doorState); + err = DataModel::Decode(reader, costType); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); + } + else if (__context_tag == to_underlying(Fields::kDecimalPoints)) + { + err = DataModel::Decode(reader, decimalPoints); + } + else if (__context_tag == to_underlying(Fields::kCurrency)) + { + err = DataModel::Decode(reader, currency); } else { @@ -14571,19 +15062,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DoorStateChange. -namespace LockOperation { + +} // namespace CostStruct + +namespace SlotStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMinDuration), minDuration); + encoder.Encode(to_underlying(Fields::kMaxDuration), maxDuration); + encoder.Encode(to_underlying(Fields::kDefaultDuration), defaultDuration); + encoder.Encode(to_underlying(Fields::kElapsedSlotTime), elapsedSlotTime); + encoder.Encode(to_underlying(Fields::kRemainingSlotTime), remainingSlotTime); + encoder.Encode(to_underlying(Fields::kSlotIsPauseable), slotIsPauseable); + encoder.Encode(to_underlying(Fields::kMinPauseDuration), minPauseDuration); + encoder.Encode(to_underlying(Fields::kMaxPauseDuration), maxPauseDuration); + encoder.Encode(to_underlying(Fields::kManufacturerESAState), manufacturerESAState); + encoder.Encode(to_underlying(Fields::kNominalPower), nominalPower); + encoder.Encode(to_underlying(Fields::kMinPower), minPower); + encoder.Encode(to_underlying(Fields::kMaxPower), maxPower); + encoder.Encode(to_underlying(Fields::kNominalEnergy), nominalEnergy); + encoder.Encode(to_underlying(Fields::kCosts), costs); + encoder.Encode(to_underlying(Fields::kMinPowerAdjustment), minPowerAdjustment); + encoder.Encode(to_underlying(Fields::kMaxPowerAdjustment), maxPowerAdjustment); + encoder.Encode(to_underlying(Fields::kMinDurationAdjustment), minDurationAdjustment); + encoder.Encode(to_underlying(Fields::kMaxDurationAdjustment), maxDurationAdjustment); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -14600,29 +15104,77 @@ 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::kLockOperationType)) + if (__context_tag == to_underlying(Fields::kMinDuration)) { - err = DataModel::Decode(reader, lockOperationType); + err = DataModel::Decode(reader, minDuration); } - else if (__context_tag == to_underlying(Fields::kOperationSource)) + else if (__context_tag == to_underlying(Fields::kMaxDuration)) { - err = DataModel::Decode(reader, operationSource); + err = DataModel::Decode(reader, maxDuration); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kDefaultDuration)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, defaultDuration); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kElapsedSlotTime)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, elapsedSlotTime); } - else if (__context_tag == to_underlying(Fields::kSourceNode)) + else if (__context_tag == to_underlying(Fields::kRemainingSlotTime)) { - err = DataModel::Decode(reader, sourceNode); + err = DataModel::Decode(reader, remainingSlotTime); } - else if (__context_tag == to_underlying(Fields::kCredentials)) + else if (__context_tag == to_underlying(Fields::kSlotIsPauseable)) { - err = DataModel::Decode(reader, credentials); + err = DataModel::Decode(reader, slotIsPauseable); + } + else if (__context_tag == to_underlying(Fields::kMinPauseDuration)) + { + err = DataModel::Decode(reader, minPauseDuration); + } + else if (__context_tag == to_underlying(Fields::kMaxPauseDuration)) + { + err = DataModel::Decode(reader, maxPauseDuration); + } + else if (__context_tag == to_underlying(Fields::kManufacturerESAState)) + { + err = DataModel::Decode(reader, manufacturerESAState); + } + else if (__context_tag == to_underlying(Fields::kNominalPower)) + { + err = DataModel::Decode(reader, nominalPower); + } + else if (__context_tag == to_underlying(Fields::kMinPower)) + { + err = DataModel::Decode(reader, minPower); + } + else if (__context_tag == to_underlying(Fields::kMaxPower)) + { + err = DataModel::Decode(reader, maxPower); + } + else if (__context_tag == to_underlying(Fields::kNominalEnergy)) + { + err = DataModel::Decode(reader, nominalEnergy); + } + else if (__context_tag == to_underlying(Fields::kCosts)) + { + err = DataModel::Decode(reader, costs); + } + else if (__context_tag == to_underlying(Fields::kMinPowerAdjustment)) + { + err = DataModel::Decode(reader, minPowerAdjustment); + } + else if (__context_tag == to_underlying(Fields::kMaxPowerAdjustment)) + { + err = DataModel::Decode(reader, maxPowerAdjustment); + } + else if (__context_tag == to_underlying(Fields::kMinDurationAdjustment)) + { + err = DataModel::Decode(reader, minDurationAdjustment); + } + else if (__context_tag == to_underlying(Fields::kMaxDurationAdjustment)) + { + err = DataModel::Decode(reader, maxDurationAdjustment); } else { @@ -14631,20 +15183,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LockOperation. -namespace LockOperationError { + +} // namespace SlotStruct + +namespace ForecastStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationError), operationError)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kForecastId), forecastId); + encoder.Encode(to_underlying(Fields::kActiveSlotNumber), activeSlotNumber); + encoder.Encode(to_underlying(Fields::kStartTime), startTime); + encoder.Encode(to_underlying(Fields::kEndTime), endTime); + encoder.Encode(to_underlying(Fields::kEarliestStartTime), earliestStartTime); + encoder.Encode(to_underlying(Fields::kLatestEndTime), latestEndTime); + encoder.Encode(to_underlying(Fields::kIsPauseable), isPauseable); + encoder.Encode(to_underlying(Fields::kSlots), slots); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -14661,33 +15215,37 @@ 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::kLockOperationType)) + if (__context_tag == to_underlying(Fields::kForecastId)) { - err = DataModel::Decode(reader, lockOperationType); + err = DataModel::Decode(reader, forecastId); } - else if (__context_tag == to_underlying(Fields::kOperationSource)) + else if (__context_tag == to_underlying(Fields::kActiveSlotNumber)) { - err = DataModel::Decode(reader, operationSource); + err = DataModel::Decode(reader, activeSlotNumber); } - else if (__context_tag == to_underlying(Fields::kOperationError)) + else if (__context_tag == to_underlying(Fields::kStartTime)) { - err = DataModel::Decode(reader, operationError); + err = DataModel::Decode(reader, startTime); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kEndTime)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, endTime); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kEarliestStartTime)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, earliestStartTime); } - else if (__context_tag == to_underlying(Fields::kSourceNode)) + else if (__context_tag == to_underlying(Fields::kLatestEndTime)) { - err = DataModel::Decode(reader, sourceNode); + err = DataModel::Decode(reader, latestEndTime); } - else if (__context_tag == to_underlying(Fields::kCredentials)) + else if (__context_tag == to_underlying(Fields::kIsPauseable)) { - err = DataModel::Decode(reader, credentials); + err = DataModel::Decode(reader, isPauseable); + } + else if (__context_tag == to_underlying(Fields::kSlots)) + { + err = DataModel::Decode(reader, slots); } else { @@ -14696,20 +15254,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LockOperationError. -namespace LockUserChange { + +} // namespace ForecastStruct + +namespace ConstraintsStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockDataType), lockDataType)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataOperationType), dataOperationType)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataIndex), dataIndex)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStartTime), startTime); + encoder.Encode(to_underlying(Fields::kDuration), duration); + encoder.Encode(to_underlying(Fields::kNominalPower), nominalPower); + encoder.Encode(to_underlying(Fields::kMaximumEnergy), maximumEnergy); + encoder.Encode(to_underlying(Fields::kLoadControl), loadControl); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -14726,33 +15283,25 @@ 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::kLockDataType)) - { - err = DataModel::Decode(reader, lockDataType); - } - else if (__context_tag == to_underlying(Fields::kDataOperationType)) - { - err = DataModel::Decode(reader, dataOperationType); - } - else if (__context_tag == to_underlying(Fields::kOperationSource)) + if (__context_tag == to_underlying(Fields::kStartTime)) { - err = DataModel::Decode(reader, operationSource); + err = DataModel::Decode(reader, startTime); } - else if (__context_tag == to_underlying(Fields::kUserIndex)) + else if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, userIndex); + err = DataModel::Decode(reader, duration); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kNominalPower)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, nominalPower); } - else if (__context_tag == to_underlying(Fields::kSourceNode)) + else if (__context_tag == to_underlying(Fields::kMaximumEnergy)) { - err = DataModel::Decode(reader, sourceNode); + err = DataModel::Decode(reader, maximumEnergy); } - else if (__context_tag == to_underlying(Fields::kDataIndex)) + else if (__context_tag == to_underlying(Fields::kLoadControl)) { - err = DataModel::Decode(reader, dataIndex); + err = DataModel::Decode(reader, loadControl); } else { @@ -14761,17 +15310,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LockUserChange. -} // namespace Events -} // namespace DoorLock -namespace WindowCovering { +} // namespace ConstraintsStruct -namespace Commands { -namespace UpOrOpen { +namespace PowerAdjustStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMinPower), minPower); + encoder.Encode(to_underlying(Fields::kMaxPower), maxPower); + encoder.Encode(to_underlying(Fields::kMinDuration), minDuration); + encoder.Encode(to_underlying(Fields::kMaxDuration), maxDuration); return encoder.Finalize(); } @@ -14785,13 +15334,43 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kMinPower)) + { + err = DataModel::Decode(reader, minPower); + } + else if (__context_tag == to_underlying(Fields::kMaxPower)) + { + err = DataModel::Decode(reader, maxPower); + } + else if (__context_tag == to_underlying(Fields::kMinDuration)) + { + err = DataModel::Decode(reader, minDuration); + } + else if (__context_tag == to_underlying(Fields::kMaxDuration)) + { + err = DataModel::Decode(reader, maxDuration); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace UpOrOpen. -namespace DownOrClose { + +} // namespace PowerAdjustStruct + +namespace SlotAdjustmentStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kSlotIndex), slotIndex); + encoder.Encode(to_underlying(Fields::kNominalPower), nominalPower); + encoder.Encode(to_underlying(Fields::kDuration), duration); return encoder.Finalize(); } @@ -14805,10 +15384,74 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSlotIndex)) + { + err = DataModel::Decode(reader, slotIndex); + } + else if (__context_tag == to_underlying(Fields::kNominalPower)) + { + err = DataModel::Decode(reader, nominalPower); + } + else if (__context_tag == to_underlying(Fields::kDuration)) + { + err = DataModel::Decode(reader, duration); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace DownOrClose. -namespace StopMotion { + +} // namespace SlotAdjustmentStruct +} // namespace Structs + +namespace Commands { +namespace PowerAdjustRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPower), power); + encoder.Encode(to_underlying(Fields::kDuration), duration); + 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::kPower)) + { + err = DataModel::Decode(reader, power); + } + else if (__context_tag == to_underlying(Fields::kDuration)) + { + err = DataModel::Decode(reader, duration); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace PowerAdjustRequest. +namespace CancelPowerAdjustRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -14827,12 +15470,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace StopMotion. -namespace GoToLiftValue { +} // namespace CancelPowerAdjustRequest. +namespace StartTimeAdjustRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLiftValue), liftValue); + encoder.Encode(to_underlying(Fields::kRequestedStartTime), requestedStartTime); return encoder.Finalize(); } @@ -14850,9 +15493,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::kLiftValue)) + if (__context_tag == to_underlying(Fields::kRequestedStartTime)) { - err = DataModel::Decode(reader, liftValue); + err = DataModel::Decode(reader, requestedStartTime); } else { @@ -14861,12 +15504,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GoToLiftValue. -namespace GoToLiftPercentage { +} // namespace StartTimeAdjustRequest. +namespace PauseRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLiftPercent100thsValue), liftPercent100thsValue); + encoder.Encode(to_underlying(Fields::kDuration), duration); return encoder.Finalize(); } @@ -14884,9 +15527,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::kLiftPercent100thsValue)) + if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, liftPercent100thsValue); + err = DataModel::Decode(reader, duration); } else { @@ -14895,12 +15538,33 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GoToLiftPercentage. -namespace GoToTiltValue { +} // namespace PauseRequest. +namespace ResumeRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTiltValue), tiltValue); + 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 ResumeRequest. +namespace ModifyForecastRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kForecastId), forecastId); + encoder.Encode(to_underlying(Fields::kSlotAdjustments), slotAdjustments); return encoder.Finalize(); } @@ -14918,9 +15582,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::kTiltValue)) + if (__context_tag == to_underlying(Fields::kForecastId)) { - err = DataModel::Decode(reader, tiltValue); + err = DataModel::Decode(reader, forecastId); + } + else if (__context_tag == to_underlying(Fields::kSlotAdjustments)) + { + err = DataModel::Decode(reader, slotAdjustments); } else { @@ -14929,12 +15597,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GoToTiltValue. -namespace GoToTiltPercentage { +} // namespace ModifyForecastRequest. +namespace RequestConstraintBasedForecast { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTiltPercent100thsValue), tiltPercent100thsValue); + encoder.Encode(to_underlying(Fields::kConstraints), constraints); return encoder.Finalize(); } @@ -14952,9 +15620,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::kTiltPercent100thsValue)) + if (__context_tag == to_underlying(Fields::kConstraints)) { - err = DataModel::Decode(reader, tiltPercent100thsValue); + err = DataModel::Decode(reader, constraints); } else { @@ -14963,7 +15631,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GoToTiltPercentage. +} // namespace RequestConstraintBasedForecast. } // namespace Commands namespace Attributes { @@ -14971,50 +15639,20 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::Type::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, type); - case Attributes::PhysicalClosedLimitLift::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalClosedLimitLift); - case Attributes::PhysicalClosedLimitTilt::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalClosedLimitTilt); - case Attributes::CurrentPositionLift::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionLift); - case Attributes::CurrentPositionTilt::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionTilt); - case Attributes::NumberOfActuationsLift::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfActuationsLift); - case Attributes::NumberOfActuationsTilt::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfActuationsTilt); - case Attributes::ConfigStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, configStatus); - case Attributes::CurrentPositionLiftPercentage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionLiftPercentage); - case Attributes::CurrentPositionTiltPercentage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionTiltPercentage); - case Attributes::OperationalStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalStatus); - case Attributes::TargetPositionLiftPercent100ths::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, targetPositionLiftPercent100ths); - case Attributes::TargetPositionTiltPercent100ths::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, targetPositionTiltPercent100ths); - case Attributes::EndProductType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, endProductType); - case Attributes::CurrentPositionLiftPercent100ths::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionLiftPercent100ths); - case Attributes::CurrentPositionTiltPercent100ths::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPositionTiltPercent100ths); - case Attributes::InstalledOpenLimitLift::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, installedOpenLimitLift); - case Attributes::InstalledClosedLimitLift::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, installedClosedLimitLift); - case Attributes::InstalledOpenLimitTilt::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, installedOpenLimitTilt); - case Attributes::InstalledClosedLimitTilt::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, installedClosedLimitTilt); - case Attributes::Mode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, mode); - case Attributes::SafetyStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, safetyStatus); + case Attributes::ESAType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ESAType); + case Attributes::ESACanGenerate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ESACanGenerate); + case Attributes::ESAState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ESAState); + case Attributes::AbsMinPower::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMinPower); + case Attributes::AbsMaxPower::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMaxPower); + case Attributes::PowerAdjustmentCapability::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, powerAdjustmentCapability); + case Attributes::Forecast::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, forecast); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -15033,18 +15671,37 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace WindowCovering -namespace BarrierControl { +namespace Events { +namespace PowerAdjustStart { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Commands { -namespace BarrierControlGoToPercent { +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 PowerAdjustStart. +namespace PowerAdjustEnd { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPercentOpen), percentOpen); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCause), cause)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyUse), energyUse)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15061,9 +15718,17 @@ 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::kPercentOpen)) + if (__context_tag == to_underlying(Fields::kCause)) { - err = DataModel::Decode(reader, percentOpen); + err = DataModel::Decode(reader, cause); + } + else if (__context_tag == to_underlying(Fields::kDuration)) + { + err = DataModel::Decode(reader, duration); + } + else if (__context_tag == to_underlying(Fields::kEnergyUse)) + { + err = DataModel::Decode(reader, energyUse); } else { @@ -15072,12 +15737,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace BarrierControlGoToPercent. -namespace BarrierControlStop { +} // namespace PowerAdjustEnd. +namespace Paused { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15092,135 +15758,42 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace BarrierControlStop. -} // namespace Commands +} // namespace Paused. +namespace Resumed { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::BarrierMovingState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierMovingState); - case Attributes::BarrierSafetyStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierSafetyStatus); - case Attributes::BarrierCapabilities::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCapabilities); - case Attributes::BarrierOpenEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierOpenEvents); - case Attributes::BarrierCloseEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCloseEvents); - case Attributes::BarrierCommandOpenEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCommandOpenEvents); - case Attributes::BarrierCommandCloseEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCommandCloseEvents); - case Attributes::BarrierOpenPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierOpenPeriod); - case Attributes::BarrierClosePeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierClosePeriod); - case Attributes::BarrierPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierPosition); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace BarrierControl -namespace PumpConfigurationAndControl { +} // namespace Resumed. +} // namespace Events -namespace Commands {} // namespace Commands +} // namespace DeviceEnergyManagement +namespace EnergyEvse { +namespace Structs { -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MaxPressure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxPressure); - case Attributes::MaxSpeed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxSpeed); - case Attributes::MaxFlow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxFlow); - case Attributes::MinConstPressure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minConstPressure); - case Attributes::MaxConstPressure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxConstPressure); - case Attributes::MinCompPressure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minCompPressure); - case Attributes::MaxCompPressure::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxCompPressure); - case Attributes::MinConstSpeed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minConstSpeed); - case Attributes::MaxConstSpeed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxConstSpeed); - case Attributes::MinConstFlow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minConstFlow); - case Attributes::MaxConstFlow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxConstFlow); - case Attributes::MinConstTemp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minConstTemp); - case Attributes::MaxConstTemp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxConstTemp); - case Attributes::PumpStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, pumpStatus); - case Attributes::EffectiveOperationMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, effectiveOperationMode); - case Attributes::EffectiveControlMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, effectiveControlMode); - case Attributes::Capacity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, capacity); - case Attributes::Speed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, speed); - case Attributes::LifetimeRunningHours::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lifetimeRunningHours); - case Attributes::Power::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, power); - case Attributes::LifetimeEnergyConsumed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lifetimeEnergyConsumed); - case Attributes::OperationMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationMode); - case Attributes::ControlMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, controlMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace SupplyVoltageLow { +namespace ChargingTargetStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTargetTimeMinutesPastMidnight), targetTimeMinutesPastMidnight); + encoder.Encode(to_underlying(Fields::kTargetSoC), targetSoC); + encoder.Encode(to_underlying(Fields::kAddedEnergy), addedEnergy); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15233,15 +15806,41 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kTargetTimeMinutesPastMidnight)) + { + err = DataModel::Decode(reader, targetTimeMinutesPastMidnight); + } + else if (__context_tag == to_underlying(Fields::kTargetSoC)) + { + err = DataModel::Decode(reader, targetSoC); + } + else if (__context_tag == to_underlying(Fields::kAddedEnergy)) + { + err = DataModel::Decode(reader, addedEnergy); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace SupplyVoltageLow. -namespace SupplyVoltageHigh { + +} // namespace ChargingTargetStruct +} // namespace Structs + +namespace Commands { +namespace GetTargetsResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); + encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15254,15 +15853,31 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + { + err = DataModel::Decode(reader, dayOfWeekforSequence); + } + else if (__context_tag == to_underlying(Fields::kChargingTargets)) + { + err = DataModel::Decode(reader, chargingTargets); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace SupplyVoltageHigh. -namespace PowerMissingPhase { +} // namespace GetTargetsResponse. +namespace Disable { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15277,13 +15892,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace PowerMissingPhase. -namespace SystemPressureLow { +} // namespace Disable. +namespace EnableCharging { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kChargingEnabledUntil), chargingEnabledUntil); + encoder.Encode(to_underlying(Fields::kMinimumChargeCurrent), minimumChargeCurrent); + encoder.Encode(to_underlying(Fields::kMaximumChargeCurrent), maximumChargeCurrent); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15296,15 +15913,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kChargingEnabledUntil)) + { + err = DataModel::Decode(reader, chargingEnabledUntil); + } + else if (__context_tag == to_underlying(Fields::kMinimumChargeCurrent)) + { + err = DataModel::Decode(reader, minimumChargeCurrent); + } + else if (__context_tag == to_underlying(Fields::kMaximumChargeCurrent)) + { + err = DataModel::Decode(reader, maximumChargeCurrent); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace SystemPressureLow. -namespace SystemPressureHigh { +} // namespace EnableCharging. +namespace EnableDischarging { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDischargingEnabledUntil), dischargingEnabledUntil); + encoder.Encode(to_underlying(Fields::kMaximumDischargeCurrent), maximumDischargeCurrent); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15317,15 +15956,31 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kDischargingEnabledUntil)) + { + err = DataModel::Decode(reader, dischargingEnabledUntil); + } + else if (__context_tag == to_underlying(Fields::kMaximumDischargeCurrent)) + { + err = DataModel::Decode(reader, maximumDischargeCurrent); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace SystemPressureHigh. -namespace DryRunning { +} // namespace EnableDischarging. +namespace StartDiagnostics { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15340,13 +15995,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace DryRunning. -namespace MotorTemperatureHigh { +} // namespace StartDiagnostics. +namespace SetTargets { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); + encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15359,15 +16015,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + { + err = DataModel::Decode(reader, dayOfWeekforSequence); + } + else if (__context_tag == to_underlying(Fields::kChargingTargets)) + { + err = DataModel::Decode(reader, chargingTargets); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace MotorTemperatureHigh. -namespace PumpMotorFatalFailure { +} // namespace SetTargets. +namespace GetTargets { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDaysToReturn), daysToReturn); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15380,15 +16053,27 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kDaysToReturn)) + { + err = DataModel::Decode(reader, daysToReturn); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace PumpMotorFatalFailure. -namespace ElectronicTemperatureHigh { +} // namespace GetTargets. +namespace ClearTargets { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -15403,12 +16088,89 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace ElectronicTemperatureHigh. -namespace PumpBlocked { +} // namespace ClearTargets. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::State::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, state); + case Attributes::SupplyState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supplyState); + case Attributes::FaultState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, faultState); + case Attributes::ChargingEnabledUntil::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, chargingEnabledUntil); + case Attributes::DischargingEnabledUntil::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, dischargingEnabledUntil); + case Attributes::CircuitCapacity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, circuitCapacity); + case Attributes::MinimumChargeCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minimumChargeCurrent); + case Attributes::MaximumChargeCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maximumChargeCurrent); + case Attributes::MaximumDischargeCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maximumDischargeCurrent); + case Attributes::UserMaximumChargeCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userMaximumChargeCurrent); + case Attributes::RandomizationDelayWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, randomizationDelayWindow); + case Attributes::NumberOfWeeklyTargets::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfWeeklyTargets); + case Attributes::NumberOfDailyTargets::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfDailyTargets); + case Attributes::NextChargeStartTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nextChargeStartTime); + case Attributes::NextChargeTargetTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nextChargeTargetTime); + case Attributes::NextChargeRequiredEnergy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nextChargeRequiredEnergy); + case Attributes::NextChargeTargetSoC::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nextChargeTargetSoC); + case Attributes::ApproximateEVEfficiency::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, approximateEVEfficiency); + case Attributes::StateOfCharge::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, stateOfCharge); + case Attributes::BatteryCapacity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batteryCapacity); + case Attributes::VehicleID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vehicleID); + case Attributes::SessionID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sessionID); + case Attributes::SessionDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sessionDuration); + case Attributes::SessionEnergyCharged::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sessionEnergyCharged); + case Attributes::SessionEnergyDischarged::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sessionEnergyDischarged); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace EVConnected { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionID), sessionID)); return aWriter.EndContainer(outer); } @@ -15422,35 +16184,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace PumpBlocked. -namespace SensorFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSessionID)) + { + err = DataModel::Decode(reader, sessionID); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace SensorFailure. -namespace ElectronicNonFatalFailure { +} // namespace EVConnected. +namespace EVNotDetected { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionID), sessionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionDuration), sessionDuration)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionEnergyCharged), sessionEnergyCharged)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionEnergyDischarged), sessionEnergyDischarged)); return aWriter.EndContainer(outer); } @@ -15464,35 +16223,46 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace ElectronicNonFatalFailure. -namespace ElectronicFatalFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSessionID)) + { + err = DataModel::Decode(reader, sessionID); + } + else if (__context_tag == to_underlying(Fields::kState)) + { + err = DataModel::Decode(reader, state); + } + else if (__context_tag == to_underlying(Fields::kSessionDuration)) + { + err = DataModel::Decode(reader, sessionDuration); + } + else if (__context_tag == to_underlying(Fields::kSessionEnergyCharged)) + { + err = DataModel::Decode(reader, sessionEnergyCharged); + } + else if (__context_tag == to_underlying(Fields::kSessionEnergyDischarged)) + { + err = DataModel::Decode(reader, sessionEnergyDischarged); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace ElectronicFatalFailure. -namespace GeneralFault { +} // namespace EVNotDetected. +namespace EnergyTransferStarted { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionID), sessionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMaximumCurrent), maximumCurrent)); return aWriter.EndContainer(outer); } @@ -15506,14 +16276,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSessionID)) + { + err = DataModel::Decode(reader, sessionID); + } + else if (__context_tag == to_underlying(Fields::kState)) + { + err = DataModel::Decode(reader, state); + } + else if (__context_tag == to_underlying(Fields::kMaximumCurrent)) + { + err = DataModel::Decode(reader, maximumCurrent); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace GeneralFault. -namespace Leakage { +} // namespace EnergyTransferStarted. +namespace EnergyTransferStopped { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionID), sessionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReason), reason)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnergyTransferred), energyTransferred)); return aWriter.EndContainer(outer); } @@ -15527,14 +16322,43 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSessionID)) + { + err = DataModel::Decode(reader, sessionID); + } + else if (__context_tag == to_underlying(Fields::kState)) + { + err = DataModel::Decode(reader, state); + } + else if (__context_tag == to_underlying(Fields::kReason)) + { + err = DataModel::Decode(reader, reason); + } + else if (__context_tag == to_underlying(Fields::kEnergyTransferred)) + { + err = DataModel::Decode(reader, energyTransferred); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Leakage. -namespace AirDetection { +} // namespace EnergyTransferStopped. +namespace Fault { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSessionID), sessionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFaultStatePreviousState), faultStatePreviousState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFaultStateCurrentState), faultStateCurrentState)); return aWriter.EndContainer(outer); } @@ -15548,14 +16372,40 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSessionID)) + { + err = DataModel::Decode(reader, sessionID); + } + else if (__context_tag == to_underlying(Fields::kState)) + { + err = DataModel::Decode(reader, state); + } + else if (__context_tag == to_underlying(Fields::kFaultStatePreviousState)) + { + err = DataModel::Decode(reader, faultStatePreviousState); + } + else if (__context_tag == to_underlying(Fields::kFaultStateCurrentState)) + { + err = DataModel::Decode(reader, faultStateCurrentState); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace AirDetection. -namespace TurbineOperation { +} // namespace Fault. +namespace Rfid { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUid), uid)); return aWriter.EndContainer(outer); } @@ -15569,22 +16419,34 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kUid)) + { + err = DataModel::Decode(reader, uid); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace TurbineOperation. +} // namespace Rfid. } // namespace Events -} // namespace PumpConfigurationAndControl -namespace Thermostat { +} // namespace EnergyEvse +namespace DoorLock { namespace Structs { -namespace ThermostatScheduleTransition { +namespace CredentialStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kHeatSetpoint), heatSetpoint); - encoder.Encode(to_underlying(Fields::kCoolSetpoint), coolSetpoint); + encoder.Encode(to_underlying(Fields::kCredentialType), credentialType); + encoder.Encode(to_underlying(Fields::kCredentialIndex), credentialIndex); return encoder.Finalize(); } @@ -15602,17 +16464,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::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kHeatSetpoint)) + if (__context_tag == to_underlying(Fields::kCredentialType)) { - err = DataModel::Decode(reader, heatSetpoint); + err = DataModel::Decode(reader, credentialType); } - else if (__context_tag == to_underlying(Fields::kCoolSetpoint)) + else if (__context_tag == to_underlying(Fields::kCredentialIndex)) { - err = DataModel::Decode(reader, coolSetpoint); + err = DataModel::Decode(reader, credentialIndex); } else { @@ -15622,16 +16480,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ThermostatScheduleTransition +} // namespace CredentialStruct } // namespace Structs namespace Commands { -namespace SetpointRaiseLower { +namespace LockDoor { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMode), mode); - encoder.Encode(to_underlying(Fields::kAmount), amount); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -15649,13 +16506,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::kMode)) - { - err = DataModel::Decode(reader, mode); - } - else if (__context_tag == to_underlying(Fields::kAmount)) + if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, amount); + err = DataModel::Decode(reader, PINCode); } else { @@ -15664,15 +16517,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetpointRaiseLower. -namespace GetWeeklyScheduleResponse { +} // namespace LockDoor. +namespace UnlockDoor { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); - encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); - encoder.Encode(to_underlying(Fields::kTransitions), transitions); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -15690,21 +16540,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::kNumberOfTransitionsForSequence)) - { - err = DataModel::Decode(reader, numberOfTransitionsForSequence); - } - else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) - { - err = DataModel::Decode(reader, dayOfWeekForSequence); - } - else if (__context_tag == to_underlying(Fields::kModeForSequence)) - { - err = DataModel::Decode(reader, modeForSequence); - } - else if (__context_tag == to_underlying(Fields::kTransitions)) + if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, transitions); + err = DataModel::Decode(reader, PINCode); } else { @@ -15713,15 +16551,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetWeeklyScheduleResponse. -namespace SetWeeklySchedule { +} // namespace UnlockDoor. +namespace UnlockWithTimeout { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); - encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); - encoder.Encode(to_underlying(Fields::kTransitions), transitions); + encoder.Encode(to_underlying(Fields::kTimeout), timeout); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -15739,21 +16575,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::kNumberOfTransitionsForSequence)) - { - err = DataModel::Decode(reader, numberOfTransitionsForSequence); - } - else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) - { - err = DataModel::Decode(reader, dayOfWeekForSequence); - } - else if (__context_tag == to_underlying(Fields::kModeForSequence)) + if (__context_tag == to_underlying(Fields::kTimeout)) { - err = DataModel::Decode(reader, modeForSequence); + err = DataModel::Decode(reader, timeout); } - else if (__context_tag == to_underlying(Fields::kTransitions)) + else if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, transitions); + err = DataModel::Decode(reader, PINCode); } else { @@ -15762,13 +16590,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetWeeklySchedule. -namespace GetWeeklySchedule { +} // namespace UnlockWithTimeout. +namespace SetWeekDaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDaysToReturn), daysToReturn); - encoder.Encode(to_underlying(Fields::kModeToReturn), modeToReturn); + encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kDaysMask), daysMask); + encoder.Encode(to_underlying(Fields::kStartHour), startHour); + encoder.Encode(to_underlying(Fields::kStartMinute), startMinute); + encoder.Encode(to_underlying(Fields::kEndHour), endHour); + encoder.Encode(to_underlying(Fields::kEndMinute), endMinute); return encoder.Finalize(); } @@ -15786,26 +16619,48 @@ 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::kDaysToReturn)) + if (__context_tag == to_underlying(Fields::kWeekDayIndex)) { - err = DataModel::Decode(reader, daysToReturn); + err = DataModel::Decode(reader, weekDayIndex); } - else if (__context_tag == to_underlying(Fields::kModeToReturn)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, modeToReturn); + err = DataModel::Decode(reader, userIndex); } - else + else if (__context_tag == to_underlying(Fields::kDaysMask)) { + err = DataModel::Decode(reader, daysMask); } - - ReturnErrorOnFailure(err); - } -} -} // namespace GetWeeklySchedule. -namespace ClearWeeklySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + else if (__context_tag == to_underlying(Fields::kStartHour)) + { + err = DataModel::Decode(reader, startHour); + } + else if (__context_tag == to_underlying(Fields::kStartMinute)) + { + err = DataModel::Decode(reader, startMinute); + } + else if (__context_tag == to_underlying(Fields::kEndHour)) + { + err = DataModel::Decode(reader, endHour); + } + else if (__context_tag == to_underlying(Fields::kEndMinute)) + { + err = DataModel::Decode(reader, endMinute); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetWeekDaySchedule. +namespace GetWeekDaySchedule { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -15819,145 +16674,38 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace ClearWeeklySchedule. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::LocalTemperature::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, localTemperature); - case Attributes::OutdoorTemperature::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, outdoorTemperature); - case Attributes::Occupancy::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupancy); - case Attributes::AbsMinHeatSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, absMinHeatSetpointLimit); - case Attributes::AbsMaxHeatSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, absMaxHeatSetpointLimit); - case Attributes::AbsMinCoolSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, absMinCoolSetpointLimit); - case Attributes::AbsMaxCoolSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, absMaxCoolSetpointLimit); - case Attributes::PICoolingDemand::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PICoolingDemand); - case Attributes::PIHeatingDemand::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PIHeatingDemand); - case Attributes::HVACSystemTypeConfiguration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, HVACSystemTypeConfiguration); - case Attributes::LocalTemperatureCalibration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, localTemperatureCalibration); - case Attributes::OccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupiedCoolingSetpoint); - case Attributes::OccupiedHeatingSetpoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupiedHeatingSetpoint); - case Attributes::UnoccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, unoccupiedCoolingSetpoint); - case Attributes::UnoccupiedHeatingSetpoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, unoccupiedHeatingSetpoint); - case Attributes::MinHeatSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minHeatSetpointLimit); - case Attributes::MaxHeatSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxHeatSetpointLimit); - case Attributes::MinCoolSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minCoolSetpointLimit); - case Attributes::MaxCoolSetpointLimit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxCoolSetpointLimit); - case Attributes::MinSetpointDeadBand::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minSetpointDeadBand); - case Attributes::RemoteSensing::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, remoteSensing); - case Attributes::ControlSequenceOfOperation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, controlSequenceOfOperation); - case Attributes::SystemMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, systemMode); - case Attributes::ThermostatRunningMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, thermostatRunningMode); - case Attributes::StartOfWeek::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startOfWeek); - case Attributes::NumberOfWeeklyTransitions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfWeeklyTransitions); - case Attributes::NumberOfDailyTransitions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfDailyTransitions); - case Attributes::TemperatureSetpointHold::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, temperatureSetpointHold); - case Attributes::TemperatureSetpointHoldDuration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, temperatureSetpointHoldDuration); - case Attributes::ThermostatProgrammingOperationMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, thermostatProgrammingOperationMode); - case Attributes::ThermostatRunningState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, thermostatRunningState); - case Attributes::SetpointChangeSource::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, setpointChangeSource); - case Attributes::SetpointChangeAmount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, setpointChangeAmount); - case Attributes::SetpointChangeSourceTimestamp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, setpointChangeSourceTimestamp); - case Attributes::OccupiedSetback::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupiedSetback); - case Attributes::OccupiedSetbackMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupiedSetbackMin); - case Attributes::OccupiedSetbackMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupiedSetbackMax); - case Attributes::UnoccupiedSetback::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, unoccupiedSetback); - case Attributes::UnoccupiedSetbackMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, unoccupiedSetbackMin); - case Attributes::UnoccupiedSetbackMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, unoccupiedSetbackMax); - case Attributes::EmergencyHeatDelta::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, emergencyHeatDelta); - case Attributes::ACType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACType); - case Attributes::ACCapacity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACCapacity); - case Attributes::ACRefrigerantType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACRefrigerantType); - case Attributes::ACCompressorType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACCompressorType); - case Attributes::ACErrorCode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACErrorCode); - case Attributes::ACLouverPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACLouverPosition); - case Attributes::ACCoilTemperature::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACCoilTemperature); - case Attributes::ACCapacityformat::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ACCapacityformat); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes -namespace Events {} // namespace Events + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -} // namespace Thermostat -namespace FanControl { + if (__context_tag == to_underlying(Fields::kWeekDayIndex)) + { + err = DataModel::Decode(reader, weekDayIndex); + } + else if (__context_tag == to_underlying(Fields::kUserIndex)) + { + err = DataModel::Decode(reader, userIndex); + } + else + { + } -namespace Commands { -namespace Step { + ReturnErrorOnFailure(err); + } +} +} // namespace GetWeekDaySchedule. +namespace GetWeekDayScheduleResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDirection), direction); - encoder.Encode(to_underlying(Fields::kWrap), wrap); - encoder.Encode(to_underlying(Fields::kLowestOff), lowestOff); + encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kDaysMask), daysMask); + encoder.Encode(to_underlying(Fields::kStartHour), startHour); + encoder.Encode(to_underlying(Fields::kStartMinute), startMinute); + encoder.Encode(to_underlying(Fields::kEndHour), endHour); + encoder.Encode(to_underlying(Fields::kEndMinute), endMinute); return encoder.Finalize(); } @@ -15975,17 +16723,37 @@ 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::kDirection)) + if (__context_tag == to_underlying(Fields::kWeekDayIndex)) { - err = DataModel::Decode(reader, direction); + err = DataModel::Decode(reader, weekDayIndex); } - else if (__context_tag == to_underlying(Fields::kWrap)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, wrap); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kLowestOff)) + else if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, lowestOff); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kDaysMask)) + { + err = DataModel::Decode(reader, daysMask); + } + else if (__context_tag == to_underlying(Fields::kStartHour)) + { + err = DataModel::Decode(reader, startHour); + } + else if (__context_tag == to_underlying(Fields::kStartMinute)) + { + err = DataModel::Decode(reader, startMinute); + } + else if (__context_tag == to_underlying(Fields::kEndHour)) + { + err = DataModel::Decode(reader, endHour); + } + else if (__context_tag == to_underlying(Fields::kEndMinute)) + { + err = DataModel::Decode(reader, endMinute); } else { @@ -15994,107 +16762,54 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Step. -} // namespace Commands +} // namespace GetWeekDayScheduleResponse. +namespace ClearWeekDaySchedule { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kWeekDayIndex), weekDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::FanMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, fanMode); - case Attributes::FanModeSequence::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, fanModeSequence); - case Attributes::PercentSetting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, percentSetting); - case Attributes::PercentCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, percentCurrent); - case Attributes::SpeedMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, speedMax); - case Attributes::SpeedSetting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, speedSetting); - case Attributes::SpeedCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, speedCurrent); - case Attributes::RockSupport::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rockSupport); - case Attributes::RockSetting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rockSetting); - case Attributes::WindSupport::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, windSupport); - case Attributes::WindSetting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, windSetting); - case Attributes::AirflowDirection::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, airflowDirection); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -} // namespace FanControl -namespace ThermostatUserInterfaceConfiguration { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kWeekDayIndex)) + { + err = DataModel::Decode(reader, weekDayIndex); + } + else if (__context_tag == to_underlying(Fields::kUserIndex)) + { + err = DataModel::Decode(reader, userIndex); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::TemperatureDisplayMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, temperatureDisplayMode); - case Attributes::KeypadLockout::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, keypadLockout); - case Attributes::ScheduleProgrammingVisibility::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, scheduleProgrammingVisibility); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace ThermostatUserInterfaceConfiguration -namespace ColorControl { - -namespace Commands { -namespace MoveToHue { +} // namespace ClearWeekDaySchedule. +namespace SetYearDaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHue), hue); - encoder.Encode(to_underlying(Fields::kDirection), direction); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); + encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); return encoder.Finalize(); } @@ -16112,25 +16827,21 @@ 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::kHue)) - { - err = DataModel::Decode(reader, hue); - } - else if (__context_tag == to_underlying(Fields::kDirection)) + if (__context_tag == to_underlying(Fields::kYearDayIndex)) { - err = DataModel::Decode(reader, direction); + err = DataModel::Decode(reader, yearDayIndex); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kLocalStartTime)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, localStartTime); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kLocalEndTime)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, localEndTime); } else { @@ -16139,15 +16850,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToHue. -namespace MoveHue { +} // namespace SetYearDaySchedule. +namespace GetYearDaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -16165,21 +16874,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::kMoveMode)) - { - err = DataModel::Decode(reader, moveMode); - } - else if (__context_tag == to_underlying(Fields::kRate)) - { - err = DataModel::Decode(reader, rate); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kYearDayIndex)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, yearDayIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userIndex); } else { @@ -16188,16 +16889,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveHue. -namespace StepHue { +} // namespace GetYearDaySchedule. +namespace GetYearDayScheduleResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); + encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); return encoder.Finalize(); } @@ -16215,25 +16916,25 @@ 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::kStepMode)) + if (__context_tag == to_underlying(Fields::kYearDayIndex)) { - err = DataModel::Decode(reader, stepMode); + err = DataModel::Decode(reader, yearDayIndex); } - else if (__context_tag == to_underlying(Fields::kStepSize)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, stepSize); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kLocalStartTime)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, localStartTime); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kLocalEndTime)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, localEndTime); } else { @@ -16242,15 +16943,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StepHue. -namespace MoveToSaturation { +} // namespace GetYearDayScheduleResponse. +namespace ClearYearDaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSaturation), saturation); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kYearDayIndex), yearDayIndex); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -16268,21 +16967,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::kSaturation)) - { - err = DataModel::Decode(reader, saturation); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kYearDayIndex)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, yearDayIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userIndex); } else { @@ -16291,15 +16982,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToSaturation. -namespace MoveSaturation { +} // namespace ClearYearDaySchedule. +namespace SetHolidaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); + encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); + encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); + encoder.Encode(to_underlying(Fields::kOperatingMode), operatingMode); return encoder.Finalize(); } @@ -16317,21 +17008,21 @@ 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::kMoveMode)) + if (__context_tag == to_underlying(Fields::kHolidayIndex)) { - err = DataModel::Decode(reader, moveMode); + err = DataModel::Decode(reader, holidayIndex); } - else if (__context_tag == to_underlying(Fields::kRate)) + else if (__context_tag == to_underlying(Fields::kLocalStartTime)) { - err = DataModel::Decode(reader, rate); + err = DataModel::Decode(reader, localStartTime); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kLocalEndTime)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, localEndTime); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kOperatingMode)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, operatingMode); } else { @@ -16340,16 +17031,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveSaturation. -namespace StepSaturation { +} // namespace SetHolidaySchedule. +namespace GetHolidaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); return encoder.Finalize(); } @@ -16367,25 +17054,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::kStepMode)) - { - err = DataModel::Decode(reader, stepMode); - } - else if (__context_tag == to_underlying(Fields::kStepSize)) - { - err = DataModel::Decode(reader, stepSize); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kHolidayIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, holidayIndex); } else { @@ -16394,16 +17065,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StepSaturation. -namespace MoveToHueAndSaturation { +} // namespace GetHolidaySchedule. +namespace GetHolidayScheduleResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHue), hue); - encoder.Encode(to_underlying(Fields::kSaturation), saturation); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kLocalStartTime), localStartTime); + encoder.Encode(to_underlying(Fields::kLocalEndTime), localEndTime); + encoder.Encode(to_underlying(Fields::kOperatingMode), operatingMode); return encoder.Finalize(); } @@ -16421,25 +17092,25 @@ 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::kHue)) + if (__context_tag == to_underlying(Fields::kHolidayIndex)) { - err = DataModel::Decode(reader, hue); + err = DataModel::Decode(reader, holidayIndex); } - else if (__context_tag == to_underlying(Fields::kSaturation)) + else if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, saturation); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kLocalStartTime)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, localStartTime); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kLocalEndTime)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, localEndTime); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kOperatingMode)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, operatingMode); } else { @@ -16448,16 +17119,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToHueAndSaturation. -namespace MoveToColor { +} // namespace GetHolidayScheduleResponse. +namespace ClearHolidaySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kColorX), colorX); - encoder.Encode(to_underlying(Fields::kColorY), colorY); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kHolidayIndex), holidayIndex); return encoder.Finalize(); } @@ -16475,25 +17142,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::kColorX)) - { - err = DataModel::Decode(reader, colorX); - } - else if (__context_tag == to_underlying(Fields::kColorY)) - { - err = DataModel::Decode(reader, colorY); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kHolidayIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, holidayIndex); } else { @@ -16502,15 +17153,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToColor. -namespace MoveColor { +} // namespace ClearHolidaySchedule. +namespace SetUser { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRateX), rateX); - encoder.Encode(to_underlying(Fields::kRateY), rateY); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kOperationType), operationType); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kUserName), userName); + encoder.Encode(to_underlying(Fields::kUserUniqueID), userUniqueID); + encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); + encoder.Encode(to_underlying(Fields::kUserType), userType); + encoder.Encode(to_underlying(Fields::kCredentialRule), credentialRule); return encoder.Finalize(); } @@ -16528,21 +17182,33 @@ 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::kRateX)) + if (__context_tag == to_underlying(Fields::kOperationType)) { - err = DataModel::Decode(reader, rateX); + err = DataModel::Decode(reader, operationType); } - else if (__context_tag == to_underlying(Fields::kRateY)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, rateY); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kUserName)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, userName); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kUserUniqueID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userUniqueID); + } + else if (__context_tag == to_underlying(Fields::kUserStatus)) + { + err = DataModel::Decode(reader, userStatus); + } + else if (__context_tag == to_underlying(Fields::kUserType)) + { + err = DataModel::Decode(reader, userType); + } + else if (__context_tag == to_underlying(Fields::kCredentialRule)) + { + err = DataModel::Decode(reader, credentialRule); } else { @@ -16551,16 +17217,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveColor. -namespace StepColor { +} // namespace SetUser. +namespace GetUser { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepX), stepX); - encoder.Encode(to_underlying(Fields::kStepY), stepY); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -16578,25 +17240,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::kStepX)) - { - err = DataModel::Decode(reader, stepX); - } - else if (__context_tag == to_underlying(Fields::kStepY)) - { - err = DataModel::Decode(reader, stepY); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userIndex); } else { @@ -16605,15 +17251,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StepColor. -namespace MoveToColorTemperature { +} // namespace GetUser. +namespace GetUserResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kColorTemperatureMireds), colorTemperatureMireds); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kUserName), userName); + encoder.Encode(to_underlying(Fields::kUserUniqueID), userUniqueID); + encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); + encoder.Encode(to_underlying(Fields::kUserType), userType); + encoder.Encode(to_underlying(Fields::kCredentialRule), credentialRule); + encoder.Encode(to_underlying(Fields::kCredentials), credentials); + encoder.Encode(to_underlying(Fields::kCreatorFabricIndex), creatorFabricIndex); + encoder.Encode(to_underlying(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex); + encoder.Encode(to_underlying(Fields::kNextUserIndex), nextUserIndex); return encoder.Finalize(); } @@ -16631,21 +17283,45 @@ 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::kColorTemperatureMireds)) + if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, colorTemperatureMireds); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kUserName)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, userName); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kUserUniqueID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, userUniqueID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kUserStatus)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userStatus); + } + else if (__context_tag == to_underlying(Fields::kUserType)) + { + err = DataModel::Decode(reader, userType); + } + else if (__context_tag == to_underlying(Fields::kCredentialRule)) + { + err = DataModel::Decode(reader, credentialRule); + } + else if (__context_tag == to_underlying(Fields::kCredentials)) + { + err = DataModel::Decode(reader, credentials); + } + else if (__context_tag == to_underlying(Fields::kCreatorFabricIndex)) + { + err = DataModel::Decode(reader, creatorFabricIndex); + } + else if (__context_tag == to_underlying(Fields::kLastModifiedFabricIndex)) + { + err = DataModel::Decode(reader, lastModifiedFabricIndex); + } + else if (__context_tag == to_underlying(Fields::kNextUserIndex)) + { + err = DataModel::Decode(reader, nextUserIndex); } else { @@ -16654,16 +17330,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToColorTemperature. -namespace EnhancedMoveToHue { +} // namespace GetUserResponse. +namespace ClearUser { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kEnhancedHue), enhancedHue); - encoder.Encode(to_underlying(Fields::kDirection), direction); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); return encoder.Finalize(); } @@ -16681,25 +17353,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::kEnhancedHue)) - { - err = DataModel::Decode(reader, enhancedHue); - } - else if (__context_tag == to_underlying(Fields::kDirection)) - { - err = DataModel::Decode(reader, direction); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userIndex); } else { @@ -16708,15 +17364,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedMoveToHue. -namespace EnhancedMoveHue { +} // namespace ClearUser. +namespace SetCredential { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kOperationType), operationType); + encoder.Encode(to_underlying(Fields::kCredential), credential); + encoder.Encode(to_underlying(Fields::kCredentialData), credentialData); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kUserStatus), userStatus); + encoder.Encode(to_underlying(Fields::kUserType), userType); return encoder.Finalize(); } @@ -16734,39 +17392,45 @@ 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::kMoveMode)) + if (__context_tag == to_underlying(Fields::kOperationType)) { - err = DataModel::Decode(reader, moveMode); + err = DataModel::Decode(reader, operationType); } - else if (__context_tag == to_underlying(Fields::kRate)) + else if (__context_tag == to_underlying(Fields::kCredential)) { - err = DataModel::Decode(reader, rate); + err = DataModel::Decode(reader, credential); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kCredentialData)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, credentialData); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, userIndex); } - else + else if (__context_tag == to_underlying(Fields::kUserStatus)) + { + err = DataModel::Decode(reader, userStatus); + } + else if (__context_tag == to_underlying(Fields::kUserType)) + { + err = DataModel::Decode(reader, userType); + } + else { } ReturnErrorOnFailure(err); } } -} // namespace EnhancedMoveHue. -namespace EnhancedStepHue { +} // namespace SetCredential. +namespace SetCredentialResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kNextCredentialIndex), nextCredentialIndex); return encoder.Finalize(); } @@ -16784,25 +17448,17 @@ 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::kStepMode)) - { - err = DataModel::Decode(reader, stepMode); - } - else if (__context_tag == to_underlying(Fields::kStepSize)) - { - err = DataModel::Decode(reader, stepSize); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kUserIndex)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, userIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kNextCredentialIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, nextCredentialIndex); } else { @@ -16811,16 +17467,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedStepHue. -namespace EnhancedMoveToHueAndSaturation { +} // namespace SetCredentialResponse. +namespace GetCredentialStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kEnhancedHue), enhancedHue); - encoder.Encode(to_underlying(Fields::kSaturation), saturation); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kCredential), credential); return encoder.Finalize(); } @@ -16838,25 +17490,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::kEnhancedHue)) - { - err = DataModel::Decode(reader, enhancedHue); - } - else if (__context_tag == to_underlying(Fields::kSaturation)) - { - err = DataModel::Decode(reader, saturation); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kCredential)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, credential); } else { @@ -16865,18 +17501,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedMoveToHueAndSaturation. -namespace ColorLoopSet { +} // namespace GetCredentialStatus. +namespace GetCredentialStatusResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUpdateFlags), updateFlags); - encoder.Encode(to_underlying(Fields::kAction), action); - encoder.Encode(to_underlying(Fields::kDirection), direction); - encoder.Encode(to_underlying(Fields::kTime), time); - encoder.Encode(to_underlying(Fields::kStartHue), startHue); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kCredentialExists), credentialExists); + encoder.Encode(to_underlying(Fields::kUserIndex), userIndex); + encoder.Encode(to_underlying(Fields::kCreatorFabricIndex), creatorFabricIndex); + encoder.Encode(to_underlying(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex); + encoder.Encode(to_underlying(Fields::kNextCredentialIndex), nextCredentialIndex); return encoder.Finalize(); } @@ -16894,72 +17528,25 @@ 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::kUpdateFlags)) - { - err = DataModel::Decode(reader, updateFlags); - } - else if (__context_tag == to_underlying(Fields::kAction)) - { - err = DataModel::Decode(reader, action); - } - else if (__context_tag == to_underlying(Fields::kDirection)) - { - err = DataModel::Decode(reader, direction); - } - else if (__context_tag == to_underlying(Fields::kTime)) - { - err = DataModel::Decode(reader, time); - } - else if (__context_tag == to_underlying(Fields::kStartHue)) - { - err = DataModel::Decode(reader, startHue); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kCredentialExists)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, credentialExists); } - else + else if (__context_tag == to_underlying(Fields::kUserIndex)) { + err = DataModel::Decode(reader, userIndex); } - - ReturnErrorOnFailure(err); - } -} -} // namespace ColorLoopSet. -namespace StopMoveStep { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); - 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)) + else if (__context_tag == to_underlying(Fields::kCreatorFabricIndex)) { - return std::get(__element); + err = DataModel::Decode(reader, creatorFabricIndex); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kLastModifiedFabricIndex)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, lastModifiedFabricIndex); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kNextCredentialIndex)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, nextCredentialIndex); } else { @@ -16968,17 +17555,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StopMoveStep. -namespace MoveColorTemperature { +} // namespace GetCredentialStatusResponse. +namespace ClearCredential { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds); - encoder.Encode(to_underlying(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kCredential), credential); return encoder.Finalize(); } @@ -16996,29 +17578,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::kMoveMode)) - { - err = DataModel::Decode(reader, moveMode); - } - else if (__context_tag == to_underlying(Fields::kRate)) - { - err = DataModel::Decode(reader, rate); - } - else if (__context_tag == to_underlying(Fields::kColorTemperatureMinimumMireds)) - { - err = DataModel::Decode(reader, colorTemperatureMinimumMireds); - } - else if (__context_tag == to_underlying(Fields::kColorTemperatureMaximumMireds)) - { - err = DataModel::Decode(reader, colorTemperatureMaximumMireds); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kCredential)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, credential); } else { @@ -17027,18 +17589,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveColorTemperature. -namespace StepColorTemperature { +} // namespace ClearCredential. +namespace UnboltDoor { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds); - encoder.Encode(to_underlying(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -17056,33 +17612,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::kStepMode)) - { - err = DataModel::Decode(reader, stepMode); - } - else if (__context_tag == to_underlying(Fields::kStepSize)) - { - err = DataModel::Decode(reader, stepSize); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kColorTemperatureMinimumMireds)) - { - err = DataModel::Decode(reader, colorTemperatureMinimumMireds); - } - else if (__context_tag == to_underlying(Fields::kColorTemperatureMaximumMireds)) - { - err = DataModel::Decode(reader, colorTemperatureMaximumMireds); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) - { - err = DataModel::Decode(reader, optionsMask); - } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, PINCode); } else { @@ -17091,7 +17623,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StepColorTemperature. +} // namespace UnboltDoor. } // namespace Commands namespace Attributes { @@ -17099,110 +17631,78 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::CurrentHue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentHue); - case Attributes::CurrentSaturation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentSaturation); - case Attributes::RemainingTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, remainingTime); - case Attributes::CurrentX::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentX); - case Attributes::CurrentY::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentY); - case Attributes::DriftCompensation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, driftCompensation); - case Attributes::CompensationText::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, compensationText); - case Attributes::ColorTemperatureMireds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorTemperatureMireds); - case Attributes::ColorMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorMode); - case Attributes::Options::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, options); - case Attributes::NumberOfPrimaries::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfPrimaries); - case Attributes::Primary1X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary1X); - case Attributes::Primary1Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary1Y); - case Attributes::Primary1Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary1Intensity); - case Attributes::Primary2X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary2X); - case Attributes::Primary2Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary2Y); - case Attributes::Primary2Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary2Intensity); - case Attributes::Primary3X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary3X); - case Attributes::Primary3Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary3Y); - case Attributes::Primary3Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary3Intensity); - case Attributes::Primary4X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary4X); - case Attributes::Primary4Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary4Y); - case Attributes::Primary4Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary4Intensity); - case Attributes::Primary5X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary5X); - case Attributes::Primary5Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary5Y); - case Attributes::Primary5Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary5Intensity); - case Attributes::Primary6X::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary6X); - case Attributes::Primary6Y::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary6Y); - case Attributes::Primary6Intensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, primary6Intensity); - case Attributes::WhitePointX::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, whitePointX); - case Attributes::WhitePointY::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, whitePointY); - case Attributes::ColorPointRX::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointRX); - case Attributes::ColorPointRY::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointRY); - case Attributes::ColorPointRIntensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointRIntensity); - case Attributes::ColorPointGX::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointGX); - case Attributes::ColorPointGY::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointGY); - case Attributes::ColorPointGIntensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointGIntensity); - case Attributes::ColorPointBX::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointBX); - case Attributes::ColorPointBY::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointBY); - case Attributes::ColorPointBIntensity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorPointBIntensity); - case Attributes::EnhancedCurrentHue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enhancedCurrentHue); - case Attributes::EnhancedColorMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, enhancedColorMode); - case Attributes::ColorLoopActive::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorLoopActive); - case Attributes::ColorLoopDirection::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorLoopDirection); - case Attributes::ColorLoopTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorLoopTime); - case Attributes::ColorLoopStartEnhancedHue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorLoopStartEnhancedHue); - case Attributes::ColorLoopStoredEnhancedHue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorLoopStoredEnhancedHue); - case Attributes::ColorCapabilities::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorCapabilities); - case Attributes::ColorTempPhysicalMinMireds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorTempPhysicalMinMireds); - case Attributes::ColorTempPhysicalMaxMireds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, colorTempPhysicalMaxMireds); - case Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, coupleColorTempToLevelMinMireds); - case Attributes::StartUpColorTemperatureMireds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpColorTemperatureMireds); + case Attributes::LockState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lockState); + case Attributes::LockType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lockType); + case Attributes::ActuatorEnabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, actuatorEnabled); + case Attributes::DoorState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, doorState); + case Attributes::DoorOpenEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, doorOpenEvents); + case Attributes::DoorClosedEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, doorClosedEvents); + case Attributes::OpenPeriod::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, openPeriod); + case Attributes::NumberOfTotalUsersSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfTotalUsersSupported); + case Attributes::NumberOfPINUsersSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfPINUsersSupported); + case Attributes::NumberOfRFIDUsersSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfRFIDUsersSupported); + case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfWeekDaySchedulesSupportedPerUser); + case Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfYearDaySchedulesSupportedPerUser); + case Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfHolidaySchedulesSupported); + case Attributes::MaxPINCodeLength::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPINCodeLength); + case Attributes::MinPINCodeLength::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minPINCodeLength); + case Attributes::MaxRFIDCodeLength::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxRFIDCodeLength); + case Attributes::MinRFIDCodeLength::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minRFIDCodeLength); + case Attributes::CredentialRulesSupport::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, credentialRulesSupport); + case Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfCredentialsSupportedPerUser); + case Attributes::Language::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, language); + case Attributes::LEDSettings::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, LEDSettings); + case Attributes::AutoRelockTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, autoRelockTime); + case Attributes::SoundVolume::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, soundVolume); + case Attributes::OperatingMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operatingMode); + case Attributes::SupportedOperatingModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedOperatingModes); + case Attributes::DefaultConfigurationRegister::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultConfigurationRegister); + case Attributes::EnableLocalProgramming::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enableLocalProgramming); + case Attributes::EnableOneTouchLocking::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enableOneTouchLocking); + case Attributes::EnableInsideStatusLED::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enableInsideStatusLED); + case Attributes::EnablePrivacyModeButton::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enablePrivacyModeButton); + case Attributes::LocalProgrammingFeatures::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, localProgrammingFeatures); + case Attributes::WrongCodeEntryLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wrongCodeEntryLimit); + case Attributes::UserCodeTemporaryDisableTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userCodeTemporaryDisableTime); + case Attributes::SendPINOverTheAir::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sendPINOverTheAir); + case Attributes::RequirePINforRemoteOperation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, requirePINforRemoteOperation); + case Attributes::ExpiringUserTimeout::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, expiringUserTimeout); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -17221,86 +17721,3576 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace ColorControl -namespace BallastConfiguration { - -namespace Commands {} // namespace Commands +namespace Events { +namespace DoorLockAlarm { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmCode), alarmCode)); + return aWriter.EndContainer(outer); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::PhysicalMinLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalMinLevel); - case Attributes::PhysicalMaxLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalMaxLevel); - case Attributes::BallastStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ballastStatus); - case Attributes::MinLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minLevel); - case Attributes::MaxLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxLevel); - case Attributes::IntrinsicBallastFactor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, intrinsicBallastFactor); - case Attributes::BallastFactorAdjustment::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ballastFactorAdjustment); - case Attributes::LampQuantity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampQuantity); - case Attributes::LampType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampType); - case Attributes::LampManufacturer::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampManufacturer); - case Attributes::LampRatedHours::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampRatedHours); - case Attributes::LampBurnHours::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampBurnHours); - case Attributes::LampAlarmMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampAlarmMode); - case Attributes::LampBurnHoursTripPoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lampBurnHoursTripPoint); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -namespace Events {} // namespace Events + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -} // namespace BallastConfiguration -namespace IlluminanceMeasurement { + if (__context_tag == to_underlying(Fields::kAlarmCode)) + { + err = DataModel::Decode(reader, alarmCode); + } + else + { + } -namespace Commands {} // namespace Commands + ReturnErrorOnFailure(err); + } +} +} // namespace DoorLockAlarm. +namespace DoorStateChange { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDoorState), doorState)); + return aWriter.EndContainer(outer); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + 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::kDoorState)) + { + err = DataModel::Decode(reader, doorState); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace DoorStateChange. +namespace LockOperation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + return aWriter.EndContainer(outer); +} + +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::kLockOperationType)) + { + err = DataModel::Decode(reader, lockOperationType); + } + else if (__context_tag == to_underlying(Fields::kOperationSource)) + { + err = DataModel::Decode(reader, operationSource); + } + else if (__context_tag == to_underlying(Fields::kUserIndex)) + { + err = DataModel::Decode(reader, userIndex); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else if (__context_tag == to_underlying(Fields::kSourceNode)) + { + err = DataModel::Decode(reader, sourceNode); + } + else if (__context_tag == to_underlying(Fields::kCredentials)) + { + err = DataModel::Decode(reader, credentials); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace LockOperation. +namespace LockOperationError { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationError), operationError)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + return aWriter.EndContainer(outer); +} + +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::kLockOperationType)) + { + err = DataModel::Decode(reader, lockOperationType); + } + else if (__context_tag == to_underlying(Fields::kOperationSource)) + { + err = DataModel::Decode(reader, operationSource); + } + else if (__context_tag == to_underlying(Fields::kOperationError)) + { + err = DataModel::Decode(reader, operationError); + } + else if (__context_tag == to_underlying(Fields::kUserIndex)) + { + err = DataModel::Decode(reader, userIndex); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else if (__context_tag == to_underlying(Fields::kSourceNode)) + { + err = DataModel::Decode(reader, sourceNode); + } + else if (__context_tag == to_underlying(Fields::kCredentials)) + { + err = DataModel::Decode(reader, credentials); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace LockOperationError. +namespace LockUserChange { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockDataType), lockDataType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataOperationType), dataOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataIndex), dataIndex)); + return aWriter.EndContainer(outer); +} + +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::kLockDataType)) + { + err = DataModel::Decode(reader, lockDataType); + } + else if (__context_tag == to_underlying(Fields::kDataOperationType)) + { + err = DataModel::Decode(reader, dataOperationType); + } + else if (__context_tag == to_underlying(Fields::kOperationSource)) + { + err = DataModel::Decode(reader, operationSource); + } + else if (__context_tag == to_underlying(Fields::kUserIndex)) + { + err = DataModel::Decode(reader, userIndex); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else if (__context_tag == to_underlying(Fields::kSourceNode)) + { + err = DataModel::Decode(reader, sourceNode); + } + else if (__context_tag == to_underlying(Fields::kDataIndex)) + { + err = DataModel::Decode(reader, dataIndex); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace LockUserChange. +} // namespace Events + +} // namespace DoorLock +namespace WindowCovering { + +namespace Commands { +namespace UpOrOpen { +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 UpOrOpen. +namespace DownOrClose { +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 DownOrClose. +namespace StopMotion { +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 StopMotion. +namespace GoToLiftValue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLiftValue), liftValue); + 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::kLiftValue)) + { + err = DataModel::Decode(reader, liftValue); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GoToLiftValue. +namespace GoToLiftPercentage { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLiftPercent100thsValue), liftPercent100thsValue); + 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::kLiftPercent100thsValue)) + { + err = DataModel::Decode(reader, liftPercent100thsValue); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GoToLiftPercentage. +namespace GoToTiltValue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTiltValue), tiltValue); + 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::kTiltValue)) + { + err = DataModel::Decode(reader, tiltValue); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GoToTiltValue. +namespace GoToTiltPercentage { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTiltPercent100thsValue), tiltPercent100thsValue); + 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::kTiltPercent100thsValue)) + { + err = DataModel::Decode(reader, tiltPercent100thsValue); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GoToTiltPercentage. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Type::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, type); + case Attributes::PhysicalClosedLimitLift::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalClosedLimitLift); + case Attributes::PhysicalClosedLimitTilt::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalClosedLimitTilt); + case Attributes::CurrentPositionLift::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionLift); + case Attributes::CurrentPositionTilt::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionTilt); + case Attributes::NumberOfActuationsLift::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfActuationsLift); + case Attributes::NumberOfActuationsTilt::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfActuationsTilt); + case Attributes::ConfigStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, configStatus); + case Attributes::CurrentPositionLiftPercentage::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionLiftPercentage); + case Attributes::CurrentPositionTiltPercentage::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionTiltPercentage); + case Attributes::OperationalStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalStatus); + case Attributes::TargetPositionLiftPercent100ths::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetPositionLiftPercent100ths); + case Attributes::TargetPositionTiltPercent100ths::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetPositionTiltPercent100ths); + case Attributes::EndProductType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, endProductType); + case Attributes::CurrentPositionLiftPercent100ths::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionLiftPercent100ths); + case Attributes::CurrentPositionTiltPercent100ths::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPositionTiltPercent100ths); + case Attributes::InstalledOpenLimitLift::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, installedOpenLimitLift); + case Attributes::InstalledClosedLimitLift::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, installedClosedLimitLift); + case Attributes::InstalledOpenLimitTilt::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, installedOpenLimitTilt); + case Attributes::InstalledClosedLimitTilt::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, installedClosedLimitTilt); + case Attributes::Mode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, mode); + case Attributes::SafetyStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, safetyStatus); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace WindowCovering +namespace BarrierControl { + +namespace Commands { +namespace BarrierControlGoToPercent { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPercentOpen), percentOpen); + 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::kPercentOpen)) + { + err = DataModel::Decode(reader, percentOpen); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace BarrierControlGoToPercent. +namespace BarrierControlStop { +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 BarrierControlStop. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::BarrierMovingState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierMovingState); + case Attributes::BarrierSafetyStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierSafetyStatus); + case Attributes::BarrierCapabilities::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierCapabilities); + case Attributes::BarrierOpenEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierOpenEvents); + case Attributes::BarrierCloseEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierCloseEvents); + case Attributes::BarrierCommandOpenEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierCommandOpenEvents); + case Attributes::BarrierCommandCloseEvents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierCommandCloseEvents); + case Attributes::BarrierOpenPeriod::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierOpenPeriod); + case Attributes::BarrierClosePeriod::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierClosePeriod); + case Attributes::BarrierPosition::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, barrierPosition); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace BarrierControl +namespace PumpConfigurationAndControl { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MaxPressure::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPressure); + case Attributes::MaxSpeed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxSpeed); + case Attributes::MaxFlow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxFlow); + case Attributes::MinConstPressure::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minConstPressure); + case Attributes::MaxConstPressure::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxConstPressure); + case Attributes::MinCompPressure::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minCompPressure); + case Attributes::MaxCompPressure::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxCompPressure); + case Attributes::MinConstSpeed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minConstSpeed); + case Attributes::MaxConstSpeed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxConstSpeed); + case Attributes::MinConstFlow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minConstFlow); + case Attributes::MaxConstFlow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxConstFlow); + case Attributes::MinConstTemp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minConstTemp); + case Attributes::MaxConstTemp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxConstTemp); + case Attributes::PumpStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, pumpStatus); + case Attributes::EffectiveOperationMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, effectiveOperationMode); + case Attributes::EffectiveControlMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, effectiveControlMode); + case Attributes::Capacity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, capacity); + case Attributes::Speed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, speed); + case Attributes::LifetimeRunningHours::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lifetimeRunningHours); + case Attributes::Power::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, power); + case Attributes::LifetimeEnergyConsumed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lifetimeEnergyConsumed); + case Attributes::OperationMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationMode); + case Attributes::ControlMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, controlMode); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace SupplyVoltageLow { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 SupplyVoltageLow. +namespace SupplyVoltageHigh { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 SupplyVoltageHigh. +namespace PowerMissingPhase { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 PowerMissingPhase. +namespace SystemPressureLow { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 SystemPressureLow. +namespace SystemPressureHigh { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 SystemPressureHigh. +namespace DryRunning { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 DryRunning. +namespace MotorTemperatureHigh { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 MotorTemperatureHigh. +namespace PumpMotorFatalFailure { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 PumpMotorFatalFailure. +namespace ElectronicTemperatureHigh { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 ElectronicTemperatureHigh. +namespace PumpBlocked { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 PumpBlocked. +namespace SensorFailure { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 SensorFailure. +namespace ElectronicNonFatalFailure { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 ElectronicNonFatalFailure. +namespace ElectronicFatalFailure { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 ElectronicFatalFailure. +namespace GeneralFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 GeneralFault. +namespace Leakage { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 Leakage. +namespace AirDetection { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 AirDetection. +namespace TurbineOperation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +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 TurbineOperation. +} // namespace Events + +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Structs { + +namespace WeeklyScheduleTransitionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kHeatSetpoint), heatSetpoint); + encoder.Encode(to_underlying(Fields::kCoolSetpoint), coolSetpoint); + 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::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kHeatSetpoint)) + { + err = DataModel::Decode(reader, heatSetpoint); + } + else if (__context_tag == to_underlying(Fields::kCoolSetpoint)) + { + err = DataModel::Decode(reader, coolSetpoint); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace WeeklyScheduleTransitionStruct +} // namespace Structs + +namespace Commands { +namespace SetpointRaiseLower { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMode), mode); + encoder.Encode(to_underlying(Fields::kAmount), amount); + 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::kMode)) + { + err = DataModel::Decode(reader, mode); + } + else if (__context_tag == to_underlying(Fields::kAmount)) + { + err = DataModel::Decode(reader, amount); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetpointRaiseLower. +namespace GetWeeklyScheduleResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); + encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); + encoder.Encode(to_underlying(Fields::kTransitions), transitions); + 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::kNumberOfTransitionsForSequence)) + { + err = DataModel::Decode(reader, numberOfTransitionsForSequence); + } + else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) + { + err = DataModel::Decode(reader, dayOfWeekForSequence); + } + else if (__context_tag == to_underlying(Fields::kModeForSequence)) + { + err = DataModel::Decode(reader, modeForSequence); + } + else if (__context_tag == to_underlying(Fields::kTransitions)) + { + err = DataModel::Decode(reader, transitions); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GetWeeklyScheduleResponse. +namespace SetWeeklySchedule { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); + encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); + encoder.Encode(to_underlying(Fields::kTransitions), transitions); + 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::kNumberOfTransitionsForSequence)) + { + err = DataModel::Decode(reader, numberOfTransitionsForSequence); + } + else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) + { + err = DataModel::Decode(reader, dayOfWeekForSequence); + } + else if (__context_tag == to_underlying(Fields::kModeForSequence)) + { + err = DataModel::Decode(reader, modeForSequence); + } + else if (__context_tag == to_underlying(Fields::kTransitions)) + { + err = DataModel::Decode(reader, transitions); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetWeeklySchedule. +namespace GetWeeklySchedule { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDaysToReturn), daysToReturn); + encoder.Encode(to_underlying(Fields::kModeToReturn), modeToReturn); + 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::kDaysToReturn)) + { + err = DataModel::Decode(reader, daysToReturn); + } + else if (__context_tag == to_underlying(Fields::kModeToReturn)) + { + err = DataModel::Decode(reader, modeToReturn); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GetWeeklySchedule. +namespace ClearWeeklySchedule { +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 ClearWeeklySchedule. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::LocalTemperature::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, localTemperature); + case Attributes::OutdoorTemperature::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, outdoorTemperature); + case Attributes::Occupancy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupancy); + case Attributes::AbsMinHeatSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMinHeatSetpointLimit); + case Attributes::AbsMaxHeatSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMaxHeatSetpointLimit); + case Attributes::AbsMinCoolSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMinCoolSetpointLimit); + case Attributes::AbsMaxCoolSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, absMaxCoolSetpointLimit); + case Attributes::PICoolingDemand::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PICoolingDemand); + case Attributes::PIHeatingDemand::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PIHeatingDemand); + case Attributes::HVACSystemTypeConfiguration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, HVACSystemTypeConfiguration); + case Attributes::LocalTemperatureCalibration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, localTemperatureCalibration); + case Attributes::OccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupiedCoolingSetpoint); + case Attributes::OccupiedHeatingSetpoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupiedHeatingSetpoint); + case Attributes::UnoccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, unoccupiedCoolingSetpoint); + case Attributes::UnoccupiedHeatingSetpoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, unoccupiedHeatingSetpoint); + case Attributes::MinHeatSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minHeatSetpointLimit); + case Attributes::MaxHeatSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxHeatSetpointLimit); + case Attributes::MinCoolSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minCoolSetpointLimit); + case Attributes::MaxCoolSetpointLimit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxCoolSetpointLimit); + case Attributes::MinSetpointDeadBand::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minSetpointDeadBand); + case Attributes::RemoteSensing::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remoteSensing); + case Attributes::ControlSequenceOfOperation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, controlSequenceOfOperation); + case Attributes::SystemMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, systemMode); + case Attributes::ThermostatRunningMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, thermostatRunningMode); + case Attributes::StartOfWeek::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startOfWeek); + case Attributes::NumberOfWeeklyTransitions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfWeeklyTransitions); + case Attributes::NumberOfDailyTransitions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfDailyTransitions); + case Attributes::TemperatureSetpointHold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureSetpointHold); + case Attributes::TemperatureSetpointHoldDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureSetpointHoldDuration); + case Attributes::ThermostatProgrammingOperationMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, thermostatProgrammingOperationMode); + case Attributes::ThermostatRunningState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, thermostatRunningState); + case Attributes::SetpointChangeSource::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setpointChangeSource); + case Attributes::SetpointChangeAmount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setpointChangeAmount); + case Attributes::SetpointChangeSourceTimestamp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setpointChangeSourceTimestamp); + case Attributes::OccupiedSetback::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupiedSetback); + case Attributes::OccupiedSetbackMin::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupiedSetbackMin); + case Attributes::OccupiedSetbackMax::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupiedSetbackMax); + case Attributes::UnoccupiedSetback::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, unoccupiedSetback); + case Attributes::UnoccupiedSetbackMin::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, unoccupiedSetbackMin); + case Attributes::UnoccupiedSetbackMax::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, unoccupiedSetbackMax); + case Attributes::EmergencyHeatDelta::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, emergencyHeatDelta); + case Attributes::ACType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACType); + case Attributes::ACCapacity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACCapacity); + case Attributes::ACRefrigerantType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACRefrigerantType); + case Attributes::ACCompressorType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACCompressorType); + case Attributes::ACErrorCode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACErrorCode); + case Attributes::ACLouverPosition::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACLouverPosition); + case Attributes::ACCoilTemperature::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACCoilTemperature); + case Attributes::ACCapacityformat::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ACCapacityformat); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Thermostat +namespace FanControl { + +namespace Commands { +namespace Step { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDirection), direction); + encoder.Encode(to_underlying(Fields::kWrap), wrap); + encoder.Encode(to_underlying(Fields::kLowestOff), lowestOff); + 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::kDirection)) + { + err = DataModel::Decode(reader, direction); + } + else if (__context_tag == to_underlying(Fields::kWrap)) + { + err = DataModel::Decode(reader, wrap); + } + else if (__context_tag == to_underlying(Fields::kLowestOff)) + { + err = DataModel::Decode(reader, lowestOff); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace Step. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::FanMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fanMode); + case Attributes::FanModeSequence::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fanModeSequence); + case Attributes::PercentSetting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, percentSetting); + case Attributes::PercentCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, percentCurrent); + case Attributes::SpeedMax::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, speedMax); + case Attributes::SpeedSetting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, speedSetting); + case Attributes::SpeedCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, speedCurrent); + case Attributes::RockSupport::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rockSupport); + case Attributes::RockSetting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rockSetting); + case Attributes::WindSupport::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, windSupport); + case Attributes::WindSetting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, windSetting); + case Attributes::AirflowDirection::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, airflowDirection); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace FanControl +namespace ThermostatUserInterfaceConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::TemperatureDisplayMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureDisplayMode); + case Attributes::KeypadLockout::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, keypadLockout); + case Attributes::ScheduleProgrammingVisibility::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scheduleProgrammingVisibility); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { + +namespace Commands { +namespace MoveToHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kHue), hue); + encoder.Encode(to_underlying(Fields::kDirection), direction); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kHue)) + { + err = DataModel::Decode(reader, hue); + } + else if (__context_tag == to_underlying(Fields::kDirection)) + { + err = DataModel::Decode(reader, direction); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveToHue. +namespace MoveHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kMoveMode)) + { + err = DataModel::Decode(reader, moveMode); + } + else if (__context_tag == to_underlying(Fields::kRate)) + { + err = DataModel::Decode(reader, rate); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveHue. +namespace StepHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kStepMode)) + { + err = DataModel::Decode(reader, stepMode); + } + else if (__context_tag == to_underlying(Fields::kStepSize)) + { + err = DataModel::Decode(reader, stepSize); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StepHue. +namespace MoveToSaturation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kSaturation), saturation); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kSaturation)) + { + err = DataModel::Decode(reader, saturation); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveToSaturation. +namespace MoveSaturation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kMoveMode)) + { + err = DataModel::Decode(reader, moveMode); + } + else if (__context_tag == to_underlying(Fields::kRate)) + { + err = DataModel::Decode(reader, rate); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveSaturation. +namespace StepSaturation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kStepMode)) + { + err = DataModel::Decode(reader, stepMode); + } + else if (__context_tag == to_underlying(Fields::kStepSize)) + { + err = DataModel::Decode(reader, stepSize); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StepSaturation. +namespace MoveToHueAndSaturation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kHue), hue); + encoder.Encode(to_underlying(Fields::kSaturation), saturation); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kHue)) + { + err = DataModel::Decode(reader, hue); + } + else if (__context_tag == to_underlying(Fields::kSaturation)) + { + err = DataModel::Decode(reader, saturation); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveToHueAndSaturation. +namespace MoveToColor { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kColorX), colorX); + encoder.Encode(to_underlying(Fields::kColorY), colorY); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kColorX)) + { + err = DataModel::Decode(reader, colorX); + } + else if (__context_tag == to_underlying(Fields::kColorY)) + { + err = DataModel::Decode(reader, colorY); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveToColor. +namespace MoveColor { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kRateX), rateX); + encoder.Encode(to_underlying(Fields::kRateY), rateY); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kRateX)) + { + err = DataModel::Decode(reader, rateX); + } + else if (__context_tag == to_underlying(Fields::kRateY)) + { + err = DataModel::Decode(reader, rateY); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveColor. +namespace StepColor { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStepX), stepX); + encoder.Encode(to_underlying(Fields::kStepY), stepY); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kStepX)) + { + err = DataModel::Decode(reader, stepX); + } + else if (__context_tag == to_underlying(Fields::kStepY)) + { + err = DataModel::Decode(reader, stepY); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StepColor. +namespace MoveToColorTemperature { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kColorTemperatureMireds), colorTemperatureMireds); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kColorTemperatureMireds)) + { + err = DataModel::Decode(reader, colorTemperatureMireds); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveToColorTemperature. +namespace EnhancedMoveToHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kEnhancedHue), enhancedHue); + encoder.Encode(to_underlying(Fields::kDirection), direction); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kEnhancedHue)) + { + err = DataModel::Decode(reader, enhancedHue); + } + else if (__context_tag == to_underlying(Fields::kDirection)) + { + err = DataModel::Decode(reader, direction); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace EnhancedMoveToHue. +namespace EnhancedMoveHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kMoveMode)) + { + err = DataModel::Decode(reader, moveMode); + } + else if (__context_tag == to_underlying(Fields::kRate)) + { + err = DataModel::Decode(reader, rate); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace EnhancedMoveHue. +namespace EnhancedStepHue { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kStepMode)) + { + err = DataModel::Decode(reader, stepMode); + } + else if (__context_tag == to_underlying(Fields::kStepSize)) + { + err = DataModel::Decode(reader, stepSize); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace EnhancedStepHue. +namespace EnhancedMoveToHueAndSaturation { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kEnhancedHue), enhancedHue); + encoder.Encode(to_underlying(Fields::kSaturation), saturation); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kEnhancedHue)) + { + err = DataModel::Decode(reader, enhancedHue); + } + else if (__context_tag == to_underlying(Fields::kSaturation)) + { + err = DataModel::Decode(reader, saturation); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace EnhancedMoveToHueAndSaturation. +namespace ColorLoopSet { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kUpdateFlags), updateFlags); + encoder.Encode(to_underlying(Fields::kAction), action); + encoder.Encode(to_underlying(Fields::kDirection), direction); + encoder.Encode(to_underlying(Fields::kTime), time); + encoder.Encode(to_underlying(Fields::kStartHue), startHue); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kUpdateFlags)) + { + err = DataModel::Decode(reader, updateFlags); + } + else if (__context_tag == to_underlying(Fields::kAction)) + { + err = DataModel::Decode(reader, action); + } + else if (__context_tag == to_underlying(Fields::kDirection)) + { + err = DataModel::Decode(reader, direction); + } + else if (__context_tag == to_underlying(Fields::kTime)) + { + err = DataModel::Decode(reader, time); + } + else if (__context_tag == to_underlying(Fields::kStartHue)) + { + err = DataModel::Decode(reader, startHue); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ColorLoopSet. +namespace StopMoveStep { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StopMoveStep. +namespace MoveColorTemperature { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds); + encoder.Encode(to_underlying(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kMoveMode)) + { + err = DataModel::Decode(reader, moveMode); + } + else if (__context_tag == to_underlying(Fields::kRate)) + { + err = DataModel::Decode(reader, rate); + } + else if (__context_tag == to_underlying(Fields::kColorTemperatureMinimumMireds)) + { + err = DataModel::Decode(reader, colorTemperatureMinimumMireds); + } + else if (__context_tag == to_underlying(Fields::kColorTemperatureMaximumMireds)) + { + err = DataModel::Decode(reader, colorTemperatureMaximumMireds); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace MoveColorTemperature. +namespace StepColorTemperature { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds); + encoder.Encode(to_underlying(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + 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::kStepMode)) + { + err = DataModel::Decode(reader, stepMode); + } + else if (__context_tag == to_underlying(Fields::kStepSize)) + { + err = DataModel::Decode(reader, stepSize); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kColorTemperatureMinimumMireds)) + { + err = DataModel::Decode(reader, colorTemperatureMinimumMireds); + } + else if (__context_tag == to_underlying(Fields::kColorTemperatureMaximumMireds)) + { + err = DataModel::Decode(reader, colorTemperatureMaximumMireds); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StepColorTemperature. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::CurrentHue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentHue); + case Attributes::CurrentSaturation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentSaturation); + case Attributes::RemainingTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remainingTime); + case Attributes::CurrentX::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentX); + case Attributes::CurrentY::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentY); + case Attributes::DriftCompensation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, driftCompensation); + case Attributes::CompensationText::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, compensationText); + case Attributes::ColorTemperatureMireds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorTemperatureMireds); + case Attributes::ColorMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorMode); + case Attributes::Options::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, options); + case Attributes::NumberOfPrimaries::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfPrimaries); + case Attributes::Primary1X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary1X); + case Attributes::Primary1Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary1Y); + case Attributes::Primary1Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary1Intensity); + case Attributes::Primary2X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary2X); + case Attributes::Primary2Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary2Y); + case Attributes::Primary2Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary2Intensity); + case Attributes::Primary3X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary3X); + case Attributes::Primary3Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary3Y); + case Attributes::Primary3Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary3Intensity); + case Attributes::Primary4X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary4X); + case Attributes::Primary4Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary4Y); + case Attributes::Primary4Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary4Intensity); + case Attributes::Primary5X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary5X); + case Attributes::Primary5Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary5Y); + case Attributes::Primary5Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary5Intensity); + case Attributes::Primary6X::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary6X); + case Attributes::Primary6Y::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary6Y); + case Attributes::Primary6Intensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, primary6Intensity); + case Attributes::WhitePointX::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, whitePointX); + case Attributes::WhitePointY::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, whitePointY); + case Attributes::ColorPointRX::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointRX); + case Attributes::ColorPointRY::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointRY); + case Attributes::ColorPointRIntensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointRIntensity); + case Attributes::ColorPointGX::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointGX); + case Attributes::ColorPointGY::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointGY); + case Attributes::ColorPointGIntensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointGIntensity); + case Attributes::ColorPointBX::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointBX); + case Attributes::ColorPointBY::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointBY); + case Attributes::ColorPointBIntensity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorPointBIntensity); + case Attributes::EnhancedCurrentHue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enhancedCurrentHue); + case Attributes::EnhancedColorMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enhancedColorMode); + case Attributes::ColorLoopActive::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorLoopActive); + case Attributes::ColorLoopDirection::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorLoopDirection); + case Attributes::ColorLoopTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorLoopTime); + case Attributes::ColorLoopStartEnhancedHue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorLoopStartEnhancedHue); + case Attributes::ColorLoopStoredEnhancedHue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorLoopStoredEnhancedHue); + case Attributes::ColorCapabilities::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorCapabilities); + case Attributes::ColorTempPhysicalMinMireds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorTempPhysicalMinMireds); + case Attributes::ColorTempPhysicalMaxMireds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, colorTempPhysicalMaxMireds); + case Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, coupleColorTempToLevelMinMireds); + case Attributes::StartUpColorTemperatureMireds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpColorTemperatureMireds); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ColorControl +namespace BallastConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::PhysicalMinLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalMinLevel); + case Attributes::PhysicalMaxLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalMaxLevel); + case Attributes::BallastStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ballastStatus); + case Attributes::MinLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minLevel); + case Attributes::MaxLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxLevel); + case Attributes::IntrinsicBallastFactor::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, intrinsicBallastFactor); + case Attributes::BallastFactorAdjustment::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ballastFactorAdjustment); + case Attributes::LampQuantity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampQuantity); + case Attributes::LampType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampType); + case Attributes::LampManufacturer::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampManufacturer); + case Attributes::LampRatedHours::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampRatedHours); + case Attributes::LampBurnHours::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampBurnHours); + case Attributes::LampAlarmMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampAlarmMode); + case Attributes::LampBurnHoursTripPoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lampBurnHoursTripPoint); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::Tolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tolerance); + case Attributes::LightSensorType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lightSensorType); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace IlluminanceMeasurement +namespace TemperatureMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::Tolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tolerance); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace TemperatureMeasurement +namespace PressureMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::Tolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tolerance); + case Attributes::ScaledValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scaledValue); + case Attributes::MinScaledValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minScaledValue); + case Attributes::MaxScaledValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxScaledValue); + case Attributes::ScaledTolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scaledTolerance); + case Attributes::Scale::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scale); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace PressureMeasurement +namespace FlowMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::Tolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tolerance); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::Tolerance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tolerance); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Occupancy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupancy); + case Attributes::OccupancySensorType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupancySensorType); + case Attributes::OccupancySensorTypeBitmap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, occupancySensorTypeBitmap); + case Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PIROccupiedToUnoccupiedDelay); + case Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PIRUnoccupiedToOccupiedDelay); + case Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PIRUnoccupiedToOccupiedThreshold); + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ultrasonicOccupiedToUnoccupiedDelay); + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ultrasonicUnoccupiedToOccupiedDelay); + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ultrasonicUnoccupiedToOccupiedThreshold); + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalContactOccupiedToUnoccupiedDelay); + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalContactUnoccupiedToOccupiedDelay); + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, physicalContactUnoccupiedToOccupiedThreshold); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OccupancySensing +namespace CarbonMonoxideConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace CarbonMonoxideConcentrationMeasurement +namespace CarbonDioxideConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace CarbonDioxideConcentrationMeasurement +namespace NitrogenDioxideConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace NitrogenDioxideConcentrationMeasurement +namespace OzoneConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OzoneConcentrationMeasurement +namespace Pm25ConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Pm25ConcentrationMeasurement +namespace FormaldehydeConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace FormaldehydeConcentrationMeasurement +namespace Pm1ConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Pm1ConcentrationMeasurement +namespace Pm10ConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Pm10ConcentrationMeasurement +namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::Tolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tolerance); - case Attributes::LightSensorType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lightSensorType); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement +namespace RadonConcentrationMeasurement { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measuredValue); + case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minMeasuredValue); + case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxMeasuredValue); + case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValue); + case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, peakMeasuredValueWindow); + case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValue); + case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, averageMeasuredValueWindow); + case Attributes::Uncertainty::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uncertainty); + case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementUnit); + case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, measurementMedium); + case Attributes::LevelValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, levelValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace RadonConcentrationMeasurement +namespace WakeOnLan { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::MACAddress::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, MACAddress); + case Attributes::LinkLocalAddress::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, linkLocalAddress); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -17317,28 +21307,870 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return CHIP_NO_ERROR; } } -} // namespace Attributes +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace WakeOnLan +namespace Channel { +namespace Structs { + +namespace ProgramCastStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kRole), role); + 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::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kRole)) + { + err = DataModel::Decode(reader, role); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ProgramCastStruct + +namespace ProgramCategoryStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCategory), category); + encoder.Encode(to_underlying(Fields::kSubCategory), subCategory); + 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::kCategory)) + { + err = DataModel::Decode(reader, category); + } + else if (__context_tag == to_underlying(Fields::kSubCategory)) + { + err = DataModel::Decode(reader, subCategory); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ProgramCategoryStruct + +namespace SeriesInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kSeason), season); + encoder.Encode(to_underlying(Fields::kEpisode), episode); + 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::kSeason)) + { + err = DataModel::Decode(reader, season); + } + else if (__context_tag == to_underlying(Fields::kEpisode)) + { + err = DataModel::Decode(reader, episode); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace SeriesInfoStruct + +namespace ChannelInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMajorNumber), majorNumber); + encoder.Encode(to_underlying(Fields::kMinorNumber), minorNumber); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kCallSign), callSign); + encoder.Encode(to_underlying(Fields::kAffiliateCallSign), affiliateCallSign); + encoder.Encode(to_underlying(Fields::kIdentifier), identifier); + encoder.Encode(to_underlying(Fields::kType), type); + 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::kMajorNumber)) + { + err = DataModel::Decode(reader, majorNumber); + } + else if (__context_tag == to_underlying(Fields::kMinorNumber)) + { + err = DataModel::Decode(reader, minorNumber); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kCallSign)) + { + err = DataModel::Decode(reader, callSign); + } + else if (__context_tag == to_underlying(Fields::kAffiliateCallSign)) + { + err = DataModel::Decode(reader, affiliateCallSign); + } + else if (__context_tag == to_underlying(Fields::kIdentifier)) + { + err = DataModel::Decode(reader, identifier); + } + else if (__context_tag == to_underlying(Fields::kType)) + { + err = DataModel::Decode(reader, type); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ChannelInfoStruct + +namespace ProgramStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIdentifier), identifier); + encoder.Encode(to_underlying(Fields::kChannel), channel); + encoder.Encode(to_underlying(Fields::kStartTime), startTime); + encoder.Encode(to_underlying(Fields::kEndTime), endTime); + encoder.Encode(to_underlying(Fields::kTitle), title); + encoder.Encode(to_underlying(Fields::kSubtitle), subtitle); + encoder.Encode(to_underlying(Fields::kDescription), description); + encoder.Encode(to_underlying(Fields::kAudioLanguages), audioLanguages); + encoder.Encode(to_underlying(Fields::kRatings), ratings); + encoder.Encode(to_underlying(Fields::kThumbnailUrl), thumbnailUrl); + encoder.Encode(to_underlying(Fields::kPosterArtUrl), posterArtUrl); + encoder.Encode(to_underlying(Fields::kDvbiUrl), dvbiUrl); + encoder.Encode(to_underlying(Fields::kReleaseDate), releaseDate); + encoder.Encode(to_underlying(Fields::kParentalGuidanceText), parentalGuidanceText); + encoder.Encode(to_underlying(Fields::kRecordingFlag), recordingFlag); + encoder.Encode(to_underlying(Fields::kSeriesInfo), seriesInfo); + encoder.Encode(to_underlying(Fields::kCategoryList), categoryList); + encoder.Encode(to_underlying(Fields::kCastList), castList); + encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); + 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::kIdentifier)) + { + err = DataModel::Decode(reader, identifier); + } + else if (__context_tag == to_underlying(Fields::kChannel)) + { + err = DataModel::Decode(reader, channel); + } + else if (__context_tag == to_underlying(Fields::kStartTime)) + { + err = DataModel::Decode(reader, startTime); + } + else if (__context_tag == to_underlying(Fields::kEndTime)) + { + err = DataModel::Decode(reader, endTime); + } + else if (__context_tag == to_underlying(Fields::kTitle)) + { + err = DataModel::Decode(reader, title); + } + else if (__context_tag == to_underlying(Fields::kSubtitle)) + { + err = DataModel::Decode(reader, subtitle); + } + else if (__context_tag == to_underlying(Fields::kDescription)) + { + err = DataModel::Decode(reader, description); + } + else if (__context_tag == to_underlying(Fields::kAudioLanguages)) + { + err = DataModel::Decode(reader, audioLanguages); + } + else if (__context_tag == to_underlying(Fields::kRatings)) + { + err = DataModel::Decode(reader, ratings); + } + else if (__context_tag == to_underlying(Fields::kThumbnailUrl)) + { + err = DataModel::Decode(reader, thumbnailUrl); + } + else if (__context_tag == to_underlying(Fields::kPosterArtUrl)) + { + err = DataModel::Decode(reader, posterArtUrl); + } + else if (__context_tag == to_underlying(Fields::kDvbiUrl)) + { + err = DataModel::Decode(reader, dvbiUrl); + } + else if (__context_tag == to_underlying(Fields::kReleaseDate)) + { + err = DataModel::Decode(reader, releaseDate); + } + else if (__context_tag == to_underlying(Fields::kParentalGuidanceText)) + { + err = DataModel::Decode(reader, parentalGuidanceText); + } + else if (__context_tag == to_underlying(Fields::kRecordingFlag)) + { + err = DataModel::Decode(reader, recordingFlag); + } + else if (__context_tag == to_underlying(Fields::kSeriesInfo)) + { + err = DataModel::Decode(reader, seriesInfo); + } + else if (__context_tag == to_underlying(Fields::kCategoryList)) + { + err = DataModel::Decode(reader, categoryList); + } + else if (__context_tag == to_underlying(Fields::kCastList)) + { + err = DataModel::Decode(reader, castList); + } + else if (__context_tag == to_underlying(Fields::kExternalIDList)) + { + err = DataModel::Decode(reader, externalIDList); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ProgramStruct + +namespace PageTokenStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLimit), limit); + encoder.Encode(to_underlying(Fields::kAfter), after); + encoder.Encode(to_underlying(Fields::kBefore), before); + 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::kLimit)) + { + err = DataModel::Decode(reader, limit); + } + else if (__context_tag == to_underlying(Fields::kAfter)) + { + err = DataModel::Decode(reader, after); + } + else if (__context_tag == to_underlying(Fields::kBefore)) + { + err = DataModel::Decode(reader, before); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace PageTokenStruct + +namespace ChannelPagingStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPreviousToken), previousToken); + encoder.Encode(to_underlying(Fields::kNextToken), nextToken); + 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::kPreviousToken)) + { + err = DataModel::Decode(reader, previousToken); + } + else if (__context_tag == to_underlying(Fields::kNextToken)) + { + err = DataModel::Decode(reader, nextToken); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ChannelPagingStruct + +namespace AdditionalInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kValue), value); + 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::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace AdditionalInfoStruct + +namespace LineupInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kOperatorName), operatorName); + encoder.Encode(to_underlying(Fields::kLineupName), lineupName); + encoder.Encode(to_underlying(Fields::kPostalCode), postalCode); + encoder.Encode(to_underlying(Fields::kLineupInfoType), lineupInfoType); + 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::kOperatorName)) + { + err = DataModel::Decode(reader, operatorName); + } + else if (__context_tag == to_underlying(Fields::kLineupName)) + { + err = DataModel::Decode(reader, lineupName); + } + else if (__context_tag == to_underlying(Fields::kPostalCode)) + { + err = DataModel::Decode(reader, postalCode); + } + else if (__context_tag == to_underlying(Fields::kLineupInfoType)) + { + err = DataModel::Decode(reader, lineupInfoType); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace LineupInfoStruct +} // namespace Structs + +namespace Commands { +namespace ChangeChannel { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMatch), match); + 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::kMatch)) + { + err = DataModel::Decode(reader, match); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeChannel. +namespace ChangeChannelResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeChannelResponse. +namespace ChangeChannelByNumber { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMajorNumber), majorNumber); + encoder.Encode(to_underlying(Fields::kMinorNumber), minorNumber); + 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::kMajorNumber)) + { + err = DataModel::Decode(reader, majorNumber); + } + else if (__context_tag == to_underlying(Fields::kMinorNumber)) + { + err = DataModel::Decode(reader, minorNumber); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeChannelByNumber. +namespace SkipChannel { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCount), count); + 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::kCount)) + { + err = DataModel::Decode(reader, count); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SkipChannel. +namespace GetProgramGuide { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStartTime), startTime); + encoder.Encode(to_underlying(Fields::kEndTime), endTime); + encoder.Encode(to_underlying(Fields::kChannelList), channelList); + encoder.Encode(to_underlying(Fields::kPageToken), pageToken); + encoder.Encode(to_underlying(Fields::kRecordingFlag), recordingFlag); + encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kStartTime)) + { + err = DataModel::Decode(reader, startTime); + } + else if (__context_tag == to_underlying(Fields::kEndTime)) + { + err = DataModel::Decode(reader, endTime); + } + else if (__context_tag == to_underlying(Fields::kChannelList)) + { + err = DataModel::Decode(reader, channelList); + } + else if (__context_tag == to_underlying(Fields::kPageToken)) + { + err = DataModel::Decode(reader, pageToken); + } + else if (__context_tag == to_underlying(Fields::kRecordingFlag)) + { + err = DataModel::Decode(reader, recordingFlag); + } + else if (__context_tag == to_underlying(Fields::kExternalIDList)) + { + err = DataModel::Decode(reader, externalIDList); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GetProgramGuide. +namespace ProgramGuideResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kChannelPagingStruct), channelPagingStruct); + encoder.Encode(to_underlying(Fields::kProgramList), programList); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 IlluminanceMeasurement -namespace TemperatureMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kChannelPagingStruct)) + { + err = DataModel::Decode(reader, channelPagingStruct); + } + else if (__context_tag == to_underlying(Fields::kProgramList)) + { + err = DataModel::Decode(reader, programList); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ProgramGuideResponse. +namespace RecordProgram { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kProgramIdentifier), programIdentifier); + encoder.Encode(to_underlying(Fields::kShouldRecordSeries), shouldRecordSeries); + encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kProgramIdentifier)) + { + err = DataModel::Decode(reader, programIdentifier); + } + else if (__context_tag == to_underlying(Fields::kShouldRecordSeries)) + { + err = DataModel::Decode(reader, shouldRecordSeries); + } + else if (__context_tag == to_underlying(Fields::kExternalIDList)) + { + err = DataModel::Decode(reader, externalIDList); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace RecordProgram. +namespace CancelRecordProgram { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kProgramIdentifier), programIdentifier); + encoder.Encode(to_underlying(Fields::kShouldRecordSeries), shouldRecordSeries); + encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kProgramIdentifier)) + { + err = DataModel::Decode(reader, programIdentifier); + } + else if (__context_tag == to_underlying(Fields::kShouldRecordSeries)) + { + err = DataModel::Decode(reader, shouldRecordSeries); + } + else if (__context_tag == to_underlying(Fields::kExternalIDList)) + { + err = DataModel::Decode(reader, externalIDList); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace CancelRecordProgram. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::Tolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tolerance); + case Attributes::ChannelList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, channelList); + case Attributes::Lineup::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lineup); + case Attributes::CurrentChannel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentChannel); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -17359,34 +22191,142 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace TemperatureMeasurement -namespace PressureMeasurement { +} // namespace Channel +namespace TargetNavigator { +namespace Structs { -namespace Commands {} // namespace Commands +namespace TargetInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIdentifier), identifier); + encoder.Encode(to_underlying(Fields::kName), name); + 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::kIdentifier)) + { + err = DataModel::Decode(reader, identifier); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace TargetInfoStruct +} // namespace Structs + +namespace Commands { +namespace NavigateTarget { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTarget), target); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kTarget)) + { + err = DataModel::Decode(reader, target); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace NavigateTarget. +namespace NavigateTargetResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); + 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::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace NavigateTargetResponse. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::Tolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tolerance); - case Attributes::ScaledValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, scaledValue); - case Attributes::MinScaledValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minScaledValue); - case Attributes::MaxScaledValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxScaledValue); - case Attributes::ScaledTolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, scaledTolerance); - case Attributes::Scale::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, scale); + case Attributes::TargetList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetList); + case Attributes::CurrentTarget::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentTarget); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -17405,672 +22345,634 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events +namespace Events { +namespace TargetUpdated { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetList), targetList)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentTarget), currentTarget)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + return aWriter.EndContainer(outer); +} -} // namespace PressureMeasurement -namespace FlowMeasurement { +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 Commands {} // namespace Commands + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) + if (__context_tag == to_underlying(Fields::kTargetList)) + { + err = DataModel::Decode(reader, targetList); + } + else if (__context_tag == to_underlying(Fields::kCurrentTarget)) + { + err = DataModel::Decode(reader, currentTarget); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace TargetUpdated. +} // namespace Events + +} // namespace TargetNavigator +namespace MediaPlayback { +namespace Structs { + +namespace TrackAttributesStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLanguageCode), languageCode); + encoder.Encode(to_underlying(Fields::kDisplayName), displayName); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::Tolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tolerance); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + 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::kLanguageCode)) + { + err = DataModel::Decode(reader, languageCode); + } + else if (__context_tag == to_underlying(Fields::kDisplayName)) + { + err = DataModel::Decode(reader, displayName); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events -} // namespace FlowMeasurement -namespace RelativeHumidityMeasurement { +} // namespace TrackAttributesStruct -namespace Commands {} // namespace Commands +namespace TrackStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kId), id); + encoder.Encode(to_underlying(Fields::kTrackAttributes), trackAttributes); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::Tolerance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tolerance); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + 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::kId)) + { + err = DataModel::Decode(reader, id); + } + else if (__context_tag == to_underlying(Fields::kTrackAttributes)) + { + err = DataModel::Decode(reader, trackAttributes); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events -} // namespace RelativeHumidityMeasurement -namespace OccupancySensing { +} // namespace TrackStruct -namespace Commands {} // namespace Commands +namespace PlaybackPositionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kUpdatedAt), updatedAt); + encoder.Encode(to_underlying(Fields::kPosition), position); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::Occupancy::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupancy); - case Attributes::OccupancySensorType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupancySensorType); - case Attributes::OccupancySensorTypeBitmap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, occupancySensorTypeBitmap); - case Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PIROccupiedToUnoccupiedDelay); - case Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PIRUnoccupiedToOccupiedDelay); - case Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PIRUnoccupiedToOccupiedThreshold); - case Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ultrasonicOccupiedToUnoccupiedDelay); - case Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ultrasonicUnoccupiedToOccupiedDelay); - case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ultrasonicUnoccupiedToOccupiedThreshold); - case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalContactOccupiedToUnoccupiedDelay); - case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalContactUnoccupiedToOccupiedDelay); - case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, physicalContactUnoccupiedToOccupiedThreshold); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + 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::kUpdatedAt)) + { + err = DataModel::Decode(reader, updatedAt); + } + else if (__context_tag == to_underlying(Fields::kPosition)) + { + err = DataModel::Decode(reader, position); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events -} // namespace OccupancySensing -namespace CarbonMonoxideConcentrationMeasurement { +} // namespace PlaybackPositionStruct +} // namespace Structs -namespace Commands {} // namespace Commands +namespace Commands { +namespace Play { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace CarbonMonoxideConcentrationMeasurement -namespace CarbonDioxideConcentrationMeasurement { - -namespace Commands {} // namespace Commands +} // namespace Play. +namespace Pause { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace CarbonDioxideConcentrationMeasurement -namespace NitrogenDioxideConcentrationMeasurement { - -namespace Commands {} // namespace Commands +} // namespace Pause. +namespace Stop { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace NitrogenDioxideConcentrationMeasurement -namespace OzoneConcentrationMeasurement { - -namespace Commands {} // namespace Commands +} // namespace Stop. +namespace StartOver { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace OzoneConcentrationMeasurement -namespace Pm25ConcentrationMeasurement { +} // namespace StartOver. +namespace Previous { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Commands {} // namespace Commands +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 Previous. +namespace Next { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes +} // namespace Next. +namespace Rewind { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAudioAdvanceUnmuted), audioAdvanceUnmuted); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 Pm25ConcentrationMeasurement -namespace FormaldehydeConcentrationMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kAudioAdvanceUnmuted)) + { + err = DataModel::Decode(reader, audioAdvanceUnmuted); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace Rewind. +namespace FastForward { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAudioAdvanceUnmuted), audioAdvanceUnmuted); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 FormaldehydeConcentrationMeasurement -namespace Pm1ConcentrationMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kAudioAdvanceUnmuted)) + { + err = DataModel::Decode(reader, audioAdvanceUnmuted); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) + ReturnErrorOnFailure(err); + } +} +} // namespace FastForward. +namespace SkipForward { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + 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::kDeltaPositionMilliseconds)) + { + err = DataModel::Decode(reader, deltaPositionMilliseconds); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace SkipForward. +namespace SkipBackward { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 Pm1ConcentrationMeasurement -namespace Pm10ConcentrationMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kDeltaPositionMilliseconds)) + { + err = DataModel::Decode(reader, deltaPositionMilliseconds); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace SkipBackward. +namespace PlaybackResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 Pm10ConcentrationMeasurement -namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace PlaybackResponse. +namespace Seek { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPosition), position); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +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 TotalVolatileOrganicCompoundsConcentrationMeasurement -namespace RadonConcentrationMeasurement { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kPosition)) + { + err = DataModel::Decode(reader, position); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) + ReturnErrorOnFailure(err); + } +} +} // namespace Seek. +namespace ActivateAudioTrack { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTrackID), trackID); + encoder.Encode(to_underlying(Fields::kAudioOutputIndex), audioOutputIndex); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::MeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredValue); - case Attributes::MinMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minMeasuredValue); - case Attributes::MaxMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxMeasuredValue); - case Attributes::PeakMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValue); - case Attributes::PeakMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, peakMeasuredValueWindow); - case Attributes::AverageMeasuredValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValue); - case Attributes::AverageMeasuredValueWindow::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageMeasuredValueWindow); - case Attributes::Uncertainty::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uncertainty); - case Attributes::MeasurementUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementUnit); - case Attributes::MeasurementMedium::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementMedium); - case Attributes::LevelValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, levelValue); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + 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::kTrackID)) + { + err = DataModel::Decode(reader, trackID); + } + else if (__context_tag == to_underlying(Fields::kAudioOutputIndex)) + { + err = DataModel::Decode(reader, audioOutputIndex); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace ActivateAudioTrack. +namespace ActivateTextTrack { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTrackID), trackID); + 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 Events {} // namespace Events + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -} // namespace RadonConcentrationMeasurement -namespace WakeOnLan { + if (__context_tag == to_underlying(Fields::kTrackID)) + { + err = DataModel::Decode(reader, trackID); + } + else + { + } -namespace Commands {} // namespace Commands + ReturnErrorOnFailure(err); + } +} +} // namespace ActivateTextTrack. +namespace DeactivateTextTrack { +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 DeactivateTextTrack. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::MACAddress::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, MACAddress); - case Attributes::LinkLocalAddress::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, linkLocalAddress); + case Attributes::CurrentState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentState); + case Attributes::StartTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startTime); + case Attributes::Duration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, duration); + case Attributes::SampledPosition::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sampledPosition); + case Attributes::PlaybackSpeed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, playbackSpeed); + case Attributes::SeekRangeEnd::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, seekRangeEnd); + case Attributes::SeekRangeStart::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, seekRangeStart); + case Attributes::ActiveAudioTrack::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeAudioTrack); + case Attributes::AvailableAudioTracks::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, availableAudioTracks); + case Attributes::ActiveTextTrack::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeTextTrack); + case Attributes::AvailableTextTracks::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, availableTextTracks); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -18089,22 +22991,22 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace WakeOnLan -namespace Channel { -namespace Structs { - -namespace ChannelInfoStruct { +namespace Events { +namespace StateChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMajorNumber), majorNumber); - encoder.Encode(to_underlying(Fields::kMinorNumber), minorNumber); - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kCallSign), callSign); - encoder.Encode(to_underlying(Fields::kAffiliateCallSign), affiliateCallSign); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentState), currentState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartTime), startTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSampledPosition), sampledPosition)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPlaybackSpeed), playbackSpeed)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSeekRangeEnd), seekRangeEnd)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSeekRangeStart), seekRangeStart)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAudioAdvanceUnmuted), audioAdvanceUnmuted)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -18121,25 +23023,41 @@ 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::kMajorNumber)) + if (__context_tag == to_underlying(Fields::kCurrentState)) { - err = DataModel::Decode(reader, majorNumber); + err = DataModel::Decode(reader, currentState); } - else if (__context_tag == to_underlying(Fields::kMinorNumber)) + else if (__context_tag == to_underlying(Fields::kStartTime)) { - err = DataModel::Decode(reader, minorNumber); + err = DataModel::Decode(reader, startTime); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, duration); } - else if (__context_tag == to_underlying(Fields::kCallSign)) + else if (__context_tag == to_underlying(Fields::kSampledPosition)) { - err = DataModel::Decode(reader, callSign); + err = DataModel::Decode(reader, sampledPosition); } - else if (__context_tag == to_underlying(Fields::kAffiliateCallSign)) + else if (__context_tag == to_underlying(Fields::kPlaybackSpeed)) { - err = DataModel::Decode(reader, affiliateCallSign); + err = DataModel::Decode(reader, playbackSpeed); + } + else if (__context_tag == to_underlying(Fields::kSeekRangeEnd)) + { + err = DataModel::Decode(reader, seekRangeEnd); + } + else if (__context_tag == to_underlying(Fields::kSeekRangeStart)) + { + err = DataModel::Decode(reader, seekRangeStart); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else if (__context_tag == to_underlying(Fields::kAudioAdvanceUnmuted)) + { + err = DataModel::Decode(reader, audioAdvanceUnmuted); } else { @@ -18148,17 +23066,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace StateChanged. +} // namespace Events -} // namespace ChannelInfoStruct +} // namespace MediaPlayback +namespace MediaInput { +namespace Structs { -namespace LineupInfoStruct { +namespace InputInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOperatorName), operatorName); - encoder.Encode(to_underlying(Fields::kLineupName), lineupName); - encoder.Encode(to_underlying(Fields::kPostalCode), postalCode); - encoder.Encode(to_underlying(Fields::kLineupInfoType), lineupInfoType); + encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kInputType), inputType); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kDescription), description); return encoder.Finalize(); } @@ -18176,21 +23098,21 @@ 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::kOperatorName)) + if (__context_tag == to_underlying(Fields::kIndex)) { - err = DataModel::Decode(reader, operatorName); + err = DataModel::Decode(reader, index); } - else if (__context_tag == to_underlying(Fields::kLineupName)) + else if (__context_tag == to_underlying(Fields::kInputType)) { - err = DataModel::Decode(reader, lineupName); + err = DataModel::Decode(reader, inputType); } - else if (__context_tag == to_underlying(Fields::kPostalCode)) + else if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, postalCode); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kLineupInfoType)) + else if (__context_tag == to_underlying(Fields::kDescription)) { - err = DataModel::Decode(reader, lineupInfoType); + err = DataModel::Decode(reader, description); } else { @@ -18200,15 +23122,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace LineupInfoStruct +} // namespace InputInfoStruct } // namespace Structs namespace Commands { -namespace ChangeChannel { +namespace SelectInput { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMatch), match); + encoder.Encode(to_underlying(Fields::kIndex), index); return encoder.Finalize(); } @@ -18226,9 +23148,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::kMatch)) + if (__context_tag == to_underlying(Fields::kIndex)) { - err = DataModel::Decode(reader, match); + err = DataModel::Decode(reader, index); } else { @@ -18237,13 +23159,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeChannel. -namespace ChangeChannelResponse { +} // namespace SelectInput. +namespace ShowInputStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kData), data); return encoder.Finalize(); } @@ -18257,32 +23177,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kData)) - { - err = DataModel::Decode(reader, data); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace ChangeChannelResponse. -namespace ChangeChannelByNumber { +} // namespace ShowInputStatus. +namespace HideInputStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMajorNumber), majorNumber); - encoder.Encode(to_underlying(Fields::kMinorNumber), minorNumber); return encoder.Finalize(); } @@ -18296,31 +23197,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kMajorNumber)) - { - err = DataModel::Decode(reader, majorNumber); - } - else if (__context_tag == to_underlying(Fields::kMinorNumber)) - { - err = DataModel::Decode(reader, minorNumber); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace ChangeChannelByNumber. -namespace SkipChannel { +} // namespace HideInputStatus. +namespace RenameInput { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCount), count); + encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kName), name); return encoder.Finalize(); } @@ -18338,9 +23223,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::kCount)) + if (__context_tag == to_underlying(Fields::kIndex)) { - err = DataModel::Decode(reader, count); + err = DataModel::Decode(reader, index); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); } else { @@ -18349,7 +23238,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SkipChannel. +} // namespace RenameInput. } // namespace Commands namespace Attributes { @@ -18357,12 +23246,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::ChannelList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, channelList); - case Attributes::Lineup::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lineup); - case Attributes::CurrentChannel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentChannel); + case Attributes::InputList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, inputList); + case Attributes::CurrentInput::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentInput); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -18383,16 +23270,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace Channel -namespace TargetNavigator { -namespace Structs { +} // namespace MediaInput +namespace LowPower { -namespace TargetInfoStruct { +namespace Commands { +namespace Sleep { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIdentifier), identifier); - encoder.Encode(to_underlying(Fields::kName), name); return encoder.Finalize(); } @@ -18406,36 +23291,45 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace Sleep. +} // namespace Commands - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kIdentifier)) - { - err = DataModel::Decode(reader, identifier); - } - else if (__context_tag == to_underlying(Fields::kName)) - { - err = DataModel::Decode(reader, name); - } - else - { - } - - ReturnErrorOnFailure(err); +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } +} // namespace Attributes -} // namespace TargetInfoStruct -} // namespace Structs +namespace Events {} // namespace Events + +} // namespace LowPower +namespace KeypadInput { namespace Commands { -namespace NavigateTarget { +namespace SendKey { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTarget), target); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kKeyCode), keyCode); return encoder.Finalize(); } @@ -18453,13 +23347,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::kTarget)) - { - err = DataModel::Decode(reader, target); - } - else if (__context_tag == to_underlying(Fields::kData)) + if (__context_tag == to_underlying(Fields::kKeyCode)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, keyCode); } else { @@ -18468,13 +23358,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace NavigateTarget. -namespace NavigateTargetResponse { +} // namespace SendKey. +namespace SendKeyResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kData), data); return encoder.Finalize(); } @@ -18496,10 +23385,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kData)) - { - err = DataModel::Decode(reader, data); - } else { } @@ -18507,7 +23392,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace NavigateTargetResponse. +} // namespace SendKeyResponse. } // namespace Commands namespace Attributes { @@ -18515,10 +23400,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::TargetList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, targetList); - case Attributes::CurrentTarget::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentTarget); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -18539,16 +23420,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace TargetNavigator -namespace MediaPlayback { +} // namespace KeypadInput +namespace ContentLauncher { namespace Structs { -namespace PlaybackPositionStruct { +namespace DimensionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUpdatedAt), updatedAt); - encoder.Encode(to_underlying(Fields::kPosition), position); + encoder.Encode(to_underlying(Fields::kWidth), width); + encoder.Encode(to_underlying(Fields::kHeight), height); + encoder.Encode(to_underlying(Fields::kMetric), metric); return encoder.Finalize(); } @@ -18566,13 +23448,17 @@ 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::kUpdatedAt)) + if (__context_tag == to_underlying(Fields::kWidth)) { - err = DataModel::Decode(reader, updatedAt); + err = DataModel::Decode(reader, width); } - else if (__context_tag == to_underlying(Fields::kPosition)) + else if (__context_tag == to_underlying(Fields::kHeight)) { - err = DataModel::Decode(reader, position); + err = DataModel::Decode(reader, height); + } + else if (__context_tag == to_underlying(Fields::kMetric)) + { + err = DataModel::Decode(reader, metric); } else { @@ -18582,14 +23468,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace PlaybackPositionStruct -} // namespace Structs +} // namespace DimensionStruct -namespace Commands { -namespace Play { +namespace TrackPreferenceStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLanguageCode), languageCode); + encoder.Encode(to_underlying(Fields::kCharacteristics), characteristics); + encoder.Encode(to_underlying(Fields::kAudioOutputIndex), audioOutputIndex); return encoder.Finalize(); } @@ -18603,93 +23490,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace Play. -namespace Pause { -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)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kLanguageCode)) { - return std::get(__element); + err = DataModel::Decode(reader, languageCode); } - } -} -} // namespace Pause. -namespace Stop { -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)) + else if (__context_tag == to_underlying(Fields::kCharacteristics)) { - return std::get(__element); + err = DataModel::Decode(reader, characteristics); } - } -} -} // namespace Stop. -namespace StartOver { -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)) + else if (__context_tag == to_underlying(Fields::kAudioOutputIndex)) { - return std::get(__element); + err = DataModel::Decode(reader, audioOutputIndex); } - } -} -} // namespace StartOver. -namespace Previous { -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)) + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace Previous. -namespace Next { + +} // namespace TrackPreferenceStruct + +namespace PlaybackPreferencesStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPlaybackPosition), playbackPosition); + encoder.Encode(to_underlying(Fields::kTextTrack), textTrack); + encoder.Encode(to_underlying(Fields::kAudioTracks), audioTracks); return encoder.Finalize(); } @@ -18703,54 +23536,38 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace Next. -namespace Rewind { -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)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kPlaybackPosition)) { - return std::get(__element); + err = DataModel::Decode(reader, playbackPosition); } - } -} -} // namespace Rewind. -namespace FastForward { -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)) + else if (__context_tag == to_underlying(Fields::kTextTrack)) + { + err = DataModel::Decode(reader, textTrack); + } + else if (__context_tag == to_underlying(Fields::kAudioTracks)) + { + err = DataModel::Decode(reader, audioTracks); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace FastForward. -namespace SkipForward { + +} // namespace PlaybackPreferencesStruct + +namespace AdditionalInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kValue), value); return encoder.Finalize(); } @@ -18768,9 +23585,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::kDeltaPositionMilliseconds)) + if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, deltaPositionMilliseconds); + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); } else { @@ -18779,12 +23600,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SkipForward. -namespace SkipBackward { + +} // namespace AdditionalInfoStruct + +namespace ParameterStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds); + encoder.Encode(to_underlying(Fields::kType), type); + encoder.Encode(to_underlying(Fields::kValue), value); + encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); return encoder.Finalize(); } @@ -18802,9 +23627,17 @@ 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::kDeltaPositionMilliseconds)) + if (__context_tag == to_underlying(Fields::kType)) { - err = DataModel::Decode(reader, deltaPositionMilliseconds); + err = DataModel::Decode(reader, type); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); + } + else if (__context_tag == to_underlying(Fields::kExternalIDList)) + { + err = DataModel::Decode(reader, externalIDList); } else { @@ -18813,13 +23646,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SkipBackward. -namespace PlaybackResponse { + +} // namespace ParameterStruct + +namespace ContentSearchStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kParameterList), parameterList); return encoder.Finalize(); } @@ -18833,17 +23667,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kData)) + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kParameterList)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, parameterList); } else { @@ -18852,12 +23682,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace PlaybackResponse. -namespace Seek { + +} // namespace ContentSearchStruct + +namespace StyleInformationStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPosition), position); + encoder.Encode(to_underlying(Fields::kImageURL), imageURL); + encoder.Encode(to_underlying(Fields::kColor), color); + encoder.Encode(to_underlying(Fields::kSize), size); return encoder.Finalize(); } @@ -18875,9 +23709,17 @@ 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::kPosition)) + if (__context_tag == to_underlying(Fields::kImageURL)) { - err = DataModel::Decode(reader, position); + err = DataModel::Decode(reader, imageURL); + } + else if (__context_tag == to_underlying(Fields::kColor)) + { + err = DataModel::Decode(reader, color); + } + else if (__context_tag == to_underlying(Fields::kSize)) + { + err = DataModel::Decode(reader, size); } else { @@ -18886,60 +23728,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Seek. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::CurrentState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentState); - case Attributes::StartTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startTime); - case Attributes::Duration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, duration); - case Attributes::SampledPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sampledPosition); - case Attributes::PlaybackSpeed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, playbackSpeed); - case Attributes::SeekRangeEnd::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, seekRangeEnd); - case Attributes::SeekRangeStart::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, seekRangeStart); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes -namespace Events {} // namespace Events - -} // namespace MediaPlayback -namespace MediaInput { -namespace Structs { +} // namespace StyleInformationStruct -namespace InputInfoStruct { +namespace BrandingInformationStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); - encoder.Encode(to_underlying(Fields::kInputType), inputType); - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kDescription), description); + encoder.Encode(to_underlying(Fields::kProviderName), providerName); + encoder.Encode(to_underlying(Fields::kBackground), background); + encoder.Encode(to_underlying(Fields::kLogo), logo); + encoder.Encode(to_underlying(Fields::kProgressBar), progressBar); + encoder.Encode(to_underlying(Fields::kSplash), splash); + encoder.Encode(to_underlying(Fields::kWaterMark), waterMark); return encoder.Finalize(); } @@ -18957,21 +23758,29 @@ 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::kIndex)) + if (__context_tag == to_underlying(Fields::kProviderName)) { - err = DataModel::Decode(reader, index); + err = DataModel::Decode(reader, providerName); } - else if (__context_tag == to_underlying(Fields::kInputType)) + else if (__context_tag == to_underlying(Fields::kBackground)) { - err = DataModel::Decode(reader, inputType); + err = DataModel::Decode(reader, background); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kLogo)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, logo); } - else if (__context_tag == to_underlying(Fields::kDescription)) + else if (__context_tag == to_underlying(Fields::kProgressBar)) { - err = DataModel::Decode(reader, description); + err = DataModel::Decode(reader, progressBar); + } + else if (__context_tag == to_underlying(Fields::kSplash)) + { + err = DataModel::Decode(reader, splash); + } + else if (__context_tag == to_underlying(Fields::kWaterMark)) + { + err = DataModel::Decode(reader, waterMark); } else { @@ -18981,15 +23790,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace InputInfoStruct +} // namespace BrandingInformationStruct } // namespace Structs namespace Commands { -namespace SelectInput { +namespace LaunchContent { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kSearch), search); + encoder.Encode(to_underlying(Fields::kAutoPlay), autoPlay); + encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kPlaybackPreferences), playbackPreferences); + encoder.Encode(to_underlying(Fields::kUseCurrentContext), useCurrentContext); return encoder.Finalize(); } @@ -19007,9 +23820,25 @@ 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::kIndex)) + if (__context_tag == to_underlying(Fields::kSearch)) { - err = DataModel::Decode(reader, index); + err = DataModel::Decode(reader, search); + } + else if (__context_tag == to_underlying(Fields::kAutoPlay)) + { + err = DataModel::Decode(reader, autoPlay); + } + else if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else if (__context_tag == to_underlying(Fields::kPlaybackPreferences)) + { + err = DataModel::Decode(reader, playbackPreferences); + } + else if (__context_tag == to_underlying(Fields::kUseCurrentContext)) + { + err = DataModel::Decode(reader, useCurrentContext); } else { @@ -19018,11 +23847,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SelectInput. -namespace ShowInputStatus { +} // namespace LaunchContent. +namespace LaunchURL { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kContentURL), contentURL); + encoder.Encode(to_underlying(Fields::kDisplayString), displayString); + encoder.Encode(to_underlying(Fields::kBrandingInformation), brandingInformation); return encoder.Finalize(); } @@ -19036,35 +23868,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace ShowInputStatus. -namespace HideInputStatus { -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)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kContentURL)) + { + err = DataModel::Decode(reader, contentURL); + } + else if (__context_tag == to_underlying(Fields::kDisplayString)) + { + err = DataModel::Decode(reader, displayString); + } + else if (__context_tag == to_underlying(Fields::kBrandingInformation)) + { + err = DataModel::Decode(reader, brandingInformation); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace HideInputStatus. -namespace RenameInput { +} // namespace LaunchURL. +namespace LauncherResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); - encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); return encoder.Finalize(); } @@ -19082,13 +23915,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::kIndex)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, index); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kData)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, data); } else { @@ -19097,7 +23930,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RenameInput. +} // namespace LauncherResponse. } // namespace Commands namespace Attributes { @@ -19105,10 +23938,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::InputList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, inputList); - case Attributes::CurrentInput::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentInput); + case Attributes::AcceptHeader::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptHeader); + case Attributes::SupportedStreamingProtocols::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedStreamingProtocols); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -19129,14 +23962,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace MediaInput -namespace LowPower { +} // namespace ContentLauncher +namespace AudioOutput { +namespace Structs { -namespace Commands { -namespace Sleep { +namespace OutputInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kOutputType), outputType); + encoder.Encode(to_underlying(Fields::kName), name); return encoder.Finalize(); } @@ -19150,45 +23986,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace Sleep. -} // namespace Commands -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kIndex)) + { + err = DataModel::Decode(reader, index); + } + else if (__context_tag == to_underlying(Fields::kOutputType)) + { + err = DataModel::Decode(reader, outputType); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events -} // namespace LowPower -namespace KeypadInput { +} // namespace OutputInfoStruct +} // namespace Structs namespace Commands { -namespace SendKey { +namespace SelectOutput { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kKeyCode), keyCode); + encoder.Encode(to_underlying(Fields::kIndex), index); return encoder.Finalize(); } @@ -19206,9 +24036,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::kKeyCode)) + if (__context_tag == to_underlying(Fields::kIndex)) { - err = DataModel::Decode(reader, keyCode); + err = DataModel::Decode(reader, index); } else { @@ -19217,12 +24047,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SendKey. -namespace SendKeyResponse { +} // namespace SelectOutput. +namespace RenameOutput { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kName), name); return encoder.Finalize(); } @@ -19240,9 +24071,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::kStatus)) + if (__context_tag == to_underlying(Fields::kIndex)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, index); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); } else { @@ -19251,7 +24086,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SendKeyResponse. +} // namespace RenameOutput. } // namespace Commands namespace Attributes { @@ -19259,6 +24094,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { + case Attributes::OutputList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, outputList); + case Attributes::CurrentOutput::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentOutput); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -19279,17 +24118,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace KeypadInput -namespace ContentLauncher { +} // namespace AudioOutput +namespace ApplicationLauncher { namespace Structs { -namespace DimensionStruct { +namespace ApplicationEPStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kWidth), width); - encoder.Encode(to_underlying(Fields::kHeight), height); - encoder.Encode(to_underlying(Fields::kMetric), metric); + encoder.Encode(to_underlying(Fields::kApplication), application); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); return encoder.Finalize(); } @@ -19307,17 +24145,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::kWidth)) - { - err = DataModel::Decode(reader, width); - } - else if (__context_tag == to_underlying(Fields::kHeight)) + if (__context_tag == to_underlying(Fields::kApplication)) { - err = DataModel::Decode(reader, height); + err = DataModel::Decode(reader, application); } - else if (__context_tag == to_underlying(Fields::kMetric)) + else if (__context_tag == to_underlying(Fields::kEndpoint)) { - err = DataModel::Decode(reader, metric); + err = DataModel::Decode(reader, endpoint); } else { @@ -19327,14 +24161,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace DimensionStruct +} // namespace ApplicationEPStruct +} // namespace Structs -namespace AdditionalInfoStruct { +namespace Commands { +namespace LaunchApp { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kValue), value); + encoder.Encode(to_underlying(Fields::kApplication), application); + encoder.Encode(to_underlying(Fields::kData), data); return encoder.Finalize(); } @@ -19352,13 +24188,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::kName)) + if (__context_tag == to_underlying(Fields::kApplication)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, application); } - else if (__context_tag == to_underlying(Fields::kValue)) + else if (__context_tag == to_underlying(Fields::kData)) { - err = DataModel::Decode(reader, value); + err = DataModel::Decode(reader, data); } else { @@ -19367,16 +24203,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace AdditionalInfoStruct - -namespace ParameterStruct { +} // namespace LaunchApp. +namespace StopApp { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kType), type); - encoder.Encode(to_underlying(Fields::kValue), value); - encoder.Encode(to_underlying(Fields::kExternalIDList), externalIDList); + encoder.Encode(to_underlying(Fields::kApplication), application); return encoder.Finalize(); } @@ -19394,17 +24226,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::kType)) - { - err = DataModel::Decode(reader, type); - } - else if (__context_tag == to_underlying(Fields::kValue)) - { - err = DataModel::Decode(reader, value); - } - else if (__context_tag == to_underlying(Fields::kExternalIDList)) + if (__context_tag == to_underlying(Fields::kApplication)) { - err = DataModel::Decode(reader, externalIDList); + err = DataModel::Decode(reader, application); } else { @@ -19413,14 +24237,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ParameterStruct - -namespace ContentSearchStruct { +} // namespace StopApp. +namespace HideApp { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kParameterList), parameterList); + encoder.Encode(to_underlying(Fields::kApplication), application); return encoder.Finalize(); } @@ -19438,9 +24260,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::kParameterList)) + if (__context_tag == to_underlying(Fields::kApplication)) { - err = DataModel::Decode(reader, parameterList); + err = DataModel::Decode(reader, application); } else { @@ -19449,16 +24271,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ContentSearchStruct - -namespace StyleInformationStruct { +} // namespace HideApp. +namespace LauncherResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kImageURL), imageURL); - encoder.Encode(to_underlying(Fields::kColor), color); - encoder.Encode(to_underlying(Fields::kSize), size); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); return encoder.Finalize(); } @@ -19476,17 +24295,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::kImageURL)) - { - err = DataModel::Decode(reader, imageURL); - } - else if (__context_tag == to_underlying(Fields::kColor)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, color); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kSize)) + else if (__context_tag == to_underlying(Fields::kData)) { - err = DataModel::Decode(reader, size); + err = DataModel::Decode(reader, data); } else { @@ -19495,19 +24310,94 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace LauncherResponse. +} // namespace Commands -} // namespace StyleInformationStruct +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::CatalogList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, catalogList); + case Attributes::CurrentApp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentApp); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes -namespace BrandingInformationStruct { +namespace Events {} // namespace Events + +} // namespace ApplicationLauncher +namespace ApplicationBasic { +namespace Structs {} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::VendorName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorName); + case Attributes::VendorID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorID); + case Attributes::ApplicationName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, applicationName); + case Attributes::ProductID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productID); + case Attributes::Application::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, application); + case Attributes::Status::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, status); + case Attributes::ApplicationVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, applicationVersion); + case Attributes::AllowedVendorList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, allowedVendorList); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ApplicationBasic +namespace AccountLogin { + +namespace Commands { +namespace GetSetupPIN { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kProviderName), providerName); - encoder.Encode(to_underlying(Fields::kBackground), background); - encoder.Encode(to_underlying(Fields::kLogo), logo); - encoder.Encode(to_underlying(Fields::kProgressBar), progressBar); - encoder.Encode(to_underlying(Fields::kSplash), splash); - encoder.Encode(to_underlying(Fields::kWaterMark), waterMark); + encoder.Encode(to_underlying(Fields::kTempAccountIdentifier), tempAccountIdentifier); return encoder.Finalize(); } @@ -19525,49 +24415,23 @@ 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::kProviderName)) - { - err = DataModel::Decode(reader, providerName); - } - else if (__context_tag == to_underlying(Fields::kBackground)) - { - err = DataModel::Decode(reader, background); - } - else if (__context_tag == to_underlying(Fields::kLogo)) - { - err = DataModel::Decode(reader, logo); - } - else if (__context_tag == to_underlying(Fields::kProgressBar)) - { - err = DataModel::Decode(reader, progressBar); - } - else if (__context_tag == to_underlying(Fields::kSplash)) - { - err = DataModel::Decode(reader, splash); - } - else if (__context_tag == to_underlying(Fields::kWaterMark)) + if (__context_tag == to_underlying(Fields::kTempAccountIdentifier)) { - err = DataModel::Decode(reader, waterMark); + err = DataModel::Decode(reader, tempAccountIdentifier); } else { } - ReturnErrorOnFailure(err); - } -} - -} // namespace BrandingInformationStruct -} // namespace Structs - -namespace Commands { -namespace LaunchContent { + ReturnErrorOnFailure(err); + } +} +} // namespace GetSetupPIN. +namespace GetSetupPINResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSearch), search); - encoder.Encode(to_underlying(Fields::kAutoPlay), autoPlay); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kSetupPIN), setupPIN); return encoder.Finalize(); } @@ -19585,17 +24449,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::kSearch)) - { - err = DataModel::Decode(reader, search); - } - else if (__context_tag == to_underlying(Fields::kAutoPlay)) - { - err = DataModel::Decode(reader, autoPlay); - } - else if (__context_tag == to_underlying(Fields::kData)) + if (__context_tag == to_underlying(Fields::kSetupPIN)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, setupPIN); } else { @@ -19604,14 +24460,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LaunchContent. -namespace LaunchURL { +} // namespace GetSetupPINResponse. +namespace Login { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kContentURL), contentURL); - encoder.Encode(to_underlying(Fields::kDisplayString), displayString); - encoder.Encode(to_underlying(Fields::kBrandingInformation), brandingInformation); + encoder.Encode(to_underlying(Fields::kTempAccountIdentifier), tempAccountIdentifier); + encoder.Encode(to_underlying(Fields::kSetupPIN), setupPIN); + encoder.Encode(to_underlying(Fields::kNode), node); return encoder.Finalize(); } @@ -19629,17 +24485,17 @@ 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::kContentURL)) + if (__context_tag == to_underlying(Fields::kTempAccountIdentifier)) { - err = DataModel::Decode(reader, contentURL); + err = DataModel::Decode(reader, tempAccountIdentifier); } - else if (__context_tag == to_underlying(Fields::kDisplayString)) + else if (__context_tag == to_underlying(Fields::kSetupPIN)) { - err = DataModel::Decode(reader, displayString); + err = DataModel::Decode(reader, setupPIN); } - else if (__context_tag == to_underlying(Fields::kBrandingInformation)) + else if (__context_tag == to_underlying(Fields::kNode)) { - err = DataModel::Decode(reader, brandingInformation); + err = DataModel::Decode(reader, node); } else { @@ -19648,13 +24504,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LaunchURL. -namespace LauncherResponse { +} // namespace Login. +namespace Logout { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kNode), node); return encoder.Finalize(); } @@ -19672,13 +24527,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::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kData)) + if (__context_tag == to_underlying(Fields::kNode)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, node); } else { @@ -19687,7 +24538,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LauncherResponse. +} // namespace Logout. } // namespace Commands namespace Attributes { @@ -19695,10 +24546,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::AcceptHeader::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptHeader); - case Attributes::SupportedStreamingProtocols::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedStreamingProtocols); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -19717,20 +24564,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace ContentLauncher -namespace AudioOutput { -namespace Structs { - -namespace OutputInfoStruct { +namespace Events { +namespace LoggedOut { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); - encoder.Encode(to_underlying(Fields::kOutputType), outputType); - encoder.Encode(to_underlying(Fields::kName), name); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNode), node)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -19747,17 +24588,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::kIndex)) - { - err = DataModel::Decode(reader, index); - } - else if (__context_tag == to_underlying(Fields::kOutputType)) - { - err = DataModel::Decode(reader, outputType); - } - else if (__context_tag == to_underlying(Fields::kName)) + if (__context_tag == to_underlying(Fields::kNode)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, node); } else { @@ -19766,16 +24599,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace LoggedOut. +} // namespace Events -} // namespace OutputInfoStruct -} // namespace Structs +} // namespace AccountLogin +namespace ContentControl { +namespace Structs { -namespace Commands { -namespace SelectOutput { +namespace RatingNameStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); + encoder.Encode(to_underlying(Fields::kRatingName), ratingName); + encoder.Encode(to_underlying(Fields::kRatingNameDesc), ratingNameDesc); return encoder.Finalize(); } @@ -19793,9 +24629,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::kIndex)) + if (__context_tag == to_underlying(Fields::kRatingName)) { - err = DataModel::Decode(reader, index); + err = DataModel::Decode(reader, ratingName); + } + else if (__context_tag == to_underlying(Fields::kRatingNameDesc)) + { + err = DataModel::Decode(reader, ratingNameDesc); } else { @@ -19804,13 +24644,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SelectOutput. -namespace RenameOutput { + +} // namespace RatingNameStruct +} // namespace Structs + +namespace Commands { +namespace UpdatePIN { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIndex), index); - encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kOldPIN), oldPIN); + encoder.Encode(to_underlying(Fields::kNewPIN), newPIN); return encoder.Finalize(); } @@ -19828,13 +24672,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::kIndex)) + if (__context_tag == to_underlying(Fields::kOldPIN)) { - err = DataModel::Decode(reader, index); + err = DataModel::Decode(reader, oldPIN); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kNewPIN)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, newPIN); } else { @@ -19843,48 +24687,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RenameOutput. -} // namespace Commands +} // namespace UpdatePIN. +namespace ResetPIN { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::OutputList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, outputList); - case Attributes::CurrentOutput::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentOutput); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace AudioOutput -namespace ApplicationLauncher { -namespace Structs { - -namespace ApplicationEPStruct { +} // namespace ResetPIN. +namespace ResetPINResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kApplication), application); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); return encoder.Finalize(); } @@ -19902,13 +24730,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::kApplication)) - { - err = DataModel::Decode(reader, application); - } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, PINCode); } else { @@ -19917,17 +24741,53 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace ResetPINResponse. +namespace Enable { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -} // namespace ApplicationEPStruct -} // namespace Structs +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 Enable. +namespace Disable { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Commands { -namespace LaunchApp { +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 Disable. +namespace AddBonusTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kApplication), application); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kPINCode), PINCode); + encoder.Encode(to_underlying(Fields::kBonusTime), bonusTime); return encoder.Finalize(); } @@ -19945,13 +24805,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::kApplication)) + if (__context_tag == to_underlying(Fields::kPINCode)) { - err = DataModel::Decode(reader, application); + err = DataModel::Decode(reader, PINCode); } - else if (__context_tag == to_underlying(Fields::kData)) + else if (__context_tag == to_underlying(Fields::kBonusTime)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, bonusTime); } else { @@ -19960,12 +24820,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LaunchApp. -namespace StopApp { +} // namespace AddBonusTime. +namespace SetScreenDailyTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kApplication), application); + encoder.Encode(to_underlying(Fields::kScreenTime), screenTime); return encoder.Finalize(); } @@ -19983,23 +24843,63 @@ 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::kApplication)) + if (__context_tag == to_underlying(Fields::kScreenTime)) { - err = DataModel::Decode(reader, application); + err = DataModel::Decode(reader, screenTime); } else { } - - ReturnErrorOnFailure(err); + + ReturnErrorOnFailure(err); + } +} +} // namespace SetScreenDailyTime. +namespace BlockUnratedContent { +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 BlockUnratedContent. +namespace UnblockUnratedContent { +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 StopApp. -namespace HideApp { +} // namespace UnblockUnratedContent. +namespace SetOnDemandRatingThreshold { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kApplication), application); + encoder.Encode(to_underlying(Fields::kRating), rating); return encoder.Finalize(); } @@ -20017,9 +24917,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::kApplication)) + if (__context_tag == to_underlying(Fields::kRating)) { - err = DataModel::Decode(reader, application); + err = DataModel::Decode(reader, rating); } else { @@ -20028,13 +24928,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace HideApp. -namespace LauncherResponse { +} // namespace SetOnDemandRatingThreshold. +namespace SetScheduledContentRatingThreshold { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kRating), rating); return encoder.Finalize(); } @@ -20052,13 +24951,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::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kData)) + if (__context_tag == to_underlying(Fields::kRating)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, rating); } else { @@ -20067,7 +24962,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LauncherResponse. +} // namespace SetScheduledContentRatingThreshold. } // namespace Commands namespace Attributes { @@ -20075,57 +24970,22 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::CatalogList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, catalogList); - case Attributes::CurrentApp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentApp); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace ApplicationLauncher -namespace ApplicationBasic { -namespace Structs {} // namespace Structs - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::VendorName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorName); - case Attributes::VendorID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorID); - case Attributes::ApplicationName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, applicationName); - case Attributes::ProductID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productID); - case Attributes::Application::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, application); - case Attributes::Status::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, status); - case Attributes::ApplicationVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, applicationVersion); - case Attributes::AllowedVendorList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, allowedVendorList); + case Attributes::Enabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, enabled); + case Attributes::OnDemandRatings::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onDemandRatings); + case Attributes::OnDemandRatingThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onDemandRatingThreshold); + case Attributes::ScheduledContentRatings::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scheduledContentRatings); + case Attributes::ScheduledContentRatingThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scheduledContentRatingThreshold); + case Attributes::ScreenDailyTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, screenDailyTime); + case Attributes::RemainingScreenTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remainingScreenTime); + case Attributes::BlockUnrated::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, blockUnrated); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -20144,18 +25004,13 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace ApplicationBasic -namespace AccountLogin { - -namespace Commands { -namespace GetSetupPIN { +namespace Events { +namespace RemainingScreenTimeExpired { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTempAccountIdentifier), tempAccountIdentifier); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -20168,27 +25023,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kTempAccountIdentifier)) - { - err = DataModel::Decode(reader, tempAccountIdentifier); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace GetSetupPIN. -namespace GetSetupPINResponse { +} // namespace RemainingScreenTimeExpired. +} // namespace Events + +} // namespace ContentControl +namespace ContentAppObserver { + +namespace Commands { +namespace ContentAppMessage { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSetupPIN), setupPIN); + encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kEncodingHint), encodingHint); return encoder.Finalize(); } @@ -20206,9 +25055,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::kSetupPIN)) + if (__context_tag == to_underlying(Fields::kData)) { - err = DataModel::Decode(reader, setupPIN); + err = DataModel::Decode(reader, data); + } + else if (__context_tag == to_underlying(Fields::kEncodingHint)) + { + err = DataModel::Decode(reader, encodingHint); } else { @@ -20217,13 +25070,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetSetupPINResponse. -namespace Login { +} // namespace ContentAppMessage. +namespace ContentAppMessageResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTempAccountIdentifier), tempAccountIdentifier); - encoder.Encode(to_underlying(Fields::kSetupPIN), setupPIN); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kData), data); + encoder.Encode(to_underlying(Fields::kEncodingHint), encodingHint); return encoder.Finalize(); } @@ -20241,13 +25095,17 @@ 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::kTempAccountIdentifier)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, tempAccountIdentifier); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kSetupPIN)) + else if (__context_tag == to_underlying(Fields::kData)) { - err = DataModel::Decode(reader, setupPIN); + err = DataModel::Decode(reader, data); + } + else if (__context_tag == to_underlying(Fields::kEncodingHint)) + { + err = DataModel::Decode(reader, encodingHint); } else { @@ -20256,27 +25114,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Login. -namespace Logout { -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 Logout. +} // namespace ContentAppMessageResponse. } // namespace Commands namespace Attributes { @@ -20304,7 +25142,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace AccountLogin +} // namespace ContentAppObserver namespace ElectricalMeasurement { namespace Commands { @@ -23135,7 +27973,48 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events +namespace Events { +namespace PingCountEvent { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCount), count)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + return aWriter.EndContainer(outer); +} + +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::kCount)) + { + err = DataModel::Decode(reader, count); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace PingCountEvent. +} // namespace Events } // namespace SampleMei @@ -23158,6 +28037,21 @@ bool CommandNeedsTimedInvoke(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::EnergyEvse::Id: { + switch (aCommand) + { + case Clusters::EnergyEvse::Commands::Disable::Id: + case Clusters::EnergyEvse::Commands::EnableCharging::Id: + case Clusters::EnergyEvse::Commands::EnableDischarging::Id: + case Clusters::EnergyEvse::Commands::StartDiagnostics::Id: + case Clusters::EnergyEvse::Commands::SetTargets::Id: + case Clusters::EnergyEvse::Commands::GetTargets::Id: + case Clusters::EnergyEvse::Commands::ClearTargets::Id: + return true; + default: + return false; + } + } case Clusters::DoorLock::Id: { switch (aCommand) { @@ -23413,7 +28307,21 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::OvenOperationalState::Id: { + case Clusters::Timer::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::OvenCavityOperationalState::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::OvenMode::Id: { switch (aCommand) { default: @@ -23518,6 +28426,41 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::BooleanStateConfiguration::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ValveConfigurationAndControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::DemandResponseLoadControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::DeviceEnergyManagement::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::EnergyEvse::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::DoorLock::Id: { switch (aCommand) { @@ -23636,6 +28579,20 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::ContentControl::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ContentAppObserver::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::ElectricalMeasurement::Id: { switch (aCommand) { 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 b15bcbf53bb413..7c1839591691f8 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 @@ -19,7 +19,6 @@ #pragma once -#include #include #include #include @@ -967,6 +966,45 @@ struct DecodableType }; } // namespace ExtensionFieldSet +namespace SceneInfoStruct { +enum class Fields : uint8_t +{ + kSceneCount = 0, + kCurrentScene = 1, + kCurrentGroup = 2, + kSceneValid = 3, + kRemainingCapacity = 4, + kFabricIndex = 254, +}; + +struct Type +{ +public: + uint8_t sceneCount = static_cast(0); + uint8_t currentScene = static_cast(0); + chip::GroupId currentGroup = static_cast(0); + bool sceneValid = static_cast(0); + uint8_t remainingCapacity = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; +}; + +using DecodableType = Type; + +} // namespace SceneInfoStruct } // namespace Structs namespace Commands { @@ -1892,18 +1930,19 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SceneTableSize -namespace RemainingCapacity { +namespace FabricSceneInfo { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemainingCapacity::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FabricSceneInfo::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RemainingCapacity +} // namespace FabricSceneInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -1956,8 +1995,8 @@ struct TypeInfo Attributes::NameSupport::TypeInfo::DecodableType nameSupport = static_cast>(0); Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy; - Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); - Attributes::RemainingCapacity::TypeInfo::DecodableType remainingCapacity = static_cast(0); + Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); + Attributes::FabricSceneInfo::TypeInfo::DecodableType fabricSceneInfo; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -2471,8 +2510,8 @@ struct Type uint8_t level = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2489,8 +2528,8 @@ struct DecodableType uint8_t level = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevel @@ -2510,10 +2549,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); + MoveModeEnum moveMode = static_cast(0); DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2528,10 +2567,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); + MoveModeEnum moveMode = static_cast(0); DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Move @@ -2552,11 +2591,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2571,11 +2610,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Step @@ -2593,8 +2632,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2609,8 +2648,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Stop @@ -2632,8 +2671,8 @@ struct Type uint8_t level = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2650,8 +2689,8 @@ struct DecodableType uint8_t level = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevelWithOnOff @@ -2671,10 +2710,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); + MoveModeEnum moveMode = static_cast(0); DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2689,10 +2728,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); + MoveModeEnum moveMode = static_cast(0); DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveWithOnOff @@ -2713,11 +2752,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2732,11 +2771,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepWithOnOff @@ -2754,8 +2793,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -2770,8 +2809,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StopWithOnOff @@ -2898,9 +2937,9 @@ struct TypeInfo namespace Options { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } @@ -3032,7 +3071,7 @@ struct TypeInfo Attributes::MinFrequency::TypeInfo::DecodableType minFrequency = static_cast(0); Attributes::MaxFrequency::TypeInfo::DecodableType maxFrequency = static_cast(0); Attributes::Options::TypeInfo::DecodableType options = - static_cast>(0); + static_cast>(0); Attributes::OnOffTransitionTime::TypeInfo::DecodableType onOffTransitionTime = static_cast(0); Attributes::OnLevel::TypeInfo::DecodableType onLevel; Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; @@ -5026,6 +5065,30 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ProductAppearance +namespace SpecificationVersion { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpecificationVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SpecificationVersion +namespace MaxPathsPerInvoke { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPathsPerInvoke::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxPathsPerInvoke namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -5092,6 +5155,8 @@ struct TypeInfo Attributes::UniqueID::TypeInfo::DecodableType uniqueID; Attributes::CapabilityMinima::TypeInfo::DecodableType capabilityMinima; Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; + Attributes::SpecificationVersion::TypeInfo::DecodableType specificationVersion = static_cast(0); + Attributes::MaxPathsPerInvoke::TypeInfo::DecodableType maxPathsPerInvoke = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -8355,8 +8420,8 @@ struct DecodableType namespace TimeSnapshotResponse { enum class Fields : uint8_t { - kSystemTimeUs = 0, - kUTCTimeUs = 1, + kSystemTimeMs = 0, + kPosixTimeMs = 1, }; struct Type @@ -8366,8 +8431,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - uint64_t systemTimeUs = static_cast(0); - DataModel::Nullable UTCTimeUs; + uint64_t systemTimeMs = static_cast(0); + DataModel::Nullable posixTimeMs; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -8382,8 +8447,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - uint64_t systemTimeUs = static_cast(0); - DataModel::Nullable UTCTimeUs; + uint64_t systemTimeMs = static_cast(0); + DataModel::Nullable posixTimeMs; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TimeSnapshotResponse @@ -14059,6 +14124,11 @@ struct Type; struct DecodableType; } // namespace StayActiveRequest +namespace StayActiveResponse { +struct Type; +struct DecodableType; +} // namespace StayActiveResponse + } // namespace Commands namespace Commands { @@ -14184,7 +14254,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14198,6 +14268,38 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StayActiveRequest +namespace StayActiveResponse { +enum class Fields : uint8_t +{ + kPromisedActiveDuration = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + uint32_t promisedActiveDuration = static_cast(0); + + 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::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + uint32_t promisedActiveDuration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StayActiveResponse } // namespace Commands namespace Attributes { @@ -14365,7 +14467,257 @@ struct TypeInfo }; } // namespace Attributes } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetTimer { +struct Type; +struct DecodableType; +} // namespace SetTimer + +namespace ResetTimer { +struct Type; +struct DecodableType; +} // namespace ResetTimer + +namespace AddTime { +struct Type; +struct DecodableType; +} // namespace AddTime + +namespace ReduceTime { +struct Type; +struct DecodableType; +} // namespace ReduceTime + +} // namespace Commands + +namespace Commands { +namespace SetTimer { +enum class Fields : uint8_t +{ + kNewTime = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t newTime = static_cast(0); + + 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::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t newTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetTimer +namespace ResetTimer { +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::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::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::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetTimer +namespace AddTime { +enum class Fields : uint8_t +{ + kAdditionalTime = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t additionalTime = static_cast(0); + + 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::AddTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t additionalTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AddTime +namespace ReduceTime { +enum class Fields : uint8_t +{ + kTimeReduction = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t timeReduction = static_cast(0); + + 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::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t timeReduction = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ReduceTime +} // namespace Commands + +namespace Attributes { + +namespace SetTime { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SetTime +namespace TimeRemaining { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeRemaining::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeRemaining +namespace TimerState { +struct TypeInfo +{ + using Type = chip::app::Clusters::Timer::TimerStatusEnum; + using DecodableType = chip::app::Clusters::Timer::TimerStatusEnum; + using DecodableArgType = chip::app::Clusters::Timer::TimerStatusEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimerState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimerState +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SetTime::TypeInfo::DecodableType setTime = static_cast(0); + Attributes::TimeRemaining::TypeInfo::DecodableType timeRemaining = static_cast(0); + Attributes::TimerState::TypeInfo::DecodableType timerState = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace Timer +namespace OvenCavityOperationalState { namespace Structs { namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; @@ -14412,11 +14764,11 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14425,7 +14777,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14440,11 +14792,11 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14453,7 +14805,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14468,11 +14820,11 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14481,7 +14833,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14496,11 +14848,11 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14509,7 +14861,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14525,7 +14877,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } Structs::ErrorStateStruct::Type commandResponseState; @@ -14540,7 +14892,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } Structs::ErrorStateStruct::DecodableType commandResponseState; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -14557,7 +14909,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable>; using DecodableArgType = const chip::app::DataModel::Nullable> &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14569,7 +14921,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14581,7 +14933,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14589,13 +14941,14 @@ struct TypeInfo namespace OperationalStateList { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = + chip::app::DataModel::List; using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenOperationalState::Structs::OperationalStateStruct::DecodableType>; + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType>; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenOperationalState::Structs::OperationalStateStruct::DecodableType> &; + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14603,11 +14956,11 @@ struct TypeInfo namespace OperationalState { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; + using DecodableArgType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14615,11 +14968,11 @@ struct TypeInfo namespace OperationalError { struct TypeInfo { - using Type = chip::app::Clusters::OvenOperationalState::Structs::ErrorStateStruct::Type; - using DecodableType = chip::app::Clusters::OvenOperationalState::Structs::ErrorStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::OvenOperationalState::Structs::ErrorStateStruct::DecodableType &; + using Type = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::Type; + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14627,37 +14980,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace ClusterRevision @@ -14665,7 +15018,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -14673,7 +15026,8 @@ struct TypeInfo Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState = static_cast(0); + Attributes::OperationalState::TypeInfo::DecodableType operationalState = + static_cast(0); Attributes::OperationalError::TypeInfo::DecodableType operationalError; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -14698,7 +15052,7 @@ struct Type public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr bool kIsFabricScoped = false; Structs::ErrorStateStruct::Type errorState; @@ -14711,7 +15065,7 @@ struct DecodableType public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } Structs::ErrorStateStruct::DecodableType errorState; @@ -14733,7 +15087,7 @@ struct Type public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr bool kIsFabricScoped = false; uint8_t completionErrorCode = static_cast(0); @@ -14748,7 +15102,7 @@ struct DecodableType public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } uint8_t completionErrorCode = static_cast(0); Optional> totalOperationalTime; @@ -14758,7 +15112,295 @@ struct DecodableType }; } // namespace OperationCompletion } // namespace Events -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState +namespace OvenMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + 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::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace OvenMode +namespace LaundryDryerControls { + +namespace Attributes { + +namespace SupportedDrynessLevels { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedDrynessLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedDrynessLevels +namespace SelectedDrynessLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedDrynessLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SelectedDrynessLevel +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SupportedDrynessLevels::TypeInfo::DecodableType supportedDrynessLevels; + Attributes::SelectedDrynessLevel::TypeInfo::DecodableType selectedDrynessLevel; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace LaundryDryerControls namespace ModeSelect { namespace Structs { namespace SemanticTagStruct { @@ -18865,497 +19507,365 @@ struct TypeInfo }; } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace DoorLock { -namespace Structs { -namespace CredentialStruct { -enum class Fields : uint8_t -{ - kCredentialType = 0, - kCredentialIndex = 1, -}; - -struct Type -{ -public: - CredentialTypeEnum credentialType = static_cast(0); - uint16_t credentialIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace CredentialStruct -} // namespace Structs +namespace BooleanStateConfiguration { namespace Commands { // Forward-declarations so we can reference these later. -namespace LockDoor { -struct Type; -struct DecodableType; -} // namespace LockDoor - -namespace UnlockDoor { -struct Type; -struct DecodableType; -} // namespace UnlockDoor - -namespace UnlockWithTimeout { -struct Type; -struct DecodableType; -} // namespace UnlockWithTimeout - -namespace SetWeekDaySchedule { -struct Type; -struct DecodableType; -} // namespace SetWeekDaySchedule - -namespace GetWeekDaySchedule { -struct Type; -struct DecodableType; -} // namespace GetWeekDaySchedule - -namespace GetWeekDayScheduleResponse { -struct Type; -struct DecodableType; -} // namespace GetWeekDayScheduleResponse - -namespace ClearWeekDaySchedule { -struct Type; -struct DecodableType; -} // namespace ClearWeekDaySchedule - -namespace SetYearDaySchedule { -struct Type; -struct DecodableType; -} // namespace SetYearDaySchedule - -namespace GetYearDaySchedule { -struct Type; -struct DecodableType; -} // namespace GetYearDaySchedule - -namespace GetYearDayScheduleResponse { -struct Type; -struct DecodableType; -} // namespace GetYearDayScheduleResponse - -namespace ClearYearDaySchedule { -struct Type; -struct DecodableType; -} // namespace ClearYearDaySchedule - -namespace SetHolidaySchedule { -struct Type; -struct DecodableType; -} // namespace SetHolidaySchedule - -namespace GetHolidaySchedule { -struct Type; -struct DecodableType; -} // namespace GetHolidaySchedule - -namespace GetHolidayScheduleResponse { -struct Type; -struct DecodableType; -} // namespace GetHolidayScheduleResponse - -namespace ClearHolidaySchedule { -struct Type; -struct DecodableType; -} // namespace ClearHolidaySchedule - -namespace SetUser { -struct Type; -struct DecodableType; -} // namespace SetUser - -namespace GetUser { -struct Type; -struct DecodableType; -} // namespace GetUser - -namespace GetUserResponse { -struct Type; -struct DecodableType; -} // namespace GetUserResponse - -namespace ClearUser { -struct Type; -struct DecodableType; -} // namespace ClearUser - -namespace SetCredential { -struct Type; -struct DecodableType; -} // namespace SetCredential - -namespace SetCredentialResponse { -struct Type; -struct DecodableType; -} // namespace SetCredentialResponse - -namespace GetCredentialStatus { -struct Type; -struct DecodableType; -} // namespace GetCredentialStatus - -namespace GetCredentialStatusResponse { -struct Type; -struct DecodableType; -} // namespace GetCredentialStatusResponse - -namespace ClearCredential { +namespace SuppressAlarm { struct Type; struct DecodableType; -} // namespace ClearCredential +} // namespace SuppressAlarm -namespace UnboltDoor { +namespace EnableDisableAlarm { struct Type; struct DecodableType; -} // namespace UnboltDoor +} // namespace EnableDisableAlarm } // namespace Commands namespace Commands { -namespace LockDoor { +namespace SuppressAlarm { enum class Fields : uint8_t { - kPINCode = 0, + kAlarmsToSuppress = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LockDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } - Optional PINCode; + chip::BitMask alarmsToSuppress = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LockDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } - Optional PINCode; + chip::BitMask alarmsToSuppress = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LockDoor -namespace UnlockDoor { +}; // namespace SuppressAlarm +namespace EnableDisableAlarm { enum class Fields : uint8_t { - kPINCode = 0, + kAlarmsToEnableDisable = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UnlockDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } - Optional PINCode; + chip::BitMask alarmsToEnableDisable = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UnlockDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } - Optional PINCode; + chip::BitMask alarmsToEnableDisable = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UnlockDoor -namespace UnlockWithTimeout { -enum class Fields : uint8_t -{ - kTimeout = 0, - kPINCode = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint16_t timeout = static_cast(0); - Optional PINCode; +}; // namespace EnableDisableAlarm +} // namespace Commands - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = DataModel::NullObjectType; +namespace CurrentSensitivityLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentSensitivityLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace CurrentSensitivityLevel +namespace SupportedSensitivityLevels { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - uint16_t timeout = static_cast(0); - Optional PINCode; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedSensitivityLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace UnlockWithTimeout -namespace SetWeekDaySchedule { -enum class Fields : uint8_t +} // namespace SupportedSensitivityLevels +namespace DefaultSensitivityLevel { +struct TypeInfo { - kWeekDayIndex = 0, - kUserIndex = 1, - kDaysMask = 2, - kStartHour = 3, - kStartMinute = 4, - kEndHour = 5, - kEndMinute = 6, -}; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultSensitivityLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DefaultSensitivityLevel +namespace AlarmsActive { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - chip::BitMask daysMask = static_cast>(0); - uint8_t startHour = static_cast(0); - uint8_t startMinute = static_cast(0); - uint8_t endHour = static_cast(0); - uint8_t endMinute = static_cast(0); + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsActive::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsActive +namespace AlarmsSuppressed { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSuppressed::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsSuppressed +namespace AlarmsEnabled { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsEnabled::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace AlarmsEnabled +namespace AlarmsSupported { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsSupported +namespace SensorFault { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - chip::BitMask daysMask = static_cast>(0); - uint8_t startHour = static_cast(0); - uint8_t startMinute = static_cast(0); - uint8_t endHour = static_cast(0); - uint8_t endMinute = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SensorFault::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace SetWeekDaySchedule -namespace GetWeekDaySchedule { -enum class Fields : uint8_t +} // namespace SensorFault +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kWeekDayIndex = 0, - kUserIndex = 1, + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; -}; // namespace GetWeekDaySchedule -namespace GetWeekDayScheduleResponse { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kWeekDayIndex = 0, - kUserIndex = 1, - kStatus = 2, - kDaysMask = 3, - kStartHour = 4, - kStartMinute = 5, - kEndHour = 6, - kEndMinute = 7, + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; - -struct Type +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional> daysMask; - Optional startHour; - Optional startMinute; - Optional endHour; - Optional endMinute; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional> daysMask; - Optional startHour; - Optional startMinute; - Optional endHour; - Optional endMinute; - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::CurrentSensitivityLevel::TypeInfo::DecodableType currentSensitivityLevel = static_cast(0); + Attributes::SupportedSensitivityLevels::TypeInfo::DecodableType supportedSensitivityLevels = static_cast(0); + Attributes::DefaultSensitivityLevel::TypeInfo::DecodableType defaultSensitivityLevel = static_cast(0); + Attributes::AlarmsActive::TypeInfo::DecodableType alarmsActive = + static_cast>(0); + Attributes::AlarmsSuppressed::TypeInfo::DecodableType alarmsSuppressed = + static_cast>(0); + Attributes::AlarmsEnabled::TypeInfo::DecodableType alarmsEnabled = + static_cast>(0); + Attributes::AlarmsSupported::TypeInfo::DecodableType alarmsSupported = + static_cast>(0); + Attributes::SensorFault::TypeInfo::DecodableType sensorFault = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace GetWeekDayScheduleResponse -namespace ClearWeekDaySchedule { +} // namespace Attributes +namespace Events { +namespace AlarmsStateChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kWeekDayIndex = 0, - kUserIndex = 1, + kAlarmsActive = 0, + kAlarmsSuppressed = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr bool kIsFabricScoped = false; - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); + chip::BitMask alarmsActive = static_cast>(0); + Optional> alarmsSuppressed; 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::ClearWeekDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + + chip::BitMask alarmsActive = static_cast>(0); + Optional> alarmsSuppressed; - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ClearWeekDaySchedule -namespace SetYearDaySchedule { +} // namespace AlarmsStateChanged +namespace SensorFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kYearDayIndex = 0, - kUserIndex = 1, - kLocalStartTime = 2, - kLocalEndTime = 3, + kSensorFault = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + static constexpr bool kIsFabricScoped = false; - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - uint32_t localStartTime = static_cast(0); - uint32_t localEndTime = static_cast(0); + chip::BitMask sensorFault = static_cast>(0); 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::SetYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } + + chip::BitMask sensorFault = static_cast>(0); - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - uint32_t localStartTime = static_cast(0); - uint32_t localEndTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetYearDaySchedule -namespace GetYearDaySchedule { +} // namespace SensorFault +} // namespace Events +} // namespace BooleanStateConfiguration +namespace ValveConfigurationAndControl { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Open { +struct Type; +struct DecodableType; +} // namespace Open + +namespace Close { +struct Type; +struct DecodableType; +} // namespace Close + +} // namespace Commands + +namespace Commands { +namespace Open { enum class Fields : uint8_t { - kYearDayIndex = 0, - kUserIndex = 1, + kOpenDuration = 0, + kTargetLevel = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::Open::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); + Optional> openDuration; + Optional targetLevel; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -19363,36 +19873,25 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::Open::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); + Optional> openDuration; + Optional targetLevel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetYearDaySchedule -namespace GetYearDayScheduleResponse { +}; // namespace Open +namespace Close { enum class Fields : uint8_t { - kYearDayIndex = 0, - kUserIndex = 1, - kStatus = 2, - kLocalStartTime = 3, - kLocalEndTime = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional localStartTime; - Optional localEndTime; + static constexpr CommandId GetCommandId() { return Commands::Close::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -19404,513 +19903,861 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::Close::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional localStartTime; - Optional localEndTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetYearDayScheduleResponse -namespace ClearYearDaySchedule { -enum class Fields : uint8_t -{ - kYearDayIndex = 0, - kUserIndex = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } +}; // namespace Close +} // namespace Commands - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); +namespace Attributes { - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace OpenDuration { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OpenDuration::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OpenDuration +namespace DefaultOpenDuration { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOpenDuration::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace DefaultOpenDuration +namespace AutoCloseTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AutoCloseTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AutoCloseTime +namespace RemainingDuration { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint8_t yearDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemainingDuration::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ClearYearDaySchedule -namespace SetHolidaySchedule { -enum class Fields : uint8_t +} // namespace RemainingDuration +namespace CurrentState { +struct TypeInfo { - kHolidayIndex = 0, - kLocalStartTime = 1, - kLocalEndTime = 2, - kOperatingMode = 3, + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace CurrentState +namespace TargetState { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TargetState +namespace CurrentLevel { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint8_t holidayIndex = static_cast(0); - uint32_t localStartTime = static_cast(0); - uint32_t localEndTime = static_cast(0); - OperatingModeEnum operatingMode = static_cast(0); + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentLevel +namespace TargetLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TargetLevel +namespace DefaultOpenLevel { +struct TypeInfo +{ + using Type = chip::Percent; + using DecodableType = chip::Percent; + using DecodableArgType = chip::Percent; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOpenLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DefaultOpenLevel +namespace ValveFault { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ValveFault::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ValveFault +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } - uint8_t holidayIndex = static_cast(0); - uint32_t localStartTime = static_cast(0); - uint32_t localEndTime = static_cast(0); - OperatingModeEnum operatingMode = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::OpenDuration::TypeInfo::DecodableType openDuration; + Attributes::DefaultOpenDuration::TypeInfo::DecodableType defaultOpenDuration; + Attributes::AutoCloseTime::TypeInfo::DecodableType autoCloseTime; + Attributes::RemainingDuration::TypeInfo::DecodableType remainingDuration; + Attributes::CurrentState::TypeInfo::DecodableType currentState; + Attributes::TargetState::TypeInfo::DecodableType targetState; + Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel; + Attributes::TargetLevel::TypeInfo::DecodableType targetLevel; + Attributes::DefaultOpenLevel::TypeInfo::DecodableType defaultOpenLevel = static_cast(0); + Attributes::ValveFault::TypeInfo::DecodableType valveFault = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace SetHolidaySchedule -namespace GetHolidaySchedule { +} // namespace Attributes +namespace Events { +namespace ValveStateChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kHolidayIndex = 0, + kValveState = 0, + kValveLevel = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - uint8_t holidayIndex = static_cast(0); + ValveStateEnum valveState = static_cast(0); + Optional valveLevel; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + ValveStateEnum valveState = static_cast(0); + Optional valveLevel; - uint8_t holidayIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetHolidaySchedule -namespace GetHolidayScheduleResponse { +} // namespace ValveStateChanged +namespace ValveFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kHolidayIndex = 0, - kStatus = 1, - kLocalStartTime = 2, - kLocalEndTime = 3, - kOperatingMode = 4, + kValveFault = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetHolidayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - uint8_t holidayIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional localStartTime; - Optional localEndTime; - Optional operatingMode; + chip::BitMask valveFault = static_cast>(0); 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::GetHolidayScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + chip::BitMask valveFault = static_cast>(0); - uint8_t holidayIndex = static_cast(0); - DlStatus status = static_cast(0); - Optional localStartTime; - Optional localEndTime; - Optional operatingMode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetHolidayScheduleResponse -namespace ClearHolidaySchedule { +} // namespace ValveFault +} // namespace Events +} // namespace ValveConfigurationAndControl +namespace ElectricalEnergyMeasurement { +namespace Structs { +namespace MeasurementAccuracyRangeStruct { enum class Fields : uint8_t { - kHolidayIndex = 0, + kRangeMin = 0, + kRangeMax = 1, + kPercentMax = 2, + kPercentMin = 3, + kPercentTypical = 4, + kFixedMax = 5, + kFixedMin = 6, + kFixedTypical = 7, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - uint8_t holidayIndex = static_cast(0); + int64_t rangeMin = static_cast(0); + int64_t rangeMax = static_cast(0); + Optional percentMax; + Optional percentMin; + Optional percentTypical; + Optional fixedMax; + Optional fixedMin; + Optional fixedTypical; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = DataModel::NullObjectType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } +using DecodableType = Type; - uint8_t holidayIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ClearHolidaySchedule -namespace SetUser { +} // namespace MeasurementAccuracyRangeStruct +namespace MeasurementAccuracyStruct { enum class Fields : uint8_t { - kOperationType = 0, - kUserIndex = 1, - kUserName = 2, - kUserUniqueID = 3, - kUserStatus = 4, - kUserType = 5, - kCredentialRule = 6, + kMeasurementType = 0, + kMeasured = 1, + kMinMeasuredValue = 2, + kMaxMeasuredValue = 3, + kAccuracyRanges = 4, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + MeasurementTypeEnum measurementType = static_cast(0); + bool measured = static_cast(0); + int64_t minMeasuredValue = static_cast(0); + int64_t maxMeasuredValue = static_cast(0); + DataModel::List accuracyRanges; - DataOperationTypeEnum operationType = static_cast(0); - uint16_t userIndex = static_cast(0); - DataModel::Nullable userName; - DataModel::Nullable userUniqueID; - DataModel::Nullable userStatus; - DataModel::Nullable userType; - DataModel::Nullable credentialRule; + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + MeasurementTypeEnum measurementType = static_cast(0); + bool measured = static_cast(0); + int64_t minMeasuredValue = static_cast(0); + int64_t maxMeasuredValue = static_cast(0); + DataModel::DecodableList accuracyRanges; - DataOperationTypeEnum operationType = static_cast(0); - uint16_t userIndex = static_cast(0); - DataModel::Nullable userName; - DataModel::Nullable userUniqueID; - DataModel::Nullable userStatus; - DataModel::Nullable userType; - DataModel::Nullable credentialRule; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace SetUser -namespace GetUser { + +} // namespace MeasurementAccuracyStruct +namespace EnergyMeasurementStruct { enum class Fields : uint8_t { - kUserIndex = 0, + kEnergy = 0, + kStartTimestamp = 1, + kEndTimestamp = 2, + kStartSystime = 3, + kEndSystime = 4, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + int64_t energy = static_cast(0); + Optional startTimestamp; + Optional endTimestamp; + Optional startSystime; + Optional endSystime; - uint16_t userIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = Clusters::DoorLock::Commands::GetUserResponse::DecodableType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return false; } -}; +} // namespace EnergyMeasurementStruct +} // namespace Structs -struct DecodableType +namespace Attributes { + +namespace Accuracy { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + using Type = chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::Type; + using DecodableType = chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::DecodableType; + using DecodableArgType = + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::DecodableType &; - uint16_t userIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Accuracy::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace GetUser -namespace GetUserResponse { +} // namespace Accuracy +namespace CumulativeEnergyImported { +struct TypeInfo +{ + using Type = + chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CumulativeEnergyImported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CumulativeEnergyImported +namespace CumulativeEnergyExported { +struct TypeInfo +{ + using Type = + chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CumulativeEnergyExported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CumulativeEnergyExported +namespace PeriodicEnergyImported { +struct TypeInfo +{ + using Type = + chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeriodicEnergyImported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeriodicEnergyImported +namespace PeriodicEnergyExported { +struct TypeInfo +{ + using Type = + chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeriodicEnergyExported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeriodicEnergyExported +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Accuracy::TypeInfo::DecodableType accuracy; + Attributes::CumulativeEnergyImported::TypeInfo::DecodableType cumulativeEnergyImported; + Attributes::CumulativeEnergyExported::TypeInfo::DecodableType cumulativeEnergyExported; + Attributes::PeriodicEnergyImported::TypeInfo::DecodableType periodicEnergyImported; + Attributes::PeriodicEnergyExported::TypeInfo::DecodableType periodicEnergyExported; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace CumulativeEnergyMeasured { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kUserIndex = 0, - kUserName = 1, - kUserUniqueID = 2, - kUserStatus = 3, - kUserType = 4, - kCredentialRule = 5, - kCredentials = 6, - kCreatorFabricIndex = 7, - kLastModifiedFabricIndex = 8, - kNextUserIndex = 9, + kEnergyImported = 0, + kEnergyExported = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::CumulativeEnergyMeasured::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr bool kIsFabricScoped = false; - uint16_t userIndex = static_cast(0); - DataModel::Nullable userName; - DataModel::Nullable userUniqueID; - DataModel::Nullable userStatus; - DataModel::Nullable userType; - DataModel::Nullable credentialRule; - DataModel::Nullable> credentials; - DataModel::Nullable creatorFabricIndex; - DataModel::Nullable lastModifiedFabricIndex; - DataModel::Nullable nextUserIndex; + Optional energyImported; + Optional energyExported; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = DataModel::NullObjectType; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::CumulativeEnergyMeasured::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } - static constexpr bool MustUseTimedInvoke() { return false; } + Optional energyImported; + Optional energyExported; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace CumulativeEnergyMeasured +namespace PeriodicEnergyMeasured { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kEnergyImported = 0, + kEnergyExported = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PeriodicEnergyMeasured::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + static constexpr bool kIsFabricScoped = false; + + Optional energyImported; + Optional energyExported; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PeriodicEnergyMeasured::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalEnergyMeasurement::Id; } + + Optional energyImported; + Optional energyExported; - uint16_t userIndex = static_cast(0); - DataModel::Nullable userName; - DataModel::Nullable userUniqueID; - DataModel::Nullable userStatus; - DataModel::Nullable userType; - DataModel::Nullable credentialRule; - DataModel::Nullable> credentials; - DataModel::Nullable creatorFabricIndex; - DataModel::Nullable lastModifiedFabricIndex; - DataModel::Nullable nextUserIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetUserResponse -namespace ClearUser { +} // namespace PeriodicEnergyMeasured +} // namespace Events +} // namespace ElectricalEnergyMeasurement +namespace DemandResponseLoadControl { +namespace Structs { +namespace HeatingSourceControlStruct { enum class Fields : uint8_t { - kUserIndex = 0, + kHeatingSource = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + HeatingSourceEnum heatingSource = static_cast(0); - uint16_t userIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = DataModel::NullObjectType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return true; } +} // namespace HeatingSourceControlStruct +namespace PowerSavingsControlStruct { +enum class Fields : uint8_t +{ + kPowerSavings = 0, }; -struct DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + chip::Percent powerSavings = static_cast(0); - uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -}; // namespace ClearUser -namespace SetCredential { + +using DecodableType = Type; + +} // namespace PowerSavingsControlStruct +namespace DutyCycleControlStruct { enum class Fields : uint8_t { - kOperationType = 0, - kCredential = 1, - kCredentialData = 2, - kUserIndex = 3, - kUserStatus = 4, - kUserType = 5, + kDutyCycle = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + chip::Percent dutyCycle = static_cast(0); - DataOperationTypeEnum operationType = static_cast(0); - Structs::CredentialStruct::Type credential; - chip::ByteSpan credentialData; - DataModel::Nullable userIndex; - DataModel::Nullable userStatus; - DataModel::Nullable userType; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return true; } +} // namespace DutyCycleControlStruct +namespace AverageLoadControlStruct { +enum class Fields : uint8_t +{ + kLoadAdjustment = 0, }; -struct DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + int8_t loadAdjustment = static_cast(0); - DataOperationTypeEnum operationType = static_cast(0); - Structs::CredentialStruct::DecodableType credential; - chip::ByteSpan credentialData; - DataModel::Nullable userIndex; - DataModel::Nullable userStatus; - DataModel::Nullable userType; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -}; // namespace SetCredential -namespace SetCredentialResponse { + +using DecodableType = Type; + +} // namespace AverageLoadControlStruct +namespace TemperatureControlStruct { enum class Fields : uint8_t { - kStatus = 0, - kUserIndex = 1, - kNextCredentialIndex = 2, + kCoolingTempOffset = 0, + kHeatingtTempOffset = 1, + kCoolingTempSetpoint = 2, + kHeatingTempSetpoint = 3, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + Optional> coolingTempOffset; + Optional> heatingtTempOffset; + Optional> coolingTempSetpoint; + Optional> heatingTempSetpoint; - DlStatus status = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable nextCredentialIndex; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = DataModel::NullObjectType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return false; } +} // namespace TemperatureControlStruct +namespace LoadControlEventTransitionStruct { +enum class Fields : uint8_t +{ + kDuration = 0, + kControl = 1, + kTemperatureControl = 2, + kAverageLoadControl = 3, + kDutyCycleControl = 4, + kPowerSavingsControl = 5, + kHeatingSourceControl = 6, }; -struct DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint16_t duration = static_cast(0); + chip::BitMask control = static_cast>(0); + Optional temperatureControl; + Optional averageLoadControl; + Optional dutyCycleControl; + Optional powerSavingsControl; + Optional heatingSourceControl; - DlStatus status = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable nextCredentialIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -}; // namespace SetCredentialResponse -namespace GetCredentialStatus { + +using DecodableType = Type; + +} // namespace LoadControlEventTransitionStruct +namespace LoadControlEventStruct { enum class Fields : uint8_t { - kCredential = 0, + kEventID = 0, + kProgramID = 1, + kControl = 2, + kDeviceClass = 3, + kEnrollmentGroup = 4, + kCriticality = 5, + kStartTime = 6, + kTransitions = 7, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + chip::ByteSpan eventID; + DataModel::Nullable programID; + chip::BitMask control = static_cast>(0); + chip::BitMask deviceClass = static_cast>(0); + Optional enrollmentGroup; + CriticalityLevelEnum criticality = static_cast(0); + DataModel::Nullable startTime; + DataModel::List transitions; - Structs::CredentialStruct::Type credential; + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; +struct DecodableType +{ +public: + chip::ByteSpan eventID; + DataModel::Nullable programID; + chip::BitMask control = static_cast>(0); + chip::BitMask deviceClass = static_cast>(0); + Optional enrollmentGroup; + CriticalityLevelEnum criticality = static_cast(0); + DataModel::Nullable startTime; + DataModel::DecodableList transitions; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -struct DecodableType +} // namespace LoadControlEventStruct +namespace LoadControlProgramStruct { +enum class Fields : uint8_t +{ + kProgramID = 0, + kName = 1, + kEnrollmentGroup = 2, + kRandomStartMinutes = 3, + kRandomDurationMinutes = 4, +}; + +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + chip::ByteSpan programID; + chip::CharSpan name; + DataModel::Nullable enrollmentGroup; + DataModel::Nullable randomStartMinutes; + DataModel::Nullable randomDurationMinutes; - Structs::CredentialStruct::DecodableType credential; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -}; // namespace GetCredentialStatus -namespace GetCredentialStatusResponse { + +using DecodableType = Type; + +} // namespace LoadControlProgramStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace RegisterLoadControlProgramRequest { +struct Type; +struct DecodableType; +} // namespace RegisterLoadControlProgramRequest + +namespace UnregisterLoadControlProgramRequest { +struct Type; +struct DecodableType; +} // namespace UnregisterLoadControlProgramRequest + +namespace AddLoadControlEventRequest { +struct Type; +struct DecodableType; +} // namespace AddLoadControlEventRequest + +namespace RemoveLoadControlEventRequest { +struct Type; +struct DecodableType; +} // namespace RemoveLoadControlEventRequest + +namespace ClearLoadControlEventsRequest { +struct Type; +struct DecodableType; +} // namespace ClearLoadControlEventsRequest + +} // namespace Commands + +namespace Commands { +namespace RegisterLoadControlProgramRequest { enum class Fields : uint8_t { - kCredentialExists = 0, - kUserIndex = 1, - kCreatorFabricIndex = 2, - kLastModifiedFabricIndex = 3, - kNextCredentialIndex = 4, + kLoadControlProgram = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatusResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterLoadControlProgramRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - bool credentialExists = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable creatorFabricIndex; - DataModel::Nullable lastModifiedFabricIndex; - DataModel::Nullable nextCredentialIndex; + Structs::LoadControlProgramStruct::Type loadControlProgram; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -19922,552 +20769,283 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatusResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterLoadControlProgramRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - bool credentialExists = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable creatorFabricIndex; - DataModel::Nullable lastModifiedFabricIndex; - DataModel::Nullable nextCredentialIndex; + Structs::LoadControlProgramStruct::DecodableType loadControlProgram; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetCredentialStatusResponse -namespace ClearCredential { +}; // namespace RegisterLoadControlProgramRequest +namespace UnregisterLoadControlProgramRequest { enum class Fields : uint8_t { - kCredential = 0, + kLoadControlProgramID = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearCredential::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterLoadControlProgramRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - DataModel::Nullable credential; + chip::ByteSpan loadControlProgramID; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ClearCredential::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterLoadControlProgramRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - DataModel::Nullable credential; + chip::ByteSpan loadControlProgramID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ClearCredential -namespace UnboltDoor { +}; // namespace UnregisterLoadControlProgramRequest +namespace AddLoadControlEventRequest { enum class Fields : uint8_t { - kPINCode = 0, + kEvent = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UnboltDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddLoadControlEventRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - Optional PINCode; + Structs::LoadControlEventStruct::Type event; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UnboltDoor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddLoadControlEventRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - Optional PINCode; + Structs::LoadControlEventStruct::DecodableType event; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UnboltDoor -} // namespace Commands - -namespace Attributes { - -namespace LockState { -struct TypeInfo +}; // namespace AddLoadControlEventRequest +namespace RemoveLoadControlEventRequest { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LockState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kEventID = 0, + kCancelControl = 1, }; -} // namespace LockState -namespace LockType { -struct TypeInfo + +struct Type { - using Type = chip::app::Clusters::DoorLock::DlLockType; - using DecodableType = chip::app::Clusters::DoorLock::DlLockType; - using DecodableArgType = chip::app::Clusters::DoorLock::DlLockType; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RemoveLoadControlEventRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LockType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::ByteSpan eventID; + chip::BitMask cancelControl = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace LockType -namespace ActuatorEnabled { -struct TypeInfo + +struct DecodableType { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; +public: + static constexpr CommandId GetCommandId() { return Commands::RemoveLoadControlEventRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActuatorEnabled::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::ByteSpan eventID; + chip::BitMask cancelControl = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ActuatorEnabled -namespace DoorState { -struct TypeInfo +}; // namespace RemoveLoadControlEventRequest +namespace ClearLoadControlEventsRequest { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DoorState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DoorState -namespace DoorOpenEvents { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearLoadControlEventsRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DoorOpenEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace DoorOpenEvents -namespace DoorClosedEvents { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::ClearLoadControlEventsRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DoorClosedEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DoorClosedEvents -namespace OpenPeriod { +}; // namespace ClearLoadControlEventsRequest +} // namespace Commands + +namespace Attributes { + +namespace LoadControlPrograms { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OpenPeriod::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LoadControlPrograms::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OpenPeriod -namespace NumberOfTotalUsersSupported { +} // namespace LoadControlPrograms +namespace NumberOfLoadControlPrograms { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfTotalUsersSupported::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfLoadControlPrograms::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfTotalUsersSupported -namespace NumberOfPINUsersSupported { +} // namespace NumberOfLoadControlPrograms +namespace Events { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPINUsersSupported::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Events::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfPINUsersSupported -namespace NumberOfRFIDUsersSupported { +} // namespace Events +namespace ActiveEvents { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRFIDUsersSupported::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfRFIDUsersSupported -namespace NumberOfWeekDaySchedulesSupportedPerUser { +} // namespace ActiveEvents +namespace NumberOfEventsPerProgram { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfEventsPerProgram::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfWeekDaySchedulesSupportedPerUser -namespace NumberOfYearDaySchedulesSupportedPerUser { +} // namespace NumberOfEventsPerProgram +namespace NumberOfTransitions { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfTransitions::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfYearDaySchedulesSupportedPerUser -namespace NumberOfHolidaySchedulesSupported { +} // namespace NumberOfTransitions +namespace DefaultRandomStart { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfHolidaySchedulesSupported::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultRandomStart::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfHolidaySchedulesSupported -namespace MaxPINCodeLength { +} // namespace DefaultRandomStart +namespace DefaultRandomDuration { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPINCodeLength::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultRandomDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxPINCodeLength -namespace MinPINCodeLength { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinPINCodeLength::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinPINCodeLength -namespace MaxRFIDCodeLength { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxRFIDCodeLength::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxRFIDCodeLength -namespace MinRFIDCodeLength { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinRFIDCodeLength::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinRFIDCodeLength -namespace CredentialRulesSupport { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CredentialRulesSupport::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CredentialRulesSupport -namespace NumberOfCredentialsSupportedPerUser { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfCredentialsSupportedPerUser::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NumberOfCredentialsSupportedPerUser -namespace Language { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Language::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 3; } -}; -} // namespace Language -namespace LEDSettings { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LEDSettings::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LEDSettings -namespace AutoRelockTime { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AutoRelockTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AutoRelockTime -namespace SoundVolume { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoundVolume::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SoundVolume -namespace OperatingMode { -struct TypeInfo -{ - using Type = chip::app::Clusters::DoorLock::OperatingModeEnum; - using DecodableType = chip::app::Clusters::DoorLock::OperatingModeEnum; - using DecodableArgType = chip::app::Clusters::DoorLock::OperatingModeEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperatingMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OperatingMode -namespace SupportedOperatingModes { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedOperatingModes::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportedOperatingModes -namespace DefaultConfigurationRegister { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DefaultConfigurationRegister::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DefaultConfigurationRegister -namespace EnableLocalProgramming { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnableLocalProgramming::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnableLocalProgramming -namespace EnableOneTouchLocking { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnableOneTouchLocking::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnableOneTouchLocking -namespace EnableInsideStatusLED { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnableInsideStatusLED::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnableInsideStatusLED -namespace EnablePrivacyModeButton { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnablePrivacyModeButton::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnablePrivacyModeButton -namespace LocalProgrammingFeatures { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocalProgrammingFeatures::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LocalProgrammingFeatures -namespace WrongCodeEntryLimit { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WrongCodeEntryLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WrongCodeEntryLimit -namespace UserCodeTemporaryDisableTime { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UserCodeTemporaryDisableTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace UserCodeTemporaryDisableTime -namespace SendPINOverTheAir { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SendPINOverTheAir::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SendPINOverTheAir -namespace RequirePINforRemoteOperation { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RequirePINforRemoteOperation::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RequirePINforRemoteOperation -namespace ExpiringUserTimeout { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ExpiringUserTimeout::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ExpiringUserTimeout +} // namespace DefaultRandomDuration namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } }; } // namespace ClusterRevision @@ -20475,55 +21053,18 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LockState::TypeInfo::DecodableType lockState; - Attributes::LockType::TypeInfo::DecodableType lockType = static_cast(0); - Attributes::ActuatorEnabled::TypeInfo::DecodableType actuatorEnabled = static_cast(0); - Attributes::DoorState::TypeInfo::DecodableType doorState; - Attributes::DoorOpenEvents::TypeInfo::DecodableType doorOpenEvents = static_cast(0); - Attributes::DoorClosedEvents::TypeInfo::DecodableType doorClosedEvents = static_cast(0); - Attributes::OpenPeriod::TypeInfo::DecodableType openPeriod = static_cast(0); - Attributes::NumberOfTotalUsersSupported::TypeInfo::DecodableType numberOfTotalUsersSupported = static_cast(0); - Attributes::NumberOfPINUsersSupported::TypeInfo::DecodableType numberOfPINUsersSupported = static_cast(0); - Attributes::NumberOfRFIDUsersSupported::TypeInfo::DecodableType numberOfRFIDUsersSupported = static_cast(0); - Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfWeekDaySchedulesSupportedPerUser = - static_cast(0); - Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfYearDaySchedulesSupportedPerUser = - static_cast(0); - Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::DecodableType numberOfHolidaySchedulesSupported = - static_cast(0); - Attributes::MaxPINCodeLength::TypeInfo::DecodableType maxPINCodeLength = static_cast(0); - Attributes::MinPINCodeLength::TypeInfo::DecodableType minPINCodeLength = static_cast(0); - Attributes::MaxRFIDCodeLength::TypeInfo::DecodableType maxRFIDCodeLength = static_cast(0); - Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength = static_cast(0); - Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = - static_cast>(0); - Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableType numberOfCredentialsSupportedPerUser = - static_cast(0); - Attributes::Language::TypeInfo::DecodableType language; - Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); - Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime = static_cast(0); - Attributes::SoundVolume::TypeInfo::DecodableType soundVolume = static_cast(0); - Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = - static_cast(0); - Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = - static_cast>(0); - Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister = - static_cast>(0); - Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming = static_cast(0); - Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking = static_cast(0); - Attributes::EnableInsideStatusLED::TypeInfo::DecodableType enableInsideStatusLED = static_cast(0); - Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType enablePrivacyModeButton = static_cast(0); - Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures = - static_cast>(0); - Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType wrongCodeEntryLimit = static_cast(0); - Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType userCodeTemporaryDisableTime = static_cast(0); - Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir = static_cast(0); - Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType requirePINforRemoteOperation = static_cast(0); - Attributes::ExpiringUserTimeout::TypeInfo::DecodableType expiringUserTimeout = static_cast(0); + Attributes::LoadControlPrograms::TypeInfo::DecodableType loadControlPrograms; + Attributes::NumberOfLoadControlPrograms::TypeInfo::DecodableType numberOfLoadControlPrograms = static_cast(0); + Attributes::Events::TypeInfo::DecodableType events; + Attributes::ActiveEvents::TypeInfo::DecodableType activeEvents; + Attributes::NumberOfEventsPerProgram::TypeInfo::DecodableType numberOfEventsPerProgram = static_cast(0); + Attributes::NumberOfTransitions::TypeInfo::DecodableType numberOfTransitions = static_cast(0); + Attributes::DefaultRandomStart::TypeInfo::DecodableType defaultRandomStart = static_cast(0); + Attributes::DefaultRandomDuration::TypeInfo::DecodableType defaultRandomDuration = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -20534,23 +21075,41 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace DoorLockAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +namespace LoadControlEventStatusChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kAlarmCode = 0, + kEventID = 0, + kTransitionIndex = 1, + kStatus = 2, + kCriticality = 3, + kControl = 4, + kTemperatureControl = 5, + kAverageLoadControl = 6, + kDutyCycleControl = 7, + kPowerSavingsControl = 8, + kHeatingSourceControl = 9, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr EventId GetEventId() { return Events::LoadControlEventStatusChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } static constexpr bool kIsFabricScoped = false; - AlarmCodeEnum alarmCode = static_cast(0); + chip::ByteSpan eventID; + DataModel::Nullable transitionIndex; + LoadControlEventStatusEnum status = static_cast(0); + CriticalityLevelEnum criticality = static_cast(0); + chip::BitMask control = static_cast>(0); + Optional> temperatureControl; + Optional> averageLoadControl; + Optional> dutyCycleControl; + Optional> powerSavingsControl; + Optional> heatingSourceControl; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -20559,31 +21118,100 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr EventId GetEventId() { return Events::LoadControlEventStatusChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - AlarmCodeEnum alarmCode = static_cast(0); + chip::ByteSpan eventID; + DataModel::Nullable transitionIndex; + LoadControlEventStatusEnum status = static_cast(0); + CriticalityLevelEnum criticality = static_cast(0); + chip::BitMask control = static_cast>(0); + Optional> temperatureControl; + Optional> averageLoadControl; + Optional> dutyCycleControl; + Optional> powerSavingsControl; + Optional> heatingSourceControl; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DoorLockAlarm -namespace DoorStateChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +} // namespace LoadControlEventStatusChange +} // namespace Events +} // namespace DemandResponseLoadControl +namespace DeviceEnergyManagement { +namespace Structs { +namespace CostStruct { enum class Fields : uint8_t { - kDoorState = 0, + kCostType = 0, + kValue = 1, + kDecimalPoints = 2, + kCurrency = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + CostTypeEnum costType = static_cast(0); + int32_t value = static_cast(0); + uint8_t decimalPoints = static_cast(0); + Optional currency; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr bool kIsFabricScoped = false; - DoorStateEnum doorState = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace CostStruct +namespace SlotStruct { +enum class Fields : uint8_t +{ + kMinDuration = 0, + kMaxDuration = 1, + kDefaultDuration = 2, + kElapsedSlotTime = 3, + kRemainingSlotTime = 4, + kSlotIsPauseable = 5, + kMinPauseDuration = 6, + kMaxPauseDuration = 7, + kManufacturerESAState = 8, + kNominalPower = 9, + kMinPower = 10, + kMaxPower = 11, + kNominalEnergy = 12, + kCosts = 13, + kMinPowerAdjustment = 14, + kMaxPowerAdjustment = 15, + kMinDurationAdjustment = 16, + kMaxDurationAdjustment = 17, +}; + +struct Type +{ +public: + uint32_t minDuration = static_cast(0); + uint32_t maxDuration = static_cast(0); + uint32_t defaultDuration = static_cast(0); + uint32_t elapsedSlotTime = static_cast(0); + uint32_t remainingSlotTime = static_cast(0); + bool slotIsPauseable = static_cast(0); + uint32_t minPauseDuration = static_cast(0); + uint32_t maxPauseDuration = static_cast(0); + Optional manufacturerESAState; + Optional nominalPower; + Optional minPower; + Optional maxPower; + Optional nominalEnergy; + Optional> costs; + Optional minPowerAdjustment; + Optional maxPowerAdjustment; + Optional minDurationAdjustment; + Optional maxDurationAdjustment; + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -20591,42 +21219,57 @@ struct Type struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - DoorStateEnum doorState = static_cast(0); + uint32_t minDuration = static_cast(0); + uint32_t maxDuration = static_cast(0); + uint32_t defaultDuration = static_cast(0); + uint32_t elapsedSlotTime = static_cast(0); + uint32_t remainingSlotTime = static_cast(0); + bool slotIsPauseable = static_cast(0); + uint32_t minPauseDuration = static_cast(0); + uint32_t maxPauseDuration = static_cast(0); + Optional manufacturerESAState; + Optional nominalPower; + Optional minPower; + Optional maxPower; + Optional nominalEnergy; + Optional> costs; + Optional minPowerAdjustment; + Optional maxPowerAdjustment; + Optional minDurationAdjustment; + Optional maxDurationAdjustment; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace DoorStateChange -namespace LockOperation { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace SlotStruct +namespace ForecastStruct { enum class Fields : uint8_t { - kLockOperationType = 0, - kOperationSource = 1, - kUserIndex = 2, - kFabricIndex = 3, - kSourceNode = 4, - kCredentials = 5, + kForecastId = 0, + kActiveSlotNumber = 1, + kStartTime = 2, + kEndTime = 3, + kEarliestStartTime = 4, + kLatestEndTime = 5, + kIsPauseable = 6, + kSlots = 7, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr bool kIsFabricScoped = false; + uint16_t forecastId = static_cast(0); + DataModel::Nullable activeSlotNumber; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); + Optional> earliestStartTime; + Optional latestEndTime; + bool isPauseable = static_cast(0); + DataModel::List slots; - LockOperationTypeEnum lockOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - Optional>> credentials; + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -20634,178 +21277,161 @@ struct Type struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - LockOperationTypeEnum lockOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - Optional>> credentials; + uint16_t forecastId = static_cast(0); + DataModel::Nullable activeSlotNumber; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); + Optional> earliestStartTime; + Optional latestEndTime; + bool isPauseable = static_cast(0); + DataModel::DecodableList slots; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace LockOperation -namespace LockOperationError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace ForecastStruct +namespace ConstraintsStruct { enum class Fields : uint8_t { - kLockOperationType = 0, - kOperationSource = 1, - kOperationError = 2, - kUserIndex = 3, - kFabricIndex = 4, - kSourceNode = 5, - kCredentials = 6, + kStartTime = 0, + kDuration = 1, + kNominalPower = 2, + kMaximumEnergy = 3, + kLoadControl = 4, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr bool kIsFabricScoped = false; + uint32_t startTime = static_cast(0); + uint32_t duration = static_cast(0); + Optional nominalPower; + Optional maximumEnergy; + Optional loadControl; - LockOperationTypeEnum lockOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - OperationErrorEnum operationError = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - Optional>> credentials; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType +using DecodableType = Type; + +} // namespace ConstraintsStruct +namespace PowerAdjustStruct { +enum class Fields : uint8_t { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + kMinPower = 0, + kMaxPower = 1, + kMinDuration = 2, + kMaxDuration = 3, +}; - LockOperationTypeEnum lockOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - OperationErrorEnum operationError = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - Optional>> credentials; +struct Type +{ +public: + int64_t minPower = static_cast(0); + int64_t maxPower = static_cast(0); + uint32_t minDuration = static_cast(0); + uint32_t maxDuration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LockOperationError -namespace LockUserChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +using DecodableType = Type; + +} // namespace PowerAdjustStruct +namespace SlotAdjustmentStruct { enum class Fields : uint8_t { - kLockDataType = 0, - kDataOperationType = 1, - kOperationSource = 2, - kUserIndex = 3, - kFabricIndex = 4, - kSourceNode = 5, - kDataIndex = 6, + kSlotIndex = 0, + kNominalPower = 1, + kDuration = 2, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t slotIndex = static_cast(0); + int64_t nominalPower = static_cast(0); + uint32_t duration = static_cast(0); - LockDataTypeEnum lockDataType = static_cast(0); - DataOperationTypeEnum dataOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - DataModel::Nullable dataIndex; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - - LockDataTypeEnum lockDataType = static_cast(0); - DataOperationTypeEnum dataOperationType = static_cast(0); - OperationSourceEnum operationSource = static_cast(0); - DataModel::Nullable userIndex; - DataModel::Nullable fabricIndex; - DataModel::Nullable sourceNode; - DataModel::Nullable dataIndex; +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace LockUserChange -} // namespace Events -} // namespace DoorLock -namespace WindowCovering { +} // namespace SlotAdjustmentStruct +} // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace UpOrOpen { +namespace PowerAdjustRequest { struct Type; struct DecodableType; -} // namespace UpOrOpen +} // namespace PowerAdjustRequest -namespace DownOrClose { +namespace CancelPowerAdjustRequest { struct Type; struct DecodableType; -} // namespace DownOrClose +} // namespace CancelPowerAdjustRequest -namespace StopMotion { +namespace StartTimeAdjustRequest { struct Type; struct DecodableType; -} // namespace StopMotion +} // namespace StartTimeAdjustRequest -namespace GoToLiftValue { +namespace PauseRequest { struct Type; struct DecodableType; -} // namespace GoToLiftValue +} // namespace PauseRequest -namespace GoToLiftPercentage { +namespace ResumeRequest { struct Type; struct DecodableType; -} // namespace GoToLiftPercentage +} // namespace ResumeRequest -namespace GoToTiltValue { +namespace ModifyForecastRequest { struct Type; struct DecodableType; -} // namespace GoToTiltValue +} // namespace ModifyForecastRequest -namespace GoToTiltPercentage { +namespace RequestConstraintBasedForecast { struct Type; struct DecodableType; -} // namespace GoToTiltPercentage +} // namespace RequestConstraintBasedForecast } // namespace Commands namespace Commands { -namespace UpOrOpen { +namespace PowerAdjustRequest { enum class Fields : uint8_t { + kPower = 0, + kDuration = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UpOrOpen::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + int64_t power = static_cast(0); + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20817,13 +21443,15 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UpOrOpen::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::PowerAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + int64_t power = static_cast(0); + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UpOrOpen -namespace DownOrClose { +}; // namespace PowerAdjustRequest +namespace CancelPowerAdjustRequest { enum class Fields : uint8_t { }; @@ -20832,8 +21460,8 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::DownOrClose::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelPowerAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20845,23 +21473,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::DownOrClose::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelPowerAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace DownOrClose -namespace StopMotion { +}; // namespace CancelPowerAdjustRequest +namespace StartTimeAdjustRequest { enum class Fields : uint8_t { + kRequestedStartTime = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopMotion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::StartTimeAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + uint32_t requestedStartTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20873,26 +21504,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StopMotion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::StartTimeAdjustRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + uint32_t requestedStartTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StopMotion -namespace GoToLiftValue { +}; // namespace StartTimeAdjustRequest +namespace PauseRequest { enum class Fields : uint8_t { - kLiftValue = 0, + kDuration = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint16_t liftValue = static_cast(0); + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20904,27 +21536,24 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::PauseRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint16_t liftValue = static_cast(0); + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GoToLiftValue -namespace GoToLiftPercentage { +}; // namespace PauseRequest +namespace ResumeRequest { enum class Fields : uint8_t { - kLiftPercent100thsValue = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - - chip::Percent100ths liftPercent100thsValue = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::ResumeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20936,27 +21565,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::ResumeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - chip::Percent100ths liftPercent100thsValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GoToLiftPercentage -namespace GoToTiltValue { +}; // namespace ResumeRequest +namespace ModifyForecastRequest { enum class Fields : uint8_t { - kTiltValue = 0, + kForecastId = 0, + kSlotAdjustments = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::ModifyForecastRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint16_t tiltValue = static_cast(0); + uint32_t forecastId = static_cast(0); + DataModel::List slotAdjustments; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -20968,27 +21598,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::ModifyForecastRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - uint16_t tiltValue = static_cast(0); + uint32_t forecastId = static_cast(0); + DataModel::DecodableList slotAdjustments; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GoToTiltValue -namespace GoToTiltPercentage { +}; // namespace ModifyForecastRequest +namespace RequestConstraintBasedForecast { enum class Fields : uint8_t { - kTiltPercent100thsValue = 0, + kConstraints = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::RequestConstraintBasedForecast::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - chip::Percent100ths tiltPercent100thsValue = static_cast(0); + DataModel::List constraints; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21000,394 +21631,386 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr CommandId GetCommandId() { return Commands::RequestConstraintBasedForecast::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - chip::Percent100ths tiltPercent100thsValue = static_cast(0); + DataModel::DecodableList constraints; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GoToTiltPercentage +}; // namespace RequestConstraintBasedForecast } // namespace Commands namespace Attributes { -namespace Type { +namespace ESAType { struct TypeInfo { - using Type = chip::app::Clusters::WindowCovering::Type; - using DecodableType = chip::app::Clusters::WindowCovering::Type; - using DecodableArgType = chip::app::Clusters::WindowCovering::Type; + using Type = chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum; + using DecodableType = chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum; + using DecodableArgType = chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Type::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ESAType::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Type -namespace PhysicalClosedLimitLift { +} // namespace ESAType +namespace ESACanGenerate { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitLift::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ESACanGenerate::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalClosedLimitLift -namespace PhysicalClosedLimitTilt { +} // namespace ESACanGenerate +namespace ESAState { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum; + using DecodableType = chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum; + using DecodableArgType = chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitTilt::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ESAState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalClosedLimitTilt -namespace CurrentPositionLift { +} // namespace ESAState +namespace AbsMinPower { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLift::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMinPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionLift -namespace CurrentPositionTilt { +} // namespace AbsMinPower +namespace AbsMaxPower { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTilt::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMaxPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionTilt -namespace NumberOfActuationsLift { +} // namespace AbsMaxPower +namespace PowerAdjustmentCapability { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable< + chip::app::DataModel::List>; + using DecodableType = chip::app::DataModel::Nullable>; + using DecodableArgType = const chip::app::DataModel::Nullable> &; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsLift::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PowerAdjustmentCapability::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfActuationsLift -namespace NumberOfActuationsTilt { +} // namespace PowerAdjustmentCapability +namespace Forecast { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsTilt::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Forecast::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfActuationsTilt -namespace ConfigStatus { -struct TypeInfo +} // namespace Forecast +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ConfigStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace ConfigStatus -namespace CurrentPositionLiftPercentage { -struct TypeInfo +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercentage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace CurrentPositionLiftPercentage -namespace CurrentPositionTiltPercentage { -struct TypeInfo +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercentage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace CurrentPositionTiltPercentage -namespace OperationalStatus { -struct TypeInfo +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace OperationalStatus -namespace TargetPositionLiftPercent100ths { -struct TypeInfo +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionLiftPercent100ths::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace TargetPositionLiftPercent100ths -namespace TargetPositionTiltPercent100ths { -struct TypeInfo +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionTiltPercent100ths::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } }; -} // namespace TargetPositionTiltPercent100ths -namespace EndProductType { -struct TypeInfo -{ - using Type = chip::app::Clusters::WindowCovering::EndProductType; - using DecodableType = chip::app::Clusters::WindowCovering::EndProductType; - using DecodableArgType = chip::app::Clusters::WindowCovering::EndProductType; +} // namespace ClusterRevision - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EndProductType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EndProductType -namespace CurrentPositionLiftPercent100ths { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercent100ths::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::ESAType::TypeInfo::DecodableType ESAType = + static_cast(0); + Attributes::ESACanGenerate::TypeInfo::DecodableType ESACanGenerate = static_cast(0); + Attributes::ESAState::TypeInfo::DecodableType ESAState = + static_cast(0); + Attributes::AbsMinPower::TypeInfo::DecodableType absMinPower = static_cast(0); + Attributes::AbsMaxPower::TypeInfo::DecodableType absMaxPower = static_cast(0); + Attributes::PowerAdjustmentCapability::TypeInfo::DecodableType powerAdjustmentCapability; + Attributes::Forecast::TypeInfo::DecodableType forecast; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace CurrentPositionLiftPercent100ths -namespace CurrentPositionTiltPercent100ths { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace Attributes +namespace Events { +namespace PowerAdjustStart { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercent100ths::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace CurrentPositionTiltPercent100ths -namespace InstalledOpenLimitLift { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerAdjustStart::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace InstalledOpenLimitLift -namespace InstalledClosedLimitLift { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerAdjustStart::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitLift::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InstalledClosedLimitLift -namespace InstalledOpenLimitTilt { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +} // namespace PowerAdjustStart +namespace PowerAdjustEnd { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitTilt::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ + kCause = 0, + kDuration = 1, + kEnergyUse = 2, }; -} // namespace InstalledOpenLimitTilt -namespace InstalledClosedLimitTilt { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerAdjustEnd::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitTilt::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CauseEnum cause = static_cast(0); + uint32_t duration = static_cast(0); + int64_t energyUse = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace InstalledClosedLimitTilt -namespace Mode { -struct TypeInfo + +struct DecodableType { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerAdjustEnd::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CauseEnum cause = static_cast(0); + uint32_t duration = static_cast(0); + int64_t energyUse = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Mode -namespace SafetyStatus { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +} // namespace PowerAdjustEnd +namespace Paused { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SafetyStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace SafetyStatus -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Paused::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Paused::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +} // namespace Paused +namespace Resumed { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Resumed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Resumed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DeviceEnergyManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace Resumed +} // namespace Events +} // namespace DeviceEnergyManagement +namespace EnergyEvse { +namespace Structs { +namespace ChargingTargetStruct { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + kTargetTimeMinutesPastMidnight = 0, + kTargetSoC = 1, + kAddedEnergy = 2, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +public: + uint16_t targetTimeMinutesPastMidnight = static_cast(0); + Optional targetSoC; + Optional addedEnergy; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Decode(TLV::TLVReader & reader); - Attributes::Type::TypeInfo::DecodableType type = static_cast(0); - Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift = static_cast(0); - Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt = static_cast(0); - Attributes::CurrentPositionLift::TypeInfo::DecodableType currentPositionLift; - Attributes::CurrentPositionTilt::TypeInfo::DecodableType currentPositionTilt; - Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); - Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); - Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = - static_cast>(0); - Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; - Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; - Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = - static_cast>(0); - Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableType targetPositionLiftPercent100ths; - Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableType targetPositionTiltPercent100ths; - Attributes::EndProductType::TypeInfo::DecodableType endProductType = - static_cast(0); - Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableType currentPositionLiftPercent100ths; - Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableType currentPositionTiltPercent100ths; - Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift = static_cast(0); - Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); - Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); - Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); - Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); - Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = - static_cast>(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Attributes -} // namespace WindowCovering -namespace BarrierControl { + +using DecodableType = Type; + +} // namespace ChargingTargetStruct +} // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace BarrierControlGoToPercent { +namespace GetTargetsResponse { struct Type; struct DecodableType; -} // namespace BarrierControlGoToPercent +} // namespace GetTargetsResponse -namespace BarrierControlStop { +namespace Disable { struct Type; struct DecodableType; -} // namespace BarrierControlStop +} // namespace Disable + +namespace EnableCharging { +struct Type; +struct DecodableType; +} // namespace EnableCharging + +namespace EnableDischarging { +struct Type; +struct DecodableType; +} // namespace EnableDischarging + +namespace StartDiagnostics { +struct Type; +struct DecodableType; +} // namespace StartDiagnostics + +namespace SetTargets { +struct Type; +struct DecodableType; +} // namespace SetTargets + +namespace GetTargets { +struct Type; +struct DecodableType; +} // namespace GetTargets + +namespace ClearTargets { +struct Type; +struct DecodableType; +} // namespace ClearTargets } // namespace Commands namespace Commands { -namespace BarrierControlGoToPercent { +namespace GetTargetsResponse { enum class Fields : uint8_t { - kPercentOpen = 0, + kDayOfWeekforSequence = 0, + kChargingTargets = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - uint8_t percentOpen = static_cast(0); + chip::BitMask dayOfWeekforSequence = static_cast>(0); + DataModel::List chargingTargets; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -21399,14 +22022,15 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - uint8_t percentOpen = static_cast(0); + chip::BitMask dayOfWeekforSequence = static_cast>(0); + DataModel::DecodableList chargingTargets; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace BarrierControlGoToPercent -namespace BarrierControlStop { +}; // namespace GetTargetsResponse +namespace Disable { enum class Fields : uint8_t { }; @@ -21415,528 +22039,560 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::Disable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::Disable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace BarrierControlStop -} // namespace Commands - -namespace Attributes { - -namespace BarrierMovingState { -struct TypeInfo +}; // namespace Disable +namespace EnableCharging { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierMovingState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kChargingEnabledUntil = 0, + kMinimumChargeCurrent = 1, + kMaximumChargeCurrent = 2, }; -} // namespace BarrierMovingState -namespace BarrierSafetyStatus { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnableCharging::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierSafetyStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable chargingEnabledUntil; + int64_t minimumChargeCurrent = static_cast(0); + int64_t maximumChargeCurrent = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace BarrierSafetyStatus -namespace BarrierCapabilities { -struct TypeInfo + +struct DecodableType { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr CommandId GetCommandId() { return Commands::EnableCharging::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCapabilities::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable chargingEnabledUntil; + int64_t minimumChargeCurrent = static_cast(0); + int64_t maximumChargeCurrent = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BarrierCapabilities -namespace BarrierOpenEvents { -struct TypeInfo +}; // namespace EnableCharging +namespace EnableDischarging { +enum class Fields : uint8_t { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDischargingEnabledUntil = 0, + kMaximumDischargeCurrent = 1, }; -} // namespace BarrierOpenEvents -namespace BarrierCloseEvents { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnableDischarging::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCloseEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable dischargingEnabledUntil; + int64_t maximumDischargeCurrent = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace BarrierCloseEvents -namespace BarrierCommandOpenEvents { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::EnableDischarging::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandOpenEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable dischargingEnabledUntil; + int64_t maximumDischargeCurrent = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BarrierCommandOpenEvents -namespace BarrierCommandCloseEvents { -struct TypeInfo +}; // namespace EnableDischarging +namespace StartDiagnostics { +enum class Fields : uint8_t { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandCloseEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierCommandCloseEvents -namespace BarrierOpenPeriod { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StartDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenPeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace BarrierOpenPeriod -namespace BarrierClosePeriod { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::StartDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierClosePeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BarrierClosePeriod -namespace BarrierPosition { -struct TypeInfo +}; // namespace StartDiagnostics +namespace SetTargets { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierPosition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDayOfWeekforSequence = 0, + kChargingTargets = 1, }; -} // namespace BarrierPosition -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + chip::BitMask dayOfWeekforSequence = static_cast>(0); + DataModel::List chargingTargets; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + chip::BitMask dayOfWeekforSequence = static_cast>(0); + DataModel::DecodableList chargingTargets; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace SetTargets +namespace GetTargets { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + kDaysToReturn = 0, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + chip::BitMask daysToReturn = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + chip::BitMask daysToReturn = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace GetTargets +namespace ClearTargets { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); - Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); - Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); - Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); - Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); - Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); - Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); - Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); - Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); - Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace Attributes -} // namespace BarrierControl -namespace PumpConfigurationAndControl { + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ClearTargets::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ClearTargets +} // namespace Commands namespace Attributes { -namespace MaxPressure { +namespace State { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPressure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxPressure -namespace MaxSpeed { +} // namespace State +namespace SupplyState { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::EnergyEvse::SupplyStateEnum; + using DecodableType = chip::app::Clusters::EnergyEvse::SupplyStateEnum; + using DecodableArgType = chip::app::Clusters::EnergyEvse::SupplyStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxSpeed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupplyState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxSpeed -namespace MaxFlow { +} // namespace SupplyState +namespace FaultState { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::EnergyEvse::FaultStateEnum; + using DecodableType = chip::app::Clusters::EnergyEvse::FaultStateEnum; + using DecodableArgType = chip::app::Clusters::EnergyEvse::FaultStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxFlow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FaultState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxFlow -namespace MinConstPressure { +} // namespace FaultState +namespace ChargingEnabledUntil { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstPressure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChargingEnabledUntil::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinConstPressure -namespace MaxConstPressure { +} // namespace ChargingEnabledUntil +namespace DischargingEnabledUntil { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstPressure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DischargingEnabledUntil::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxConstPressure -namespace MinCompPressure { +} // namespace DischargingEnabledUntil +namespace CircuitCapacity { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinCompPressure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CircuitCapacity::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinCompPressure -namespace MaxCompPressure { +} // namespace CircuitCapacity +namespace MinimumChargeCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxCompPressure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinimumChargeCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxCompPressure -namespace MinConstSpeed { +} // namespace MinimumChargeCurrent +namespace MaximumChargeCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstSpeed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaximumChargeCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinConstSpeed -namespace MaxConstSpeed { +} // namespace MaximumChargeCurrent +namespace MaximumDischargeCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstSpeed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaximumDischargeCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxConstSpeed -namespace MinConstFlow { +} // namespace MaximumDischargeCurrent +namespace UserMaximumChargeCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int64_t; + using DecodableType = int64_t; + using DecodableArgType = int64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstFlow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserMaximumChargeCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinConstFlow -namespace MaxConstFlow { +} // namespace UserMaximumChargeCurrent +namespace RandomizationDelayWindow { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstFlow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RandomizationDelayWindow::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxConstFlow -namespace MinConstTemp { +} // namespace RandomizationDelayWindow +namespace NumberOfWeeklyTargets { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstTemp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeeklyTargets::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinConstTemp -namespace MaxConstTemp { +} // namespace NumberOfWeeklyTargets +namespace NumberOfDailyTargets { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstTemp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfDailyTargets::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxConstTemp -namespace PumpStatus { +} // namespace NumberOfDailyTargets +namespace NextChargeStartTime { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PumpStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NextChargeStartTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PumpStatus -namespace EffectiveOperationMode { +} // namespace NextChargeStartTime +namespace NextChargeTargetTime { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NextChargeTargetTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EffectiveOperationMode -namespace EffectiveControlMode { +} // namespace NextChargeTargetTime +namespace NextChargeRequiredEnergy { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NextChargeRequiredEnergy::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EffectiveControlMode -namespace Capacity { +} // namespace NextChargeRequiredEnergy +namespace NextChargeTargetSoC { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Capacity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NextChargeTargetSoC::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Capacity -namespace Speed { +} // namespace NextChargeTargetSoC +namespace ApproximateEVEfficiency { struct TypeInfo { using Type = chip::app::DataModel::Nullable; using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Speed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApproximateEVEfficiency::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Speed -namespace LifetimeRunningHours { +} // namespace ApproximateEVEfficiency +namespace StateOfCharge { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StateOfCharge::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LifetimeRunningHours -namespace Power { +} // namespace StateOfCharge +namespace BatteryCapacity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatteryCapacity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatteryCapacity +namespace VehicleID { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VehicleID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace VehicleID +namespace SessionID { struct TypeInfo { using Type = chip::app::DataModel::Nullable; using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Power::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SessionID::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Power -namespace LifetimeEnergyConsumed { +} // namespace SessionID +namespace SessionDuration { struct TypeInfo { using Type = chip::app::DataModel::Nullable; using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SessionDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LifetimeEnergyConsumed -namespace OperationMode { +} // namespace SessionDuration +namespace SessionEnergyCharged { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SessionEnergyCharged::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationMode -namespace ControlMode { +} // namespace SessionEnergyCharged +namespace SessionEnergyDischarged { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SessionEnergyDischarged::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ControlMode +} // namespace SessionEnergyDischarged namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } }; } // namespace ClusterRevision @@ -21944,38 +22600,37 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; - Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; - Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; - Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; - Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; - Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; - Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; - Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; - Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; - Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; - Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; - Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; - Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = - static_cast>(0); - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = - static_cast(0); - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = - static_cast(0); - Attributes::Capacity::TypeInfo::DecodableType capacity; - Attributes::Speed::TypeInfo::DecodableType speed; - Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; - Attributes::Power::TypeInfo::DecodableType power; - Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode = - static_cast(0); - Attributes::ControlMode::TypeInfo::DecodableType controlMode = - static_cast(0); + Attributes::State::TypeInfo::DecodableType state; + Attributes::SupplyState::TypeInfo::DecodableType supplyState = + static_cast(0); + Attributes::FaultState::TypeInfo::DecodableType faultState = + static_cast(0); + Attributes::ChargingEnabledUntil::TypeInfo::DecodableType chargingEnabledUntil; + Attributes::DischargingEnabledUntil::TypeInfo::DecodableType dischargingEnabledUntil; + Attributes::CircuitCapacity::TypeInfo::DecodableType circuitCapacity = static_cast(0); + Attributes::MinimumChargeCurrent::TypeInfo::DecodableType minimumChargeCurrent = static_cast(0); + Attributes::MaximumChargeCurrent::TypeInfo::DecodableType maximumChargeCurrent = static_cast(0); + Attributes::MaximumDischargeCurrent::TypeInfo::DecodableType maximumDischargeCurrent = static_cast(0); + Attributes::UserMaximumChargeCurrent::TypeInfo::DecodableType userMaximumChargeCurrent = static_cast(0); + Attributes::RandomizationDelayWindow::TypeInfo::DecodableType randomizationDelayWindow = static_cast(0); + Attributes::NumberOfWeeklyTargets::TypeInfo::DecodableType numberOfWeeklyTargets = static_cast(0); + Attributes::NumberOfDailyTargets::TypeInfo::DecodableType numberOfDailyTargets = static_cast(0); + Attributes::NextChargeStartTime::TypeInfo::DecodableType nextChargeStartTime; + Attributes::NextChargeTargetTime::TypeInfo::DecodableType nextChargeTargetTime; + Attributes::NextChargeRequiredEnergy::TypeInfo::DecodableType nextChargeRequiredEnergy; + Attributes::NextChargeTargetSoC::TypeInfo::DecodableType nextChargeTargetSoC; + Attributes::ApproximateEVEfficiency::TypeInfo::DecodableType approximateEVEfficiency; + Attributes::StateOfCharge::TypeInfo::DecodableType stateOfCharge; + Attributes::BatteryCapacity::TypeInfo::DecodableType batteryCapacity; + Attributes::VehicleID::TypeInfo::DecodableType vehicleID; + Attributes::SessionID::TypeInfo::DecodableType sessionID; + Attributes::SessionDuration::TypeInfo::DecodableType sessionDuration; + Attributes::SessionEnergyCharged::TypeInfo::DecodableType sessionEnergyCharged; + Attributes::SessionEnergyDischarged::TypeInfo::DecodableType sessionEnergyDischarged; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -21986,21 +22641,24 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace SupplyVoltageLow { +namespace EVConnected { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kSessionID = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EVConnected::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + uint32_t sessionID = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22008,27 +22666,40 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EVConnected::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + uint32_t sessionID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SupplyVoltageLow -namespace SupplyVoltageHigh { +} // namespace EVConnected +namespace EVNotDetected { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kSessionID = 0, + kState = 1, + kSessionDuration = 2, + kSessionEnergyCharged = 3, + kSessionEnergyDischarged = 4, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EVNotDetected::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + uint32_t sessionDuration = static_cast(0); + int64_t sessionEnergyCharged = static_cast(0); + Optional sessionEnergyDischarged; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22036,27 +22707,40 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EVNotDetected::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + uint32_t sessionDuration = static_cast(0); + int64_t sessionEnergyCharged = static_cast(0); + Optional sessionEnergyDischarged; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SupplyVoltageHigh -namespace PowerMissingPhase { +} // namespace EVNotDetected +namespace EnergyTransferStarted { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kSessionID = 0, + kState = 1, + kMaximumCurrent = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EnergyTransferStarted::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + int64_t maximumCurrent = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22064,27 +22748,40 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EnergyTransferStarted::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + int64_t maximumCurrent = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PowerMissingPhase -namespace SystemPressureLow { +} // namespace EnergyTransferStarted +namespace EnergyTransferStopped { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kSessionID = 0, + kState = 1, + kReason = 2, + kEnergyTransferred = 4, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EnergyTransferStopped::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + EnergyTransferStoppedReasonEnum reason = static_cast(0); + int64_t energyTransferred = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22092,27 +22789,41 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::EnergyTransferStopped::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + uint32_t sessionID = static_cast(0); + StateEnum state = static_cast(0); + EnergyTransferStoppedReasonEnum reason = static_cast(0); + int64_t energyTransferred = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SystemPressureLow -namespace SystemPressureHigh { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace EnergyTransferStopped +namespace Fault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kSessionID = 0, + kState = 1, + kFaultStatePreviousState = 2, + kFaultStateCurrentState = 4, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::Fault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + DataModel::Nullable sessionID; + StateEnum state = static_cast(0); + FaultStateEnum faultStatePreviousState = static_cast(0); + FaultStateEnum faultStateCurrentState = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22120,27 +22831,35 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::Fault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + DataModel::Nullable sessionID; + StateEnum state = static_cast(0); + FaultStateEnum faultStatePreviousState = static_cast(0); + FaultStateEnum faultStateCurrentState = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SystemPressureHigh -namespace DryRunning { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace Fault +namespace Rfid { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kUid = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DryRunning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::Rfid::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } static constexpr bool kIsFabricScoped = false; + chip::ByteSpan uid; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -22148,398 +22867,621 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DryRunning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr EventId GetEventId() { return Events::Rfid::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; } + + chip::ByteSpan uid; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DryRunning -namespace MotorTemperatureHigh { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +} // namespace Rfid +} // namespace Events +} // namespace EnergyEvse +namespace DoorLock { +namespace Structs { +namespace CredentialStruct { enum class Fields : uint8_t { + kCredentialType = 0, + kCredentialIndex = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + CredentialTypeEnum credentialType = static_cast(0); + uint16_t credentialIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace MotorTemperatureHigh -namespace PumpMotorFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace CredentialStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace LockDoor { +struct Type; +struct DecodableType; +} // namespace LockDoor + +namespace UnlockDoor { +struct Type; +struct DecodableType; +} // namespace UnlockDoor + +namespace UnlockWithTimeout { +struct Type; +struct DecodableType; +} // namespace UnlockWithTimeout + +namespace SetWeekDaySchedule { +struct Type; +struct DecodableType; +} // namespace SetWeekDaySchedule + +namespace GetWeekDaySchedule { +struct Type; +struct DecodableType; +} // namespace GetWeekDaySchedule + +namespace GetWeekDayScheduleResponse { +struct Type; +struct DecodableType; +} // namespace GetWeekDayScheduleResponse + +namespace ClearWeekDaySchedule { +struct Type; +struct DecodableType; +} // namespace ClearWeekDaySchedule + +namespace SetYearDaySchedule { +struct Type; +struct DecodableType; +} // namespace SetYearDaySchedule + +namespace GetYearDaySchedule { +struct Type; +struct DecodableType; +} // namespace GetYearDaySchedule + +namespace GetYearDayScheduleResponse { +struct Type; +struct DecodableType; +} // namespace GetYearDayScheduleResponse + +namespace ClearYearDaySchedule { +struct Type; +struct DecodableType; +} // namespace ClearYearDaySchedule + +namespace SetHolidaySchedule { +struct Type; +struct DecodableType; +} // namespace SetHolidaySchedule + +namespace GetHolidaySchedule { +struct Type; +struct DecodableType; +} // namespace GetHolidaySchedule + +namespace GetHolidayScheduleResponse { +struct Type; +struct DecodableType; +} // namespace GetHolidayScheduleResponse + +namespace ClearHolidaySchedule { +struct Type; +struct DecodableType; +} // namespace ClearHolidaySchedule + +namespace SetUser { +struct Type; +struct DecodableType; +} // namespace SetUser + +namespace GetUser { +struct Type; +struct DecodableType; +} // namespace GetUser + +namespace GetUserResponse { +struct Type; +struct DecodableType; +} // namespace GetUserResponse + +namespace ClearUser { +struct Type; +struct DecodableType; +} // namespace ClearUser + +namespace SetCredential { +struct Type; +struct DecodableType; +} // namespace SetCredential + +namespace SetCredentialResponse { +struct Type; +struct DecodableType; +} // namespace SetCredentialResponse +namespace GetCredentialStatus { +struct Type; +struct DecodableType; +} // namespace GetCredentialStatus + +namespace GetCredentialStatusResponse { +struct Type; +struct DecodableType; +} // namespace GetCredentialStatusResponse + +namespace ClearCredential { +struct Type; +struct DecodableType; +} // namespace ClearCredential + +namespace UnboltDoor { +struct Type; +struct DecodableType; +} // namespace UnboltDoor + +} // namespace Commands + +namespace Commands { +namespace LockDoor { enum class Fields : uint8_t { + kPINCode = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::LockDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + Optional PINCode; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::LockDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + Optional PINCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PumpMotorFatalFailure -namespace ElectronicTemperatureHigh { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace LockDoor +namespace UnlockDoor { enum class Fields : uint8_t { + kPINCode = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::UnlockDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + Optional PINCode; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnlockDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + Optional PINCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ElectronicTemperatureHigh -namespace PumpBlocked { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +}; // namespace UnlockDoor +namespace UnlockWithTimeout { enum class Fields : uint8_t { + kTimeout = 0, + kPINCode = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint16_t timeout = static_cast(0); + Optional PINCode; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint16_t timeout = static_cast(0); + Optional PINCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PumpBlocked -namespace SensorFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace UnlockWithTimeout +namespace SetWeekDaySchedule { enum class Fields : uint8_t { + kWeekDayIndex = 0, + kUserIndex = 1, + kDaysMask = 2, + kStartHour = 3, + kStartMinute = 4, + kEndHour = 5, + kEndMinute = 6, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitMask daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitMask daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SensorFailure -namespace ElectronicNonFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace SetWeekDaySchedule +namespace GetWeekDaySchedule { enum class Fields : uint8_t { + kWeekDayIndex = 0, + kUserIndex = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ElectronicNonFatalFailure -namespace ElectronicFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +}; // namespace GetWeekDaySchedule +namespace GetWeekDayScheduleResponse { enum class Fields : uint8_t { + kWeekDayIndex = 0, + kUserIndex = 1, + kStatus = 2, + kDaysMask = 3, + kStartHour = 4, + kStartMinute = 5, + kEndHour = 6, + kEndMinute = 7, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional> daysMask; + Optional startHour; + Optional startMinute; + Optional endHour; + Optional endMinute; 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional> daysMask; + Optional startHour; + Optional startMinute; + Optional endHour; + Optional endMinute; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ElectronicFatalFailure -namespace GeneralFault { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace GetWeekDayScheduleResponse +namespace ClearWeekDaySchedule { enum class Fields : uint8_t { + kWeekDayIndex = 0, + kUserIndex = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::ClearWeekDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneralFault -namespace Leakage { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace ClearWeekDaySchedule +namespace SetYearDaySchedule { enum class Fields : uint8_t { + kYearDayIndex = 0, + kUserIndex = 1, + kLocalStartTime = 2, + kLocalEndTime = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leakage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leakage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Leakage -namespace AirDetection { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace SetYearDaySchedule +namespace GetYearDaySchedule { enum class Fields : uint8_t { + kYearDayIndex = 0, + kUserIndex = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AirDetection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AirDetection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AirDetection -namespace TurbineOperation { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace GetYearDaySchedule +namespace GetYearDayScheduleResponse { enum class Fields : uint8_t { + kYearDayIndex = 0, + kUserIndex = 1, + kStatus = 2, + kLocalStartTime = 3, + kLocalEndTime = 4, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional localStartTime; + Optional localEndTime; 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional localStartTime; + Optional localEndTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TurbineOperation -} // namespace Events -} // namespace PumpConfigurationAndControl -namespace Thermostat { -namespace Structs { -namespace ThermostatScheduleTransition { +}; // namespace GetYearDayScheduleResponse +namespace ClearYearDaySchedule { enum class Fields : uint8_t { - kTransitionTime = 0, - kHeatSetpoint = 1, - kCoolSetpoint = 2, + kYearDayIndex = 0, + kUserIndex = 1, }; struct Type { public: - uint16_t transitionTime = static_cast(0); - DataModel::Nullable heatSetpoint; - DataModel::Nullable coolSetpoint; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; -} // namespace ThermostatScheduleTransition -} // namespace Structs + using ResponseType = DataModel::NullObjectType; -namespace Commands { -// Forward-declarations so we can reference these later. + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace SetpointRaiseLower { -struct Type; -struct DecodableType; -} // namespace SetpointRaiseLower - -namespace GetWeeklyScheduleResponse { -struct Type; -struct DecodableType; -} // namespace GetWeeklyScheduleResponse - -namespace SetWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace SetWeeklySchedule - -namespace GetWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace GetWeeklySchedule - -namespace ClearWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace ClearWeeklySchedule - -} // namespace Commands +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } -namespace Commands { -namespace SetpointRaiseLower { + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ClearYearDaySchedule +namespace SetHolidaySchedule { enum class Fields : uint8_t { - kMode = 0, - kAmount = 1, + kHolidayIndex = 0, + kLocalStartTime = 1, + kLocalEndTime = 2, + kOperatingMode = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + uint8_t holidayIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + OperatingModeEnum operatingMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -22551,38 +23493,34 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + uint8_t holidayIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + OperatingModeEnum operatingMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetpointRaiseLower -namespace GetWeeklyScheduleResponse { +}; // namespace SetHolidaySchedule +namespace GetHolidaySchedule { enum class Fields : uint8_t { - kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, - kModeForSequence = 2, - kTransitions = 3, + kHolidayIndex = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -22590,36 +23528,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetWeeklyScheduleResponse -namespace SetWeeklySchedule { +}; // namespace GetHolidaySchedule +namespace GetHolidayScheduleResponse { enum class Fields : uint8_t { - kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, - kModeForSequence = 2, - kTransitions = 3, + kHolidayIndex = 0, + kStatus = 1, + kLocalStartTime = 2, + kLocalEndTime = 3, + kOperatingMode = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetHolidayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t holidayIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional localStartTime; + Optional localEndTime; + Optional operatingMode; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -22631,36 +23568,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetHolidayScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t holidayIndex = static_cast(0); + DlStatus status = static_cast(0); + Optional localStartTime; + Optional localEndTime; + Optional operatingMode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetWeeklySchedule -namespace GetWeeklySchedule { +}; // namespace GetHolidayScheduleResponse +namespace ClearHolidaySchedule { enum class Fields : uint8_t { - kDaysToReturn = 0, - kModeToReturn = 1, + kHolidayIndex = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -22668,668 +23604,882 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetWeeklySchedule -namespace ClearWeeklySchedule { +}; // namespace ClearHolidaySchedule +namespace SetUser { enum class Fields : uint8_t { + kOperationType = 0, + kUserIndex = 1, + kUserName = 2, + kUserUniqueID = 3, + kUserStatus = 4, + kUserType = 5, + kCredentialRule = 6, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + DataOperationTypeEnum operationType = static_cast(0); + uint16_t userIndex = static_cast(0); + DataModel::Nullable userName; + DataModel::Nullable userUniqueID; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + DataModel::Nullable credentialRule; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + DataOperationTypeEnum operationType = static_cast(0); + uint16_t userIndex = static_cast(0); + DataModel::Nullable userName; + DataModel::Nullable userUniqueID; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + DataModel::Nullable credentialRule; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ClearWeeklySchedule -} // namespace Commands - -namespace Attributes { +}; // namespace SetUser +namespace GetUser { +enum class Fields : uint8_t +{ + kUserIndex = 0, +}; -namespace LocalTemperature { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocalTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::DoorLock::Commands::GetUserResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace LocalTemperature -namespace OutdoorTemperature { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OutdoorTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OutdoorTemperature -namespace Occupancy { -struct TypeInfo +}; // namespace GetUser +namespace GetUserResponse { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Occupancy::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kUserIndex = 0, + kUserName = 1, + kUserUniqueID = 2, + kUserStatus = 3, + kUserType = 4, + kCredentialRule = 5, + kCredentials = 6, + kCreatorFabricIndex = 7, + kLastModifiedFabricIndex = 8, + kNextUserIndex = 9, }; -} // namespace Occupancy -namespace AbsMinHeatSetpointLimit { -struct TypeInfo + +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AbsMinHeatSetpointLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + DataModel::Nullable userName; + DataModel::Nullable userUniqueID; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + DataModel::Nullable credentialRule; + DataModel::Nullable> credentials; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; + DataModel::Nullable nextUserIndex; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AbsMinHeatSetpointLimit -namespace AbsMaxHeatSetpointLimit { -struct TypeInfo + +struct DecodableType { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AbsMaxHeatSetpointLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + DataModel::Nullable userName; + DataModel::Nullable userUniqueID; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + DataModel::Nullable credentialRule; + DataModel::Nullable> credentials; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; + DataModel::Nullable nextUserIndex; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AbsMaxHeatSetpointLimit -namespace AbsMinCoolSetpointLimit { -struct TypeInfo +}; // namespace GetUserResponse +namespace ClearUser { +enum class Fields : uint8_t { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AbsMinCoolSetpointLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kUserIndex = 0, }; -} // namespace AbsMinCoolSetpointLimit -namespace AbsMaxCoolSetpointLimit { -struct TypeInfo + +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AbsMaxCoolSetpointLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace AbsMaxCoolSetpointLimit -namespace PICoolingDemand { -struct TypeInfo + +struct DecodableType { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PICoolingDemand::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint16_t userIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PICoolingDemand -namespace PIHeatingDemand { -struct TypeInfo +}; // namespace ClearUser +namespace SetCredential { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PIHeatingDemand::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kOperationType = 0, + kCredential = 1, + kCredentialData = 2, + kUserIndex = 3, + kUserStatus = 4, + kUserType = 5, }; -} // namespace PIHeatingDemand -namespace HVACSystemTypeConfiguration { -struct TypeInfo + +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HVACSystemTypeConfiguration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataOperationTypeEnum operationType = static_cast(0); + Structs::CredentialStruct::Type credential; + chip::ByteSpan credentialData; + DataModel::Nullable userIndex; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace HVACSystemTypeConfiguration -namespace LocalTemperatureCalibration { -struct TypeInfo + +struct DecodableType { - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocalTemperatureCalibration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataOperationTypeEnum operationType = static_cast(0); + Structs::CredentialStruct::DecodableType credential; + chip::ByteSpan credentialData; + DataModel::Nullable userIndex; + DataModel::Nullable userStatus; + DataModel::Nullable userType; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LocalTemperatureCalibration -namespace OccupiedCoolingSetpoint { -struct TypeInfo +}; // namespace SetCredential +namespace SetCredentialResponse { +enum class Fields : uint8_t { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedCoolingSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStatus = 0, + kUserIndex = 1, + kNextCredentialIndex = 2, }; -} // namespace OccupiedCoolingSetpoint -namespace OccupiedHeatingSetpoint { -struct TypeInfo + +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedHeatingSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DlStatus status = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable nextCredentialIndex; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace OccupiedHeatingSetpoint -namespace UnoccupiedCoolingSetpoint { -struct TypeInfo + +struct DecodableType { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedCoolingSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DlStatus status = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable nextCredentialIndex; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace UnoccupiedCoolingSetpoint -namespace UnoccupiedHeatingSetpoint { -struct TypeInfo +}; // namespace SetCredentialResponse +namespace GetCredentialStatus { +enum class Fields : uint8_t { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedHeatingSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kCredential = 0, }; -} // namespace UnoccupiedHeatingSetpoint -namespace MinHeatSetpointLimit { -struct TypeInfo + +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinHeatSetpointLimit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + Structs::CredentialStruct::Type credential; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MinHeatSetpointLimit -namespace MaxHeatSetpointLimit { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxHeatSetpointLimit::Id; } +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + Structs::CredentialStruct::DecodableType credential; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetCredentialStatus +namespace GetCredentialStatusResponse { +enum class Fields : uint8_t +{ + kCredentialExists = 0, + kUserIndex = 1, + kCreatorFabricIndex = 2, + kLastModifiedFabricIndex = 3, + kNextCredentialIndex = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatusResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + bool credentialExists = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; + DataModel::Nullable nextCredentialIndex; + + 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::GetCredentialStatusResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + bool credentialExists = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; + DataModel::Nullable nextCredentialIndex; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetCredentialStatusResponse +namespace ClearCredential { +enum class Fields : uint8_t +{ + kCredential = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearCredential::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + DataModel::Nullable credential; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ClearCredential::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + DataModel::Nullable credential; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ClearCredential +namespace UnboltDoor { +enum class Fields : uint8_t +{ + kPINCode = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::UnboltDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + Optional PINCode; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::UnboltDoor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + Optional PINCode; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace UnboltDoor +} // namespace Commands + +namespace Attributes { + +namespace LockState { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LockState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxHeatSetpointLimit -namespace MinCoolSetpointLimit { +} // namespace LockState +namespace LockType { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::Clusters::DoorLock::DlLockType; + using DecodableType = chip::app::Clusters::DoorLock::DlLockType; + using DecodableArgType = chip::app::Clusters::DoorLock::DlLockType; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinCoolSetpointLimit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LockType::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinCoolSetpointLimit -namespace MaxCoolSetpointLimit { +} // namespace LockType +namespace ActuatorEnabled { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxCoolSetpointLimit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActuatorEnabled::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxCoolSetpointLimit -namespace MinSetpointDeadBand { +} // namespace ActuatorEnabled +namespace DoorState { struct TypeInfo { - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinSetpointDeadBand::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DoorState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinSetpointDeadBand -namespace RemoteSensing { +} // namespace DoorState +namespace DoorOpenEvents { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemoteSensing::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DoorOpenEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RemoteSensing -namespace ControlSequenceOfOperation { +} // namespace DoorOpenEvents +namespace DoorClosedEvents { struct TypeInfo { - using Type = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableType = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatControlSequence; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ControlSequenceOfOperation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DoorClosedEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ControlSequenceOfOperation -namespace SystemMode { +} // namespace DoorClosedEvents +namespace OpenPeriod { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SystemMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OpenPeriod::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SystemMode -namespace ThermostatRunningMode { +} // namespace OpenPeriod +namespace NumberOfTotalUsersSupported { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfTotalUsersSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfTotalUsersSupported +namespace NumberOfPINUsersSupported { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPINUsersSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfPINUsersSupported +namespace NumberOfRFIDUsersSupported { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRFIDUsersSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfRFIDUsersSupported +namespace NumberOfWeekDaySchedulesSupportedPerUser { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ThermostatRunningMode -namespace StartOfWeek { +} // namespace NumberOfWeekDaySchedulesSupportedPerUser +namespace NumberOfYearDaySchedulesSupportedPerUser { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartOfWeek::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StartOfWeek -namespace NumberOfWeeklyTransitions { +} // namespace NumberOfYearDaySchedulesSupportedPerUser +namespace NumberOfHolidaySchedulesSupported { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeeklyTransitions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfHolidaySchedulesSupported::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfWeeklyTransitions -namespace NumberOfDailyTransitions { +} // namespace NumberOfHolidaySchedulesSupported +namespace MaxPINCodeLength { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfDailyTransitions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPINCodeLength::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfDailyTransitions -namespace TemperatureSetpointHold { +} // namespace MaxPINCodeLength +namespace MinPINCodeLength { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinPINCodeLength::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TemperatureSetpointHold -namespace TemperatureSetpointHoldDuration { +} // namespace MinPINCodeLength +namespace MaxRFIDCodeLength { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHoldDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxRFIDCodeLength::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TemperatureSetpointHoldDuration -namespace ThermostatProgrammingOperationMode { +} // namespace MaxRFIDCodeLength +namespace MinRFIDCodeLength { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatProgrammingOperationMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinRFIDCodeLength::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ThermostatProgrammingOperationMode -namespace ThermostatRunningState { +} // namespace MinRFIDCodeLength +namespace CredentialRulesSupport { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CredentialRulesSupport::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ThermostatRunningState -namespace SetpointChangeSource { +} // namespace CredentialRulesSupport +namespace NumberOfCredentialsSupportedPerUser { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfCredentialsSupportedPerUser::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SetpointChangeSource -namespace SetpointChangeAmount { +} // namespace NumberOfCredentialsSupportedPerUser +namespace Language { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeAmount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Language::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 3; } }; -} // namespace SetpointChangeAmount -namespace SetpointChangeSourceTimestamp { +} // namespace Language +namespace LEDSettings { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LEDSettings::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LEDSettings +namespace AutoRelockTime { struct TypeInfo { using Type = uint32_t; using DecodableType = uint32_t; using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSourceTimestamp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AutoRelockTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SetpointChangeSourceTimestamp -namespace OccupiedSetback { +} // namespace AutoRelockTime +namespace SoundVolume { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoundVolume::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OccupiedSetback -namespace OccupiedSetbackMin { +} // namespace SoundVolume +namespace OperatingMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::DoorLock::OperatingModeEnum; + using DecodableType = chip::app::Clusters::DoorLock::OperatingModeEnum; + using DecodableArgType = chip::app::Clusters::DoorLock::OperatingModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetbackMin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperatingMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OccupiedSetbackMin -namespace OccupiedSetbackMax { +} // namespace OperatingMode +namespace SupportedOperatingModes { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetbackMax::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedOperatingModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OccupiedSetbackMax -namespace UnoccupiedSetback { +} // namespace SupportedOperatingModes +namespace DefaultConfigurationRegister { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultConfigurationRegister::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UnoccupiedSetback -namespace UnoccupiedSetbackMin { +} // namespace DefaultConfigurationRegister +namespace EnableLocalProgramming { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetbackMin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnableLocalProgramming::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UnoccupiedSetbackMin -namespace UnoccupiedSetbackMax { +} // namespace EnableLocalProgramming +namespace EnableOneTouchLocking { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetbackMax::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnableOneTouchLocking::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UnoccupiedSetbackMax -namespace EmergencyHeatDelta { +} // namespace EnableOneTouchLocking +namespace EnableInsideStatusLED { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EmergencyHeatDelta::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnableInsideStatusLED::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EmergencyHeatDelta -namespace ACType { +} // namespace EnableInsideStatusLED +namespace EnablePrivacyModeButton { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnablePrivacyModeButton::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACType -namespace ACCapacity { +} // namespace EnablePrivacyModeButton +namespace LocalProgrammingFeatures { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalProgrammingFeatures::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACCapacity -namespace ACRefrigerantType { +} // namespace LocalProgrammingFeatures +namespace WrongCodeEntryLimit { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACRefrigerantType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WrongCodeEntryLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACRefrigerantType -namespace ACCompressorType { +} // namespace WrongCodeEntryLimit +namespace UserCodeTemporaryDisableTime { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACCompressorType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserCodeTemporaryDisableTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACCompressorType -namespace ACErrorCode { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACErrorCode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ACErrorCode -namespace ACLouverPosition { +} // namespace UserCodeTemporaryDisableTime +namespace SendPINOverTheAir { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACLouverPosition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SendPINOverTheAir::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACLouverPosition -namespace ACCoilTemperature { +} // namespace SendPINOverTheAir +namespace RequirePINforRemoteOperation { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACCoilTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RequirePINforRemoteOperation::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACCoilTemperature -namespace ACCapacityformat { +} // namespace RequirePINforRemoteOperation +namespace ExpiringUserTimeout { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacityformat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ExpiringUserTimeout::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ACCapacityformat +} // namespace ExpiringUserTimeout namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } }; } // namespace ClusterRevision @@ -23337,61 +24487,55 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LocalTemperature::TypeInfo::DecodableType localTemperature; - Attributes::OutdoorTemperature::TypeInfo::DecodableType outdoorTemperature; - Attributes::Occupancy::TypeInfo::DecodableType occupancy = static_cast(0); - Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableType absMinHeatSetpointLimit = static_cast(0); - Attributes::AbsMaxHeatSetpointLimit::TypeInfo::DecodableType absMaxHeatSetpointLimit = static_cast(0); - Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableType absMinCoolSetpointLimit = static_cast(0); - Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit = static_cast(0); - Attributes::PICoolingDemand::TypeInfo::DecodableType PICoolingDemand = static_cast(0); - Attributes::PIHeatingDemand::TypeInfo::DecodableType PIHeatingDemand = static_cast(0); - Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType HVACSystemTypeConfiguration = static_cast(0); - Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration = static_cast(0); - Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint = static_cast(0); - Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint = static_cast(0); - Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType unoccupiedCoolingSetpoint = static_cast(0); - Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType unoccupiedHeatingSetpoint = static_cast(0); - Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType minHeatSetpointLimit = static_cast(0); - Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType maxHeatSetpointLimit = static_cast(0); - Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit = static_cast(0); - Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit = static_cast(0); - Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand = static_cast(0); - Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = static_cast(0); - Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation = - static_cast(0); - Attributes::SystemMode::TypeInfo::DecodableType systemMode = static_cast(0); - Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = static_cast(0); - Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = static_cast(0); - Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions = static_cast(0); - Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions = static_cast(0); - Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = static_cast(0); - Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration; - Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode = + Attributes::LockState::TypeInfo::DecodableType lockState; + Attributes::LockType::TypeInfo::DecodableType lockType = static_cast(0); + Attributes::ActuatorEnabled::TypeInfo::DecodableType actuatorEnabled = static_cast(0); + Attributes::DoorState::TypeInfo::DecodableType doorState; + Attributes::DoorOpenEvents::TypeInfo::DecodableType doorOpenEvents = static_cast(0); + Attributes::DoorClosedEvents::TypeInfo::DecodableType doorClosedEvents = static_cast(0); + Attributes::OpenPeriod::TypeInfo::DecodableType openPeriod = static_cast(0); + Attributes::NumberOfTotalUsersSupported::TypeInfo::DecodableType numberOfTotalUsersSupported = static_cast(0); + Attributes::NumberOfPINUsersSupported::TypeInfo::DecodableType numberOfPINUsersSupported = static_cast(0); + Attributes::NumberOfRFIDUsersSupported::TypeInfo::DecodableType numberOfRFIDUsersSupported = static_cast(0); + Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfWeekDaySchedulesSupportedPerUser = static_cast(0); - Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = static_cast(0); - Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = static_cast(0); - Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount; - Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp = static_cast(0); - Attributes::OccupiedSetback::TypeInfo::DecodableType occupiedSetback; - Attributes::OccupiedSetbackMin::TypeInfo::DecodableType occupiedSetbackMin; - Attributes::OccupiedSetbackMax::TypeInfo::DecodableType occupiedSetbackMax; - Attributes::UnoccupiedSetback::TypeInfo::DecodableType unoccupiedSetback; - Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableType unoccupiedSetbackMin; - Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableType unoccupiedSetbackMax; - Attributes::EmergencyHeatDelta::TypeInfo::DecodableType emergencyHeatDelta = static_cast(0); - Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); - Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); - Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = static_cast(0); - Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = static_cast(0); - Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = static_cast(0); - Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = static_cast(0); - Attributes::ACCoilTemperature::TypeInfo::DecodableType ACCoilTemperature; - Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = static_cast(0); + Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfYearDaySchedulesSupportedPerUser = + static_cast(0); + Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::DecodableType numberOfHolidaySchedulesSupported = + static_cast(0); + Attributes::MaxPINCodeLength::TypeInfo::DecodableType maxPINCodeLength = static_cast(0); + Attributes::MinPINCodeLength::TypeInfo::DecodableType minPINCodeLength = static_cast(0); + Attributes::MaxRFIDCodeLength::TypeInfo::DecodableType maxRFIDCodeLength = static_cast(0); + Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength = static_cast(0); + Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = + static_cast>(0); + Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableType numberOfCredentialsSupportedPerUser = + static_cast(0); + Attributes::Language::TypeInfo::DecodableType language; + Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); + Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime = static_cast(0); + Attributes::SoundVolume::TypeInfo::DecodableType soundVolume = static_cast(0); + Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = + static_cast(0); + Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = + static_cast>(0); + Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister = + static_cast>(0); + Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming = static_cast(0); + Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking = static_cast(0); + Attributes::EnableInsideStatusLED::TypeInfo::DecodableType enableInsideStatusLED = static_cast(0); + Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType enablePrivacyModeButton = static_cast(0); + Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures = + static_cast>(0); + Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType wrongCodeEntryLimit = static_cast(0); + Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType userCodeTemporaryDisableTime = static_cast(0); + Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir = static_cast(0); + Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType requirePINforRemoteOperation = static_cast(0); + Attributes::ExpiringUserTimeout::TypeInfo::DecodableType expiringUserTimeout = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -23401,502 +24545,279 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Thermostat -namespace FanControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Step { -struct Type; -struct DecodableType; -} // namespace Step - -} // namespace Commands +namespace Events { +namespace DoorLockAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Commands { -namespace Step { enum class Fields : uint8_t { - kDirection = 0, - kWrap = 1, - kLowestOff = 2, + kAlarmCode = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Step::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr bool kIsFabricScoped = false; - StepDirectionEnum direction = static_cast(0); - Optional wrap; - Optional lowestOff; + AlarmCodeEnum alarmCode = static_cast(0); 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::Step::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + AlarmCodeEnum alarmCode = static_cast(0); - StepDirectionEnum direction = static_cast(0); - Optional wrap; - Optional lowestOff; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Step -} // namespace Commands - -namespace Attributes { +} // namespace DoorLockAlarm +namespace DoorStateChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace FanMode { -struct TypeInfo +enum class Fields : uint8_t { - using Type = chip::app::Clusters::FanControl::FanModeEnum; - using DecodableType = chip::app::Clusters::FanControl::FanModeEnum; - using DecodableArgType = chip::app::Clusters::FanControl::FanModeEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::FanMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDoorState = 0, }; -} // namespace FanMode -namespace FanModeSequence { -struct TypeInfo -{ - using Type = chip::app::Clusters::FanControl::FanModeSequenceEnum; - using DecodableType = chip::app::Clusters::FanControl::FanModeSequenceEnum; - using DecodableArgType = chip::app::Clusters::FanControl::FanModeSequenceEnum; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::FanModeSequence::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace FanModeSequence -namespace PercentSetting { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PercentSetting::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PercentSetting -namespace PercentCurrent { -struct TypeInfo -{ - using Type = chip::Percent; - using DecodableType = chip::Percent; - using DecodableArgType = chip::Percent; + DoorStateEnum doorState = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PercentCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace PercentCurrent -namespace SpeedMax { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpeedMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SpeedMax -namespace SpeedSetting { -struct TypeInfo +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpeedSetting::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SpeedSetting -namespace SpeedCurrent { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + DoorStateEnum doorState = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpeedCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SpeedCurrent -namespace RockSupport { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +} // namespace DoorStateChange +namespace LockOperation { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RockSupport::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RockSupport -namespace RockSetting { -struct TypeInfo +enum class Fields : uint8_t { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RockSetting::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kLockOperationType = 0, + kOperationSource = 1, + kUserIndex = 2, + kFabricIndex = 3, + kSourceNode = 4, + kCredentials = 5, }; -} // namespace RockSetting -namespace WindSupport { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WindSupport::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WindSupport -namespace WindSetting { -struct TypeInfo +struct Type { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockOperation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WindSetting::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + LockOperationTypeEnum lockOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + Optional>> credentials; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace WindSetting -namespace AirflowDirection { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::FanControl::AirflowDirectionEnum; - using DecodableType = chip::app::Clusters::FanControl::AirflowDirectionEnum; - using DecodableArgType = chip::app::Clusters::FanControl::AirflowDirectionEnum; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockOperation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AirflowDirection::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + LockOperationTypeEnum lockOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + Optional>> credentials; + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AirflowDirection -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace LockOperation +namespace LockOperationError { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + kLockOperationType = 0, + kOperationSource = 1, + kOperationError = 2, + kUserIndex = 3, + kFabricIndex = 4, + kSourceNode = 5, + kCredentials = 6, }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr bool kIsFabricScoped = false; + + LockOperationTypeEnum lockOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + OperationErrorEnum operationError = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + Optional>> credentials; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + LockOperationTypeEnum lockOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + OperationErrorEnum operationError = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + Optional>> credentials; + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace LockOperationError +namespace LockUserChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + kLockDataType = 0, + kDataOperationType = 1, + kOperationSource = 2, + kUserIndex = 3, + kFabricIndex = 4, + kSourceNode = 5, + kDataIndex = 6, }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr bool kIsFabricScoped = false; + + LockDataTypeEnum lockDataType = static_cast(0); + DataOperationTypeEnum dataOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + DataModel::Nullable dataIndex; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + LockDataTypeEnum lockDataType = static_cast(0); + DataOperationTypeEnum dataOperationType = static_cast(0); + OperationSourceEnum operationSource = static_cast(0); + DataModel::Nullable userIndex; + DataModel::Nullable fabricIndex; + DataModel::Nullable sourceNode; + DataModel::Nullable dataIndex; + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +} // namespace LockUserChange +} // namespace Events +} // namespace DoorLock +namespace WindowCovering { -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } +namespace Commands { +// Forward-declarations so we can reference these later. - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +namespace UpOrOpen { +struct Type; +struct DecodableType; +} // namespace UpOrOpen - Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); - Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = - static_cast(0); - Attributes::PercentSetting::TypeInfo::DecodableType percentSetting; - Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); - Attributes::SpeedMax::TypeInfo::DecodableType speedMax = static_cast(0); - Attributes::SpeedSetting::TypeInfo::DecodableType speedSetting; - Attributes::SpeedCurrent::TypeInfo::DecodableType speedCurrent = static_cast(0); - Attributes::RockSupport::TypeInfo::DecodableType rockSupport = - static_cast>(0); - Attributes::RockSetting::TypeInfo::DecodableType rockSetting = - static_cast>(0); - Attributes::WindSupport::TypeInfo::DecodableType windSupport = - static_cast>(0); - Attributes::WindSetting::TypeInfo::DecodableType windSetting = - static_cast>(0); - Attributes::AirflowDirection::TypeInfo::DecodableType airflowDirection = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace FanControl -namespace ThermostatUserInterfaceConfiguration { - -namespace Attributes { - -namespace TemperatureDisplayMode { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureDisplayMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TemperatureDisplayMode -namespace KeypadLockout { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::KeypadLockout::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace KeypadLockout -namespace ScheduleProgrammingVisibility { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ScheduleProgrammingVisibility::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ScheduleProgrammingVisibility -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::TemperatureDisplayMode::TypeInfo::DecodableType temperatureDisplayMode = static_cast(0); - Attributes::KeypadLockout::TypeInfo::DecodableType keypadLockout = static_cast(0); - Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType scheduleProgrammingVisibility = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace ThermostatUserInterfaceConfiguration -namespace ColorControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace MoveToHue { -struct Type; -struct DecodableType; -} // namespace MoveToHue - -namespace MoveHue { -struct Type; -struct DecodableType; -} // namespace MoveHue - -namespace StepHue { -struct Type; -struct DecodableType; -} // namespace StepHue - -namespace MoveToSaturation { -struct Type; -struct DecodableType; -} // namespace MoveToSaturation - -namespace MoveSaturation { -struct Type; -struct DecodableType; -} // namespace MoveSaturation - -namespace StepSaturation { -struct Type; -struct DecodableType; -} // namespace StepSaturation - -namespace MoveToHueAndSaturation { -struct Type; -struct DecodableType; -} // namespace MoveToHueAndSaturation - -namespace MoveToColor { -struct Type; -struct DecodableType; -} // namespace MoveToColor - -namespace MoveColor { -struct Type; -struct DecodableType; -} // namespace MoveColor - -namespace StepColor { -struct Type; -struct DecodableType; -} // namespace StepColor - -namespace MoveToColorTemperature { -struct Type; -struct DecodableType; -} // namespace MoveToColorTemperature - -namespace EnhancedMoveToHue { -struct Type; -struct DecodableType; -} // namespace EnhancedMoveToHue - -namespace EnhancedMoveHue { -struct Type; -struct DecodableType; -} // namespace EnhancedMoveHue - -namespace EnhancedStepHue { +namespace DownOrClose { struct Type; struct DecodableType; -} // namespace EnhancedStepHue +} // namespace DownOrClose -namespace EnhancedMoveToHueAndSaturation { +namespace StopMotion { struct Type; struct DecodableType; -} // namespace EnhancedMoveToHueAndSaturation +} // namespace StopMotion -namespace ColorLoopSet { +namespace GoToLiftValue { struct Type; struct DecodableType; -} // namespace ColorLoopSet +} // namespace GoToLiftValue -namespace StopMoveStep { +namespace GoToLiftPercentage { struct Type; struct DecodableType; -} // namespace StopMoveStep +} // namespace GoToLiftPercentage -namespace MoveColorTemperature { +namespace GoToTiltValue { struct Type; struct DecodableType; -} // namespace MoveColorTemperature +} // namespace GoToTiltValue -namespace StepColorTemperature { +namespace GoToTiltPercentage { struct Type; struct DecodableType; -} // namespace StepColorTemperature +} // namespace GoToTiltPercentage } // namespace Commands namespace Commands { -namespace MoveToHue { +namespace UpOrOpen { enum class Fields : uint8_t { - kHue = 0, - kDirection = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - uint8_t hue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::UpOrOpen::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -23908,37 +24829,23 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::UpOrOpen::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t hue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MoveToHue -namespace MoveHue { +}; // namespace UpOrOpen +namespace DownOrClose { enum class Fields : uint8_t { - kMoveMode = 0, - kRate = 1, - kOptionsMask = 2, - kOptionsOverride = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::DownOrClose::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -23950,38 +24857,23 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::DownOrClose::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - HueMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MoveHue -namespace StepHue { +}; // namespace DownOrClose +namespace StopMotion { enum class Fields : uint8_t { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::StopMotion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -23993,37 +24885,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::StopMotion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - HueStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StepHue -namespace MoveToSaturation { +}; // namespace StopMotion +namespace GoToLiftValue { enum class Fields : uint8_t { - kSaturation = 0, - kTransitionTime = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + kLiftValue = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t liftValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24035,36 +24916,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t liftValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MoveToSaturation -namespace MoveSaturation { +}; // namespace GoToLiftValue +namespace GoToLiftPercentage { enum class Fields : uint8_t { - kMoveMode = 0, - kRate = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + kLiftPercent100thsValue = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - SaturationMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::Percent100ths liftPercent100thsValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24076,38 +24948,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - SaturationMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::Percent100ths liftPercent100thsValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MoveSaturation -namespace StepSaturation { +}; // namespace GoToLiftPercentage +namespace GoToTiltValue { enum class Fields : uint8_t { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + kTiltValue = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - SaturationStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t tiltValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24119,39 +24980,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - SaturationStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t tiltValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StepSaturation -namespace MoveToHueAndSaturation { +}; // namespace GoToTiltValue +namespace GoToTiltPercentage { enum class Fields : uint8_t { - kHue = 0, - kSaturation = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + kTiltPercent100thsValue = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t hue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::Percent100ths tiltPercent100thsValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24163,338 +25012,394 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint8_t hue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::Percent100ths tiltPercent100thsValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MoveToHueAndSaturation -namespace MoveToColor { -enum class Fields : uint8_t -{ - kColorX = 0, - kColorY = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - uint16_t colorX = static_cast(0); - uint16_t colorY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); +}; // namespace GoToTiltPercentage +} // namespace Commands - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = DataModel::NullObjectType; +namespace Type { +struct TypeInfo +{ + using Type = chip::app::Clusters::WindowCovering::Type; + using DecodableType = chip::app::Clusters::WindowCovering::Type; + using DecodableArgType = chip::app::Clusters::WindowCovering::Type; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Type::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace Type +namespace PhysicalClosedLimitLift { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint16_t colorX = static_cast(0); - uint16_t colorY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace MoveToColor -namespace MoveColor { -enum class Fields : uint8_t +} // namespace PhysicalClosedLimitLift +namespace PhysicalClosedLimitTilt { +struct TypeInfo { - kRateX = 0, - kRateY = 1, - kOptionsMask = 2, - kOptionsOverride = 3, -}; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalClosedLimitTilt +namespace CurrentPositionLift { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - int16_t rateX = static_cast(0); - int16_t rateY = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace CurrentPositionLift +namespace CurrentPositionTilt { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - int16_t rateX = static_cast(0); - int16_t rateY = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace MoveColor -namespace StepColor { -enum class Fields : uint8_t +} // namespace CurrentPositionTilt +namespace NumberOfActuationsLift { +struct TypeInfo { - kStepX = 0, - kStepY = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, -}; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfActuationsLift +namespace NumberOfActuationsTilt { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - int16_t stepX = static_cast(0); - int16_t stepY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace NumberOfActuationsTilt +namespace ConfigStatus { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - int16_t stepX = static_cast(0); - int16_t stepY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ConfigStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace StepColor -namespace MoveToColorTemperature { -enum class Fields : uint8_t +} // namespace ConfigStatus +namespace CurrentPositionLiftPercentage { +struct TypeInfo { - kColorTemperatureMireds = 0, - kTransitionTime = 1, - kOptionsMask = 2, - kOptionsOverride = 3, -}; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercentage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionLiftPercentage +namespace CurrentPositionTiltPercentage { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - uint16_t colorTemperatureMireds = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercentage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionTiltPercentage +namespace OperationalStatus { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OperationalStatus +namespace TargetPositionLiftPercent100ths { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionLiftPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace TargetPositionLiftPercent100ths +namespace TargetPositionTiltPercent100ths { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionTiltPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TargetPositionTiltPercent100ths +namespace EndProductType { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = chip::app::Clusters::WindowCovering::EndProductType; + using DecodableType = chip::app::Clusters::WindowCovering::EndProductType; + using DecodableArgType = chip::app::Clusters::WindowCovering::EndProductType; - uint16_t colorTemperatureMireds = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndProductType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace MoveToColorTemperature -namespace EnhancedMoveToHue { -enum class Fields : uint8_t +} // namespace EndProductType +namespace CurrentPositionLiftPercent100ths { +struct TypeInfo { - kEnhancedHue = 0, - kDirection = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace CurrentPositionLiftPercent100ths +namespace CurrentPositionTiltPercent100ths { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionTiltPercent100ths +namespace InstalledOpenLimitLift { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint16_t enhancedHue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InstalledOpenLimitLift +namespace InstalledClosedLimitLift { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InstalledClosedLimitLift +namespace InstalledOpenLimitTilt { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InstalledOpenLimitTilt +namespace InstalledClosedLimitTilt { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace InstalledClosedLimitTilt +namespace Mode { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Mode +namespace SafetyStatus { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - uint16_t enhancedHue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SafetyStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace EnhancedMoveToHue -namespace EnhancedMoveHue { -enum class Fields : uint8_t +} // namespace SafetyStatus +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kMoveMode = 0, - kRate = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } }; -}; // namespace EnhancedMoveHue -namespace EnhancedStepHue { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::Type::TypeInfo::DecodableType type = static_cast(0); + Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift = static_cast(0); + Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt = static_cast(0); + Attributes::CurrentPositionLift::TypeInfo::DecodableType currentPositionLift; + Attributes::CurrentPositionTilt::TypeInfo::DecodableType currentPositionTilt; + Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); + Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); + Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = + static_cast>(0); + Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; + Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; + Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = + static_cast>(0); + Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableType targetPositionLiftPercent100ths; + Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableType targetPositionTiltPercent100ths; + Attributes::EndProductType::TypeInfo::DecodableType endProductType = + static_cast(0); + Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableType currentPositionLiftPercent100ths; + Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableType currentPositionTiltPercent100ths; + Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift = static_cast(0); + Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); + Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); + Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); + Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); + Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace WindowCovering +namespace BarrierControl { - using ResponseType = DataModel::NullObjectType; +namespace Commands { +// Forward-declarations so we can reference these later. - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace BarrierControlGoToPercent { +struct Type; +struct DecodableType; +} // namespace BarrierControlGoToPercent -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +namespace BarrierControlStop { +struct Type; +struct DecodableType; +} // namespace BarrierControlStop - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace EnhancedStepHue -namespace EnhancedMoveToHueAndSaturation { +} // namespace Commands + +namespace Commands { +namespace BarrierControlGoToPercent { enum class Fields : uint8_t { - kEnhancedHue = 0, - kSaturation = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + kPercentOpen = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - uint16_t enhancedHue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t percentOpen = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24506,43 +25411,24 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - uint16_t enhancedHue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t percentOpen = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace EnhancedMoveToHueAndSaturation -namespace ColorLoopSet { +}; // namespace BarrierControlGoToPercent +namespace BarrierControlStop { enum class Fields : uint8_t { - kUpdateFlags = 0, - kAction = 1, - kDirection = 2, - kTime = 3, - kStartHue = 4, - kOptionsMask = 5, - kOptionsOverride = 6, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - chip::BitMask updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -24554,814 +25440,515 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - chip::BitMask updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ColorLoopSet -namespace StopMoveStep { -enum class Fields : uint8_t -{ - kOptionsMask = 0, - kOptionsOverride = 1, -}; +}; // namespace BarrierControlStop +} // namespace Commands -struct Type +namespace Attributes { + +namespace BarrierMovingState { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - 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::StopMoveStep::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StopMoveStep -namespace MoveColorTemperature { -enum class Fields : uint8_t -{ - kMoveMode = 0, - kRate = 1, - kColorTemperatureMinimumMireds = 2, - kColorTemperatureMaximumMireds = 3, - kOptionsMask = 4, - kOptionsOverride = 5, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - 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::MoveColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace MoveColorTemperature -namespace StepColorTemperature { -enum class Fields : uint8_t -{ - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kColorTemperatureMinimumMireds = 3, - kColorTemperatureMaximumMireds = 4, - kOptionsMask = 5, - kOptionsOverride = 6, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - - 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::StepColorTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierMovingState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace StepColorTemperature -} // namespace Commands - -namespace Attributes { - -namespace CurrentHue { +} // namespace BarrierMovingState +namespace BarrierSafetyStatus { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierSafetyStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentHue -namespace CurrentSaturation { +} // namespace BarrierSafetyStatus +namespace BarrierCapabilities { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCapabilities::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentSaturation -namespace RemainingTime { +} // namespace BarrierCapabilities +namespace BarrierOpenEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemainingTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RemainingTime -namespace CurrentX { +} // namespace BarrierOpenEvents +namespace BarrierCloseEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentX::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCloseEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentX -namespace CurrentY { +} // namespace BarrierCloseEvents +namespace BarrierCommandOpenEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentY::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandOpenEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentY -namespace DriftCompensation { +} // namespace BarrierCommandOpenEvents +namespace BarrierCommandCloseEvents { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DriftCompensation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandCloseEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DriftCompensation -namespace CompensationText { +} // namespace BarrierCommandCloseEvents +namespace BarrierOpenPeriod { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CompensationText::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenPeriod::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 254; } }; -} // namespace CompensationText -namespace ColorTemperatureMireds { +} // namespace BarrierOpenPeriod +namespace BarrierClosePeriod { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorTemperatureMireds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierClosePeriod::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorTemperatureMireds -namespace ColorMode { +} // namespace BarrierClosePeriod +namespace BarrierPosition { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierPosition::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorMode -namespace Options { -struct TypeInfo +} // namespace BarrierPosition +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; -} // namespace Options -namespace NumberOfPrimaries { +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } +}; +} // namespace ClusterRevision + struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPrimaries::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); + Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); + Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); + Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); + Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); + Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); + Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); + Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); + Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); + Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace NumberOfPrimaries -namespace Primary1X { +} // namespace Attributes +} // namespace BarrierControl +namespace PumpConfigurationAndControl { + +namespace Attributes { + +namespace MaxPressure { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary1X::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPressure::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary1X -namespace Primary1Y { +} // namespace MaxPressure +namespace MaxSpeed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary1Y::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxSpeed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary1Y -namespace Primary1Intensity { +} // namespace MaxSpeed +namespace MaxFlow { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary1Intensity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxFlow::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary1Intensity -namespace Primary2X { +} // namespace MaxFlow +namespace MinConstPressure { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary2X::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstPressure::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary2X -namespace Primary2Y { +} // namespace MinConstPressure +namespace MaxConstPressure { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary2Y::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstPressure::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary2Y -namespace Primary2Intensity { +} // namespace MaxConstPressure +namespace MinCompPressure { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary2Intensity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinCompPressure::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary2Intensity -namespace Primary3X { +} // namespace MinCompPressure +namespace MaxCompPressure { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary3X::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxCompPressure::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary3X -namespace Primary3Y { +} // namespace MaxCompPressure +namespace MinConstSpeed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary3Y::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstSpeed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary3Y -namespace Primary3Intensity { +} // namespace MinConstSpeed +namespace MaxConstSpeed { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary3Intensity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstSpeed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary3Intensity -namespace Primary4X { +} // namespace MaxConstSpeed +namespace MinConstFlow { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary4X::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstFlow::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary4X -namespace Primary4Y { +} // namespace MinConstFlow +namespace MaxConstFlow { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary4Y::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstFlow::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary4Y -namespace Primary4Intensity { +} // namespace MaxConstFlow +namespace MinConstTemp { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary4Intensity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstTemp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary4Intensity -namespace Primary5X { +} // namespace MinConstTemp +namespace MaxConstTemp { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary5X::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstTemp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary5X -namespace Primary5Y { +} // namespace MaxConstTemp +namespace PumpStatus { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary5Y::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PumpStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary5Y -namespace Primary5Intensity { +} // namespace PumpStatus +namespace EffectiveOperationMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary5Intensity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Primary5Intensity -namespace Primary6X { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary6X::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Primary6X -namespace Primary6Y { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary6Y::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Primary6Y -namespace Primary6Intensity { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Primary6Intensity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Primary6Intensity -namespace WhitePointX { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WhitePointX::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WhitePointX -namespace WhitePointY { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WhitePointY::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WhitePointY -namespace ColorPointRX { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRX::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointRX -namespace ColorPointRY { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRY::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointRY -namespace ColorPointRIntensity { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRIntensity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointRIntensity -namespace ColorPointGX { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGX::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointGX -namespace ColorPointGY { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGY::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointGY -namespace ColorPointGIntensity { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGIntensity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointGIntensity -namespace ColorPointBX { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBX::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointBX -namespace ColorPointBY { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBY::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointBY -namespace ColorPointBIntensity { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBIntensity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorPointBIntensity -namespace EnhancedCurrentHue { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnhancedCurrentHue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnhancedCurrentHue -namespace EnhancedColorMode { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EnhancedColorMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EnhancedColorMode -namespace ColorLoopActive { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopActive::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorLoopActive -namespace ColorLoopDirection { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopDirection::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ColorLoopDirection -namespace ColorLoopTime { +} // namespace EffectiveOperationMode +namespace EffectiveControlMode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorLoopTime -namespace ColorLoopStartEnhancedHue { +} // namespace EffectiveControlMode +namespace Capacity { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopStartEnhancedHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Capacity::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorLoopStartEnhancedHue -namespace ColorLoopStoredEnhancedHue { +} // namespace Capacity +namespace Speed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopStoredEnhancedHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Speed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorLoopStoredEnhancedHue -namespace ColorCapabilities { +} // namespace Speed +namespace LifetimeRunningHours { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorCapabilities::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorCapabilities -namespace ColorTempPhysicalMinMireds { +} // namespace LifetimeRunningHours +namespace Power { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorTempPhysicalMinMireds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Power::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorTempPhysicalMinMireds -namespace ColorTempPhysicalMaxMireds { +} // namespace Power +namespace LifetimeEnergyConsumed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ColorTempPhysicalMaxMireds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ColorTempPhysicalMaxMireds -namespace CoupleColorTempToLevelMinMireds { +} // namespace LifetimeEnergyConsumed +namespace OperationMode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CoupleColorTempToLevelMinMireds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CoupleColorTempToLevelMinMireds -namespace StartUpColorTemperatureMireds { +} // namespace OperationMode +namespace ControlMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpColorTemperatureMireds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StartUpColorTemperatureMireds +} // namespace ControlMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace ClusterRevision @@ -25369,63 +25956,38 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentHue::TypeInfo::DecodableType currentHue = static_cast(0); - Attributes::CurrentSaturation::TypeInfo::DecodableType currentSaturation = static_cast(0); - Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); - Attributes::CurrentX::TypeInfo::DecodableType currentX = static_cast(0); - Attributes::CurrentY::TypeInfo::DecodableType currentY = static_cast(0); - Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation = static_cast(0); - Attributes::CompensationText::TypeInfo::DecodableType compensationText; - Attributes::ColorTemperatureMireds::TypeInfo::DecodableType colorTemperatureMireds = static_cast(0); - Attributes::ColorMode::TypeInfo::DecodableType colorMode = static_cast(0); - Attributes::Options::TypeInfo::DecodableType options = static_cast(0); - Attributes::NumberOfPrimaries::TypeInfo::DecodableType numberOfPrimaries; - Attributes::Primary1X::TypeInfo::DecodableType primary1X = static_cast(0); - Attributes::Primary1Y::TypeInfo::DecodableType primary1Y = static_cast(0); - Attributes::Primary1Intensity::TypeInfo::DecodableType primary1Intensity; - Attributes::Primary2X::TypeInfo::DecodableType primary2X = static_cast(0); - Attributes::Primary2Y::TypeInfo::DecodableType primary2Y = static_cast(0); - Attributes::Primary2Intensity::TypeInfo::DecodableType primary2Intensity; - Attributes::Primary3X::TypeInfo::DecodableType primary3X = static_cast(0); - Attributes::Primary3Y::TypeInfo::DecodableType primary3Y = static_cast(0); - Attributes::Primary3Intensity::TypeInfo::DecodableType primary3Intensity; - Attributes::Primary4X::TypeInfo::DecodableType primary4X = static_cast(0); - Attributes::Primary4Y::TypeInfo::DecodableType primary4Y = static_cast(0); - Attributes::Primary4Intensity::TypeInfo::DecodableType primary4Intensity; - Attributes::Primary5X::TypeInfo::DecodableType primary5X = static_cast(0); - Attributes::Primary5Y::TypeInfo::DecodableType primary5Y = static_cast(0); - Attributes::Primary5Intensity::TypeInfo::DecodableType primary5Intensity; - Attributes::Primary6X::TypeInfo::DecodableType primary6X = static_cast(0); - Attributes::Primary6Y::TypeInfo::DecodableType primary6Y = static_cast(0); - Attributes::Primary6Intensity::TypeInfo::DecodableType primary6Intensity; - Attributes::WhitePointX::TypeInfo::DecodableType whitePointX = static_cast(0); - Attributes::WhitePointY::TypeInfo::DecodableType whitePointY = static_cast(0); - Attributes::ColorPointRX::TypeInfo::DecodableType colorPointRX = static_cast(0); - Attributes::ColorPointRY::TypeInfo::DecodableType colorPointRY = static_cast(0); - Attributes::ColorPointRIntensity::TypeInfo::DecodableType colorPointRIntensity; - Attributes::ColorPointGX::TypeInfo::DecodableType colorPointGX = static_cast(0); - Attributes::ColorPointGY::TypeInfo::DecodableType colorPointGY = static_cast(0); - Attributes::ColorPointGIntensity::TypeInfo::DecodableType colorPointGIntensity; - Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX = static_cast(0); - Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY = static_cast(0); - Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity; - Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); - Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); - Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); - Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = static_cast(0); - Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime = static_cast(0); - Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue = static_cast(0); - Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue = static_cast(0); - Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities = static_cast(0); - Attributes::ColorTempPhysicalMinMireds::TypeInfo::DecodableType colorTempPhysicalMinMireds = static_cast(0); - Attributes::ColorTempPhysicalMaxMireds::TypeInfo::DecodableType colorTempPhysicalMaxMireds = static_cast(0); - Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds = - static_cast(0); - Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds; + Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; + Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; + Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; + Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; + Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; + Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; + Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; + Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; + Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; + Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; + Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; + Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; + Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = + static_cast>(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = + static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = + static_cast(0); + Attributes::Capacity::TypeInfo::DecodableType capacity; + Attributes::Speed::TypeInfo::DecodableType speed; + Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; + Attributes::Power::TypeInfo::DecodableType power; + Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; + Attributes::OperationMode::TypeInfo::DecodableType operationMode = + static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -25435,1281 +25997,1351 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ColorControl -namespace BallastConfiguration { +namespace Events { +namespace SupplyVoltageLow { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Attributes { +enum class Fields : uint8_t +{ +}; -namespace PhysicalMinLevel { -struct TypeInfo +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalMinLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace PhysicalMinLevel -namespace PhysicalMaxLevel { -struct TypeInfo + +struct DecodableType { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalMaxLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PhysicalMaxLevel -namespace BallastStatus { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +} // namespace SupplyVoltageLow +namespace SupplyVoltageHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BallastStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace BallastStatus -namespace MinLevel { -struct TypeInfo + +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MinLevel -namespace MaxLevel { -struct TypeInfo + +struct DecodableType { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MaxLevel -namespace IntrinsicBallastFactor { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace SupplyVoltageHigh +namespace PowerMissingPhase { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IntrinsicBallastFactor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace IntrinsicBallastFactor -namespace BallastFactorAdjustment { -struct TypeInfo +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BallastFactorAdjustment::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BallastFactorAdjustment -namespace LampQuantity { -struct TypeInfo + +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampQuantity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LampQuantity -namespace LampType { -struct TypeInfo + +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LampType -namespace LampManufacturer { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +} // namespace PowerMissingPhase +namespace SystemPressureLow { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampManufacturer::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } +enum class Fields : uint8_t +{ }; -} // namespace LampManufacturer -namespace LampRatedHours { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampRatedHours::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LampRatedHours -namespace LampBurnHours { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampBurnHours::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LampBurnHours -namespace LampAlarmMode { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +} // namespace SystemPressureLow +namespace SystemPressureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampAlarmMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace LampAlarmMode -namespace LampBurnHoursTripPoint { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LampBurnHoursTripPoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LampBurnHoursTripPoint -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace SystemPressureHigh +namespace DryRunning { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace DryRunning +namespace MotorTemperatureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - Attributes::PhysicalMinLevel::TypeInfo::DecodableType physicalMinLevel = static_cast(0); - Attributes::PhysicalMaxLevel::TypeInfo::DecodableType physicalMaxLevel = static_cast(0); - Attributes::BallastStatus::TypeInfo::DecodableType ballastStatus = - static_cast>(0); - Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); - Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); - Attributes::IntrinsicBallastFactor::TypeInfo::DecodableType intrinsicBallastFactor; - Attributes::BallastFactorAdjustment::TypeInfo::DecodableType ballastFactorAdjustment; - Attributes::LampQuantity::TypeInfo::DecodableType lampQuantity = static_cast(0); - Attributes::LampType::TypeInfo::DecodableType lampType; - Attributes::LampManufacturer::TypeInfo::DecodableType lampManufacturer; - Attributes::LampRatedHours::TypeInfo::DecodableType lampRatedHours; - Attributes::LampBurnHours::TypeInfo::DecodableType lampBurnHours; - Attributes::LampAlarmMode::TypeInfo::DecodableType lampAlarmMode = - static_cast>(0); - Attributes::LampBurnHoursTripPoint::TypeInfo::DecodableType lampBurnHoursTripPoint; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace BallastConfiguration -namespace IlluminanceMeasurement { +} // namespace MotorTemperatureHigh +namespace PumpMotorFatalFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Attributes { +enum class Fields : uint8_t +{ +}; -namespace MeasuredValue { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace PumpMotorFatalFailure +namespace ElectronicTemperatureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace MaxMeasuredValue -namespace Tolerance { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Tolerance -namespace LightSensorType { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = - const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LightSensorType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LightSensorType -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace ElectronicTemperatureHigh +namespace PumpBlocked { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace PumpBlocked +namespace SensorFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +} // namespace SensorFailure +namespace ElectronicNonFatalFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -struct TypeInfo +enum class Fields : uint8_t { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); - Attributes::LightSensorType::TypeInfo::DecodableType lightSensorType; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Attributes -} // namespace IlluminanceMeasurement -namespace TemperatureMeasurement { -namespace Attributes { - -namespace MeasuredValue { -struct TypeInfo +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace ElectronicNonFatalFailure +namespace ElectronicFatalFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxMeasuredValue -namespace Tolerance { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Tolerance -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace ElectronicFatalFailure +namespace GeneralFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace GeneralFault +namespace Leakage { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +} // namespace Leakage +namespace AirDetection { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -struct TypeInfo +enum class Fields : uint8_t { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Attributes -} // namespace TemperatureMeasurement -namespace PressureMeasurement { - -namespace Attributes { -namespace MeasuredValue { -struct TypeInfo +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace AirDetection +namespace TurbineOperation { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxMeasuredValue -namespace Tolerance { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Tolerance -namespace ScaledValue { -struct TypeInfo +} // namespace TurbineOperation +} // namespace Events +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Structs { +namespace WeeklyScheduleTransitionStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kTransitionTime = 0, + kHeatSetpoint = 1, + kCoolSetpoint = 2, +}; - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ScaledValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + uint16_t transitionTime = static_cast(0); + DataModel::Nullable heatSetpoint; + DataModel::Nullable coolSetpoint; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ScaledValue -namespace MinScaledValue { -struct TypeInfo + +using DecodableType = Type; + +} // namespace WeeklyScheduleTransitionStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetpointRaiseLower { +struct Type; +struct DecodableType; +} // namespace SetpointRaiseLower + +namespace GetWeeklyScheduleResponse { +struct Type; +struct DecodableType; +} // namespace GetWeeklyScheduleResponse + +namespace SetWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace SetWeeklySchedule + +namespace GetWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace GetWeeklySchedule + +namespace ClearWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace ClearWeeklySchedule + +} // namespace Commands + +namespace Commands { +namespace SetpointRaiseLower { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kMode = 0, + kAmount = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinScaledValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MinScaledValue -namespace MaxScaledValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxScaledValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MaxScaledValue -namespace ScaledTolerance { -struct TypeInfo +}; // namespace SetpointRaiseLower +namespace GetWeeklyScheduleResponse { +enum class Fields : uint8_t { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + kNumberOfTransitionsForSequence = 0, + kDayOfWeekForSequence = 1, + kModeForSequence = 2, + kTransitions = 3, +}; - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ScaledTolerance::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ScaledTolerance -namespace Scale { -struct TypeInfo + +struct DecodableType { - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; +public: + static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Scale::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Scale -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +}; // namespace GetWeeklyScheduleResponse +namespace SetWeeklySchedule { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + kNumberOfTransitionsForSequence = 0, + kDayOfWeekForSequence = 1, + kModeForSequence = 2, + kTransitions = 3, }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +}; // namespace SetWeeklySchedule +namespace GetWeeklySchedule { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + kDaysToReturn = 0, + kModeToReturn = 1, }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetWeeklySchedule +namespace ClearWeeklySchedule { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); - Attributes::ScaledValue::TypeInfo::DecodableType scaledValue; - Attributes::MinScaledValue::TypeInfo::DecodableType minScaledValue; - Attributes::MaxScaledValue::TypeInfo::DecodableType maxScaledValue; - Attributes::ScaledTolerance::TypeInfo::DecodableType scaledTolerance = static_cast(0); - Attributes::Scale::TypeInfo::DecodableType scale = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -} // namespace PressureMeasurement -namespace FlowMeasurement { + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ClearWeeklySchedule +} // namespace Commands namespace Attributes { -namespace MeasuredValue { +namespace LocalTemperature { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalTemperature::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasuredValue -namespace MinMeasuredValue { +} // namespace LocalTemperature +namespace OutdoorTemperature { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OutdoorTemperature::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { +} // namespace OutdoorTemperature +namespace Occupancy { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Occupancy::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxMeasuredValue -namespace Tolerance { +} // namespace Occupancy +namespace AbsMinHeatSetpointLimit { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMinHeatSetpointLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Tolerance -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace AbsMinHeatSetpointLimit +namespace AbsMaxHeatSetpointLimit { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMaxHeatSetpointLimit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace AbsMaxHeatSetpointLimit +namespace AbsMinCoolSetpointLimit { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } -}; -} // namespace ClusterRevision + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMinCoolSetpointLimit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AbsMinCoolSetpointLimit +namespace AbsMaxCoolSetpointLimit { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AbsMaxCoolSetpointLimit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace FlowMeasurement -namespace RelativeHumidityMeasurement { - -namespace Attributes { - -namespace MeasuredValue { +} // namespace AbsMaxCoolSetpointLimit +namespace PICoolingDemand { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PICoolingDemand::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasuredValue -namespace MinMeasuredValue { +} // namespace PICoolingDemand +namespace PIHeatingDemand { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PIHeatingDemand::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { +} // namespace PIHeatingDemand +namespace HVACSystemTypeConfiguration { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HVACSystemTypeConfiguration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxMeasuredValue -namespace Tolerance { +} // namespace HVACSystemTypeConfiguration +namespace LocalTemperatureCalibration { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = int8_t; + using DecodableType = int8_t; + using DecodableArgType = int8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalTemperatureCalibration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Tolerance -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace LocalTemperatureCalibration +namespace OccupiedCoolingSetpoint { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedCoolingSetpoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace OccupiedCoolingSetpoint +namespace OccupiedHeatingSetpoint { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } -}; -} // namespace ClusterRevision + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedHeatingSetpoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OccupiedHeatingSetpoint +namespace UnoccupiedCoolingSetpoint { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedCoolingSetpoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace RelativeHumidityMeasurement -namespace OccupancySensing { - -namespace Attributes { - -namespace Occupancy { +} // namespace UnoccupiedCoolingSetpoint +namespace UnoccupiedHeatingSetpoint { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Occupancy::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedHeatingSetpoint::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Occupancy -namespace OccupancySensorType { +} // namespace UnoccupiedHeatingSetpoint +namespace MinHeatSetpointLimit { struct TypeInfo { - using Type = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; - using DecodableType = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; - using DecodableArgType = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupancySensorType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinHeatSetpointLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OccupancySensorType -namespace OccupancySensorTypeBitmap { +} // namespace MinHeatSetpointLimit +namespace MaxHeatSetpointLimit { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OccupancySensorTypeBitmap::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxHeatSetpointLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OccupancySensorTypeBitmap -namespace PIROccupiedToUnoccupiedDelay { +} // namespace MaxHeatSetpointLimit +namespace MinCoolSetpointLimit { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PIROccupiedToUnoccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinCoolSetpointLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PIROccupiedToUnoccupiedDelay -namespace PIRUnoccupiedToOccupiedDelay { +} // namespace MinCoolSetpointLimit +namespace MaxCoolSetpointLimit { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PIRUnoccupiedToOccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxCoolSetpointLimit::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PIRUnoccupiedToOccupiedDelay -namespace PIRUnoccupiedToOccupiedThreshold { +} // namespace MaxCoolSetpointLimit +namespace MinSetpointDeadBand { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = int8_t; + using DecodableType = int8_t; + using DecodableArgType = int8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PIRUnoccupiedToOccupiedThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinSetpointDeadBand::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PIRUnoccupiedToOccupiedThreshold -namespace UltrasonicOccupiedToUnoccupiedDelay { +} // namespace MinSetpointDeadBand +namespace RemoteSensing { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemoteSensing::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UltrasonicOccupiedToUnoccupiedDelay -namespace UltrasonicUnoccupiedToOccupiedDelay { +} // namespace RemoteSensing +namespace ControlSequenceOfOperation { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ControlSequenceOfOperation::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UltrasonicUnoccupiedToOccupiedDelay -namespace UltrasonicUnoccupiedToOccupiedThreshold { +} // namespace ControlSequenceOfOperation +namespace SystemMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SystemModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SystemMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UltrasonicUnoccupiedToOccupiedThreshold -namespace PhysicalContactOccupiedToUnoccupiedDelay { +} // namespace SystemMode +namespace ThermostatRunningMode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalContactOccupiedToUnoccupiedDelay -namespace PhysicalContactUnoccupiedToOccupiedDelay { +} // namespace ThermostatRunningMode +namespace StartOfWeek { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableType = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::StartOfWeekEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartOfWeek::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalContactUnoccupiedToOccupiedDelay -namespace PhysicalContactUnoccupiedToOccupiedThreshold { +} // namespace StartOfWeek +namespace NumberOfWeeklyTransitions { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeeklyTransitions::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalContactUnoccupiedToOccupiedThreshold -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } -}; -} // namespace ClusterRevision - +} // namespace NumberOfWeeklyTransitions +namespace NumberOfDailyTransitions { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - Attributes::Occupancy::TypeInfo::DecodableType occupancy = - static_cast>(0); - Attributes::OccupancySensorType::TypeInfo::DecodableType occupancySensorType = - static_cast(0); - Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableType occupancySensorTypeBitmap = - static_cast>(0); - Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::DecodableType PIROccupiedToUnoccupiedDelay = static_cast(0); - Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::DecodableType PIRUnoccupiedToOccupiedDelay = static_cast(0); - Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType PIRUnoccupiedToOccupiedThreshold = - static_cast(0); - Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType ultrasonicOccupiedToUnoccupiedDelay = - static_cast(0); - Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedDelay = - static_cast(0); - Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedThreshold = - static_cast(0); - Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType physicalContactOccupiedToUnoccupiedDelay = - static_cast(0); - Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType physicalContactUnoccupiedToOccupiedDelay = - static_cast(0); - Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType - physicalContactUnoccupiedToOccupiedThreshold = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfDailyTransitions::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace OccupancySensing -namespace CarbonMonoxideConcentrationMeasurement { - -namespace Attributes { - -namespace MeasuredValue { +} // namespace NumberOfDailyTransitions +namespace TemperatureSetpointHold { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHold::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasuredValue -namespace MinMeasuredValue { +} // namespace TemperatureSetpointHold +namespace TemperatureSetpointHoldDuration { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHoldDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { +} // namespace TemperatureSetpointHoldDuration +namespace ThermostatProgrammingOperationMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatProgrammingOperationMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { +} // namespace ThermostatProgrammingOperationMode +namespace ThermostatRunningState { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { +} // namespace ThermostatRunningState +namespace SetpointChangeSource { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSource::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { +} // namespace SetpointChangeSource +namespace SetpointChangeAmount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeAmount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { +} // namespace SetpointChangeAmount +namespace SetpointChangeSourceTimestamp { struct TypeInfo { using Type = uint32_t; using DecodableType = uint32_t; using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSourceTimestamp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo +} // namespace SetpointChangeSourceTimestamp +namespace OccupiedSetback { +struct TypeInfo { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetback::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Uncertainty -namespace MeasurementUnit { +} // namespace OccupiedSetback +namespace OccupiedSetbackMin { struct TypeInfo { - using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetbackMin::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +} // namespace OccupiedSetbackMin +namespace OccupiedSetbackMax { struct TypeInfo { - using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupiedSetbackMax::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace OccupiedSetbackMax +namespace UnoccupiedSetback { struct TypeInfo { - using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetback::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue +} // namespace UnoccupiedSetback +namespace UnoccupiedSetbackMin { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetbackMin::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UnoccupiedSetbackMin +namespace UnoccupiedSetbackMax { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UnoccupiedSetbackMax::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UnoccupiedSetbackMax +namespace EmergencyHeatDelta { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EmergencyHeatDelta::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace EmergencyHeatDelta +namespace ACType { +struct TypeInfo +{ + using Type = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACTypeEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACType +namespace ACCapacity { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACCapacity +namespace ACRefrigerantType { +struct TypeInfo +{ + using Type = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACRefrigerantType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACRefrigerantType +namespace ACCompressorType { +struct TypeInfo +{ + using Type = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACCompressorType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACCompressorType +namespace ACErrorCode { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACErrorCode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACErrorCode +namespace ACLouverPosition { +struct TypeInfo +{ + using Type = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACLouverPosition::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACLouverPosition +namespace ACCoilTemperature { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACCoilTemperature::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACCoilTemperature +namespace ACCapacityformat { +struct TypeInfo +{ + using Type = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacityformat::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ACCapacityformat namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } }; } // namespace ClusterRevision @@ -26717,24 +27349,73 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); + Attributes::LocalTemperature::TypeInfo::DecodableType localTemperature; + Attributes::OutdoorTemperature::TypeInfo::DecodableType outdoorTemperature; + Attributes::Occupancy::TypeInfo::DecodableType occupancy = static_cast(0); + Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableType absMinHeatSetpointLimit = static_cast(0); + Attributes::AbsMaxHeatSetpointLimit::TypeInfo::DecodableType absMaxHeatSetpointLimit = static_cast(0); + Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableType absMinCoolSetpointLimit = static_cast(0); + Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit = static_cast(0); + Attributes::PICoolingDemand::TypeInfo::DecodableType PICoolingDemand = static_cast(0); + Attributes::PIHeatingDemand::TypeInfo::DecodableType PIHeatingDemand = static_cast(0); + Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType HVACSystemTypeConfiguration = static_cast(0); + Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration = static_cast(0); + Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint = static_cast(0); + Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint = static_cast(0); + Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType unoccupiedCoolingSetpoint = static_cast(0); + Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType unoccupiedHeatingSetpoint = static_cast(0); + Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType minHeatSetpointLimit = static_cast(0); + Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType maxHeatSetpointLimit = static_cast(0); + Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit = static_cast(0); + Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit = static_cast(0); + Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand = static_cast(0); + Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = + static_cast>(0); + Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation = + static_cast(0); + Attributes::SystemMode::TypeInfo::DecodableType systemMode = + static_cast(0); + Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = + static_cast(0); + Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = + static_cast(0); + Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions = static_cast(0); + Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions = static_cast(0); + Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = + static_cast(0); + Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration; + Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode = + static_cast>(0); + Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = + static_cast>(0); + Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = + static_cast(0); + Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount; + Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp = static_cast(0); + Attributes::OccupiedSetback::TypeInfo::DecodableType occupiedSetback; + Attributes::OccupiedSetbackMin::TypeInfo::DecodableType occupiedSetbackMin; + Attributes::OccupiedSetbackMax::TypeInfo::DecodableType occupiedSetbackMax; + Attributes::UnoccupiedSetback::TypeInfo::DecodableType unoccupiedSetback; + Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableType unoccupiedSetbackMin; + Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableType unoccupiedSetbackMax; + Attributes::EmergencyHeatDelta::TypeInfo::DecodableType emergencyHeatDelta = static_cast(0); + Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); + Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); + Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = + static_cast(0); + Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = + static_cast(0); + Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = + static_cast>(0); + Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = + static_cast(0); + Attributes::ACCoilTemperature::TypeInfo::DecodableType ACCoilTemperature; + Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -26744,177 +27425,240 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace CarbonMonoxideConcentrationMeasurement -namespace CarbonDioxideConcentrationMeasurement { +} // namespace Thermostat +namespace FanControl { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Step { +struct Type; +struct DecodableType; +} // namespace Step + +} // namespace Commands + +namespace Commands { +namespace Step { +enum class Fields : uint8_t +{ + kDirection = 0, + kWrap = 1, + kLowestOff = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Step::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + + StepDirectionEnum direction = static_cast(0); + Optional wrap; + Optional lowestOff; + + 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::Step::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + + StepDirectionEnum direction = static_cast(0); + Optional wrap; + Optional lowestOff; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Step +} // namespace Commands namespace Attributes { -namespace MeasuredValue { +namespace FanMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::FanControl::FanModeEnum; + using DecodableType = chip::app::Clusters::FanControl::FanModeEnum; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FanMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasuredValue -namespace MinMeasuredValue { +} // namespace FanMode +namespace FanModeSequence { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::FanControl::FanModeSequenceEnum; + using DecodableType = chip::app::Clusters::FanControl::FanModeSequenceEnum; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeSequenceEnum; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FanModeSequence::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { +} // namespace FanModeSequence +namespace PercentSetting { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PercentSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { +} // namespace PercentSetting +namespace PercentCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::Percent; + using DecodableType = chip::Percent; + using DecodableArgType = chip::Percent; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PercentCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { +} // namespace PercentCurrent +namespace SpeedMax { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpeedMax::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { +} // namespace SpeedMax +namespace SpeedSetting { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpeedSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { +} // namespace SpeedSetting +namespace SpeedCurrent { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpeedCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { +} // namespace SpeedCurrent +namespace RockSupport { struct TypeInfo { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RockSupport::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Uncertainty -namespace MeasurementUnit { +} // namespace RockSupport +namespace RockSetting { struct TypeInfo { - using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RockSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +} // namespace RockSetting +namespace WindSupport { struct TypeInfo { - using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WindSupport::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace WindSupport +namespace WindSetting { struct TypeInfo { - using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WindSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue +} // namespace WindSetting +namespace AirflowDirection { +struct TypeInfo +{ + using Type = chip::app::Clusters::FanControl::AirflowDirectionEnum; + using DecodableType = chip::app::Clusters::FanControl::AirflowDirectionEnum; + using DecodableArgType = chip::app::Clusters::FanControl::AirflowDirectionEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AirflowDirection::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AirflowDirection namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } }; } // namespace ClusterRevision @@ -26922,24 +27666,28 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); + Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); + Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = + static_cast(0); + Attributes::PercentSetting::TypeInfo::DecodableType percentSetting; + Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); + Attributes::SpeedMax::TypeInfo::DecodableType speedMax = static_cast(0); + Attributes::SpeedSetting::TypeInfo::DecodableType speedSetting; + Attributes::SpeedCurrent::TypeInfo::DecodableType speedCurrent = static_cast(0); + Attributes::RockSupport::TypeInfo::DecodableType rockSupport = + static_cast>(0); + Attributes::RockSetting::TypeInfo::DecodableType rockSetting = + static_cast>(0); + Attributes::WindSupport::TypeInfo::DecodableType windSupport = + static_cast>(0); + Attributes::WindSetting::TypeInfo::DecodableType windSetting = + static_cast>(0); + Attributes::AirflowDirection::TypeInfo::DecodableType airflowDirection = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -26949,177 +27697,81 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace CarbonDioxideConcentrationMeasurement -namespace NitrogenDioxideConcentrationMeasurement { +} // namespace FanControl +namespace ThermostatUserInterfaceConfiguration { namespace Attributes { -namespace MeasuredValue { +namespace TemperatureDisplayMode { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum; + using DecodableType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum; + using DecodableArgType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo -{ - using Type = float; - using DecodableType = float; - using DecodableArgType = float; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo -{ - using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureDisplayMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +} // namespace TemperatureDisplayMode +namespace KeypadLockout { struct TypeInfo { - using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum; + using DecodableType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum; + using DecodableArgType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum; - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::KeypadLockout::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace KeypadLockout +namespace ScheduleProgrammingVisibility { struct TypeInfo { - using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; + using Type = chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum; + using DecodableType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum; + using DecodableArgType = chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum; - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScheduleProgrammingVisibility::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue +} // namespace ScheduleProgrammingVisibility namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } }; } // namespace ClusterRevision @@ -27127,24 +27779,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); + Attributes::TemperatureDisplayMode::TypeInfo::DecodableType temperatureDisplayMode = + static_cast(0); + Attributes::KeypadLockout::TypeInfo::DecodableType keypadLockout = + static_cast(0); + Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType scheduleProgrammingVisibility = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -27154,382 +27798,5622 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace NitrogenDioxideConcentrationMeasurement -namespace OzoneConcentrationMeasurement { +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { -namespace Attributes { +namespace Commands { +// Forward-declarations so we can reference these later. -namespace MeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +namespace MoveToHue { +struct Type; +struct DecodableType; +} // namespace MoveToHue - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +namespace MoveHue { +struct Type; +struct DecodableType; +} // namespace MoveHue + +namespace StepHue { +struct Type; +struct DecodableType; +} // namespace StepHue + +namespace MoveToSaturation { +struct Type; +struct DecodableType; +} // namespace MoveToSaturation + +namespace MoveSaturation { +struct Type; +struct DecodableType; +} // namespace MoveSaturation + +namespace StepSaturation { +struct Type; +struct DecodableType; +} // namespace StepSaturation + +namespace MoveToHueAndSaturation { +struct Type; +struct DecodableType; +} // namespace MoveToHueAndSaturation + +namespace MoveToColor { +struct Type; +struct DecodableType; +} // namespace MoveToColor + +namespace MoveColor { +struct Type; +struct DecodableType; +} // namespace MoveColor + +namespace StepColor { +struct Type; +struct DecodableType; +} // namespace StepColor + +namespace MoveToColorTemperature { +struct Type; +struct DecodableType; +} // namespace MoveToColorTemperature + +namespace EnhancedMoveToHue { +struct Type; +struct DecodableType; +} // namespace EnhancedMoveToHue + +namespace EnhancedMoveHue { +struct Type; +struct DecodableType; +} // namespace EnhancedMoveHue + +namespace EnhancedStepHue { +struct Type; +struct DecodableType; +} // namespace EnhancedStepHue + +namespace EnhancedMoveToHueAndSaturation { +struct Type; +struct DecodableType; +} // namespace EnhancedMoveToHueAndSaturation + +namespace ColorLoopSet { +struct Type; +struct DecodableType; +} // namespace ColorLoopSet + +namespace StopMoveStep { +struct Type; +struct DecodableType; +} // namespace StopMoveStep + +namespace MoveColorTemperature { +struct Type; +struct DecodableType; +} // namespace MoveColorTemperature + +namespace StepColorTemperature { +struct Type; +struct DecodableType; +} // namespace StepColorTemperature + +} // namespace Commands + +namespace Commands { +namespace MoveToHue { +enum class Fields : uint8_t +{ + kHue = 0, + kDirection = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t hue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t hue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo +}; // namespace MoveToHue +namespace MoveHue { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + HueMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + HueMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo +}; // namespace MoveHue +namespace StepHue { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo + +struct Type { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + HueStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + HueStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasurementUnit -namespace MeasurementMedium { -struct TypeInfo +}; // namespace StepHue +namespace MoveToSaturation { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kSaturation = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; -} // namespace MeasurementMedium -namespace LevelValue { -struct TypeInfo + +struct Type { - using Type = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace LevelValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +}; // namespace MoveToSaturation +namespace MoveSaturation { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; -} // namespace AcceptedCommandList -namespace EventList { + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + SaturationMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + SaturationMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveSaturation +namespace StepSaturation { +enum class Fields : uint8_t +{ + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + SaturationStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::StepSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + SaturationStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StepSaturation +namespace MoveToHueAndSaturation { +enum class Fields : uint8_t +{ + kHue = 0, + kSaturation = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveToHueAndSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveToHueAndSaturation +namespace MoveToColor { +enum class Fields : uint8_t +{ + kColorX = 0, + kColorY = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveToColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveToColor +namespace MoveColor { +enum class Fields : uint8_t +{ + kRateX = 0, + kRateY = 1, + kOptionsMask = 2, + kOptionsOverride = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveColor +namespace StepColor { +enum class Fields : uint8_t +{ + kStepX = 0, + kStepY = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::StepColor::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StepColor +namespace MoveToColorTemperature { +enum class Fields : uint8_t +{ + kColorTemperatureMireds = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveToColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveToColorTemperature +namespace EnhancedMoveToHue { +enum class Fields : uint8_t +{ + kEnhancedHue = 0, + kDirection = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t enhancedHue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::EnhancedMoveToHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t enhancedHue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnhancedMoveToHue +namespace EnhancedMoveHue { +enum class Fields : uint8_t +{ + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::EnhancedMoveHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnhancedMoveHue +namespace EnhancedStepHue { +enum class Fields : uint8_t +{ + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::EnhancedStepHue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnhancedStepHue +namespace EnhancedMoveToHueAndSaturation { +enum class Fields : uint8_t +{ + kEnhancedHue = 0, + kSaturation = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::EnhancedMoveToHueAndSaturation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnhancedMoveToHueAndSaturation +namespace ColorLoopSet { +enum class Fields : uint8_t +{ + kUpdateFlags = 0, + kAction = 1, + kDirection = 2, + kTime = 3, + kStartHue = 4, + kOptionsMask = 5, + kOptionsOverride = 6, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + chip::BitMask updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::ColorLoopSet::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + chip::BitMask updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ColorLoopSet +namespace StopMoveStep { +enum class Fields : uint8_t +{ + kOptionsMask = 0, + kOptionsOverride = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::StopMoveStep::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StopMoveStep +namespace MoveColorTemperature { +enum class Fields : uint8_t +{ + kMoveMode = 0, + kRate = 1, + kColorTemperatureMinimumMireds = 2, + kColorTemperatureMaximumMireds = 3, + kOptionsMask = 4, + kOptionsOverride = 5, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::MoveColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveColorTemperature +namespace StepColorTemperature { +enum class Fields : uint8_t +{ + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kColorTemperatureMinimumMireds = 3, + kColorTemperatureMaximumMireds = 4, + kOptionsMask = 5, + kOptionsOverride = 6, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + + 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::StepColorTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StepColorTemperature +} // namespace Commands + +namespace Attributes { + +namespace CurrentHue { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentHue +namespace CurrentSaturation { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentSaturation::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentSaturation +namespace RemainingTime { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemainingTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace RemainingTime +namespace CurrentX { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentX::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentX +namespace CurrentY { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentY::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentY +namespace DriftCompensation { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DriftCompensation::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DriftCompensation +namespace CompensationText { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CompensationText::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 254; } +}; +} // namespace CompensationText +namespace ColorTemperatureMireds { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorTemperatureMireds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorTemperatureMireds +namespace ColorMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorMode +namespace Options { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Options +namespace NumberOfPrimaries { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPrimaries::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfPrimaries +namespace Primary1X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary1X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary1X +namespace Primary1Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary1Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary1Y +namespace Primary1Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary1Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary1Intensity +namespace Primary2X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary2X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary2X +namespace Primary2Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary2Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary2Y +namespace Primary2Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary2Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary2Intensity +namespace Primary3X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary3X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary3X +namespace Primary3Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary3Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary3Y +namespace Primary3Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary3Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary3Intensity +namespace Primary4X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary4X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary4X +namespace Primary4Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary4Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary4Y +namespace Primary4Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary4Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary4Intensity +namespace Primary5X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary5X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary5X +namespace Primary5Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary5Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary5Y +namespace Primary5Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary5Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary5Intensity +namespace Primary6X { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary6X::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary6X +namespace Primary6Y { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary6Y::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary6Y +namespace Primary6Intensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Primary6Intensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Primary6Intensity +namespace WhitePointX { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WhitePointX::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace WhitePointX +namespace WhitePointY { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WhitePointY::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace WhitePointY +namespace ColorPointRX { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRX::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointRX +namespace ColorPointRY { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRY::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointRY +namespace ColorPointRIntensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointRIntensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointRIntensity +namespace ColorPointGX { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGX::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointGX +namespace ColorPointGY { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGY::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointGY +namespace ColorPointGIntensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointGIntensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointGIntensity +namespace ColorPointBX { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBX::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointBX +namespace ColorPointBY { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBY::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointBY +namespace ColorPointBIntensity { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorPointBIntensity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorPointBIntensity +namespace EnhancedCurrentHue { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnhancedCurrentHue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace EnhancedCurrentHue +namespace EnhancedColorMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EnhancedColorMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace EnhancedColorMode +namespace ColorLoopActive { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopActive::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorLoopActive +namespace ColorLoopDirection { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopDirection::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorLoopDirection +namespace ColorLoopTime { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorLoopTime +namespace ColorLoopStartEnhancedHue { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopStartEnhancedHue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorLoopStartEnhancedHue +namespace ColorLoopStoredEnhancedHue { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopStoredEnhancedHue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorLoopStoredEnhancedHue +namespace ColorCapabilities { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorCapabilities::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorCapabilities +namespace ColorTempPhysicalMinMireds { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorTempPhysicalMinMireds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorTempPhysicalMinMireds +namespace ColorTempPhysicalMaxMireds { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ColorTempPhysicalMaxMireds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ColorTempPhysicalMaxMireds +namespace CoupleColorTempToLevelMinMireds { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CoupleColorTempToLevelMinMireds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CoupleColorTempToLevelMinMireds +namespace StartUpColorTemperatureMireds { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpColorTemperatureMireds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpColorTemperatureMireds +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::CurrentHue::TypeInfo::DecodableType currentHue = static_cast(0); + Attributes::CurrentSaturation::TypeInfo::DecodableType currentSaturation = static_cast(0); + Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); + Attributes::CurrentX::TypeInfo::DecodableType currentX = static_cast(0); + Attributes::CurrentY::TypeInfo::DecodableType currentY = static_cast(0); + Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation = static_cast(0); + Attributes::CompensationText::TypeInfo::DecodableType compensationText; + Attributes::ColorTemperatureMireds::TypeInfo::DecodableType colorTemperatureMireds = static_cast(0); + Attributes::ColorMode::TypeInfo::DecodableType colorMode = static_cast(0); + Attributes::Options::TypeInfo::DecodableType options = static_cast(0); + Attributes::NumberOfPrimaries::TypeInfo::DecodableType numberOfPrimaries; + Attributes::Primary1X::TypeInfo::DecodableType primary1X = static_cast(0); + Attributes::Primary1Y::TypeInfo::DecodableType primary1Y = static_cast(0); + Attributes::Primary1Intensity::TypeInfo::DecodableType primary1Intensity; + Attributes::Primary2X::TypeInfo::DecodableType primary2X = static_cast(0); + Attributes::Primary2Y::TypeInfo::DecodableType primary2Y = static_cast(0); + Attributes::Primary2Intensity::TypeInfo::DecodableType primary2Intensity; + Attributes::Primary3X::TypeInfo::DecodableType primary3X = static_cast(0); + Attributes::Primary3Y::TypeInfo::DecodableType primary3Y = static_cast(0); + Attributes::Primary3Intensity::TypeInfo::DecodableType primary3Intensity; + Attributes::Primary4X::TypeInfo::DecodableType primary4X = static_cast(0); + Attributes::Primary4Y::TypeInfo::DecodableType primary4Y = static_cast(0); + Attributes::Primary4Intensity::TypeInfo::DecodableType primary4Intensity; + Attributes::Primary5X::TypeInfo::DecodableType primary5X = static_cast(0); + Attributes::Primary5Y::TypeInfo::DecodableType primary5Y = static_cast(0); + Attributes::Primary5Intensity::TypeInfo::DecodableType primary5Intensity; + Attributes::Primary6X::TypeInfo::DecodableType primary6X = static_cast(0); + Attributes::Primary6Y::TypeInfo::DecodableType primary6Y = static_cast(0); + Attributes::Primary6Intensity::TypeInfo::DecodableType primary6Intensity; + Attributes::WhitePointX::TypeInfo::DecodableType whitePointX = static_cast(0); + Attributes::WhitePointY::TypeInfo::DecodableType whitePointY = static_cast(0); + Attributes::ColorPointRX::TypeInfo::DecodableType colorPointRX = static_cast(0); + Attributes::ColorPointRY::TypeInfo::DecodableType colorPointRY = static_cast(0); + Attributes::ColorPointRIntensity::TypeInfo::DecodableType colorPointRIntensity; + Attributes::ColorPointGX::TypeInfo::DecodableType colorPointGX = static_cast(0); + Attributes::ColorPointGY::TypeInfo::DecodableType colorPointGY = static_cast(0); + Attributes::ColorPointGIntensity::TypeInfo::DecodableType colorPointGIntensity; + Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX = static_cast(0); + Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY = static_cast(0); + Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity; + Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); + Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); + Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); + Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = static_cast(0); + Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime = static_cast(0); + Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue = static_cast(0); + Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue = static_cast(0); + Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities = static_cast(0); + Attributes::ColorTempPhysicalMinMireds::TypeInfo::DecodableType colorTempPhysicalMinMireds = static_cast(0); + Attributes::ColorTempPhysicalMaxMireds::TypeInfo::DecodableType colorTempPhysicalMaxMireds = static_cast(0); + Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds = + static_cast(0); + Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ColorControl +namespace BallastConfiguration { + +namespace Attributes { + +namespace PhysicalMinLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalMinLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalMinLevel +namespace PhysicalMaxLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalMaxLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalMaxLevel +namespace BallastStatus { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BallastStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BallastStatus +namespace MinLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinLevel +namespace MaxLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxLevel +namespace IntrinsicBallastFactor { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::IntrinsicBallastFactor::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace IntrinsicBallastFactor +namespace BallastFactorAdjustment { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BallastFactorAdjustment::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BallastFactorAdjustment +namespace LampQuantity { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampQuantity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LampQuantity +namespace LampType { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace LampType +namespace LampManufacturer { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampManufacturer::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace LampManufacturer +namespace LampRatedHours { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampRatedHours::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LampRatedHours +namespace LampBurnHours { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampBurnHours::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LampBurnHours +namespace LampAlarmMode { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampAlarmMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LampAlarmMode +namespace LampBurnHoursTripPoint { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LampBurnHoursTripPoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LampBurnHoursTripPoint +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::PhysicalMinLevel::TypeInfo::DecodableType physicalMinLevel = static_cast(0); + Attributes::PhysicalMaxLevel::TypeInfo::DecodableType physicalMaxLevel = static_cast(0); + Attributes::BallastStatus::TypeInfo::DecodableType ballastStatus = + static_cast>(0); + Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); + Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); + Attributes::IntrinsicBallastFactor::TypeInfo::DecodableType intrinsicBallastFactor; + Attributes::BallastFactorAdjustment::TypeInfo::DecodableType ballastFactorAdjustment; + Attributes::LampQuantity::TypeInfo::DecodableType lampQuantity = static_cast(0); + Attributes::LampType::TypeInfo::DecodableType lampType; + Attributes::LampManufacturer::TypeInfo::DecodableType lampManufacturer; + Attributes::LampRatedHours::TypeInfo::DecodableType lampRatedHours; + Attributes::LampBurnHours::TypeInfo::DecodableType lampBurnHours; + Attributes::LampAlarmMode::TypeInfo::DecodableType lampAlarmMode = + static_cast>(0); + Attributes::LampBurnHoursTripPoint::TypeInfo::DecodableType lampBurnHoursTripPoint; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace Tolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Tolerance +namespace LightSensorType { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LightSensorType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LightSensorType +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::LightSensorType::TypeInfo::DecodableType lightSensorType; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace IlluminanceMeasurement +namespace TemperatureMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace Tolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Tolerance +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace TemperatureMeasurement +namespace PressureMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace Tolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Tolerance +namespace ScaledValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScaledValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ScaledValue +namespace MinScaledValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinScaledValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinScaledValue +namespace MaxScaledValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxScaledValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxScaledValue +namespace ScaledTolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScaledTolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ScaledTolerance +namespace Scale { +struct TypeInfo +{ + using Type = int8_t; + using DecodableType = int8_t; + using DecodableArgType = int8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Scale::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Scale +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::ScaledValue::TypeInfo::DecodableType scaledValue; + Attributes::MinScaledValue::TypeInfo::DecodableType minScaledValue; + Attributes::MaxScaledValue::TypeInfo::DecodableType maxScaledValue; + Attributes::ScaledTolerance::TypeInfo::DecodableType scaledTolerance = static_cast(0); + Attributes::Scale::TypeInfo::DecodableType scale = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace PressureMeasurement +namespace FlowMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace Tolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Tolerance +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace Tolerance { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Tolerance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Tolerance +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { + +namespace Attributes { + +namespace Occupancy { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Occupancy::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Occupancy +namespace OccupancySensorType { +struct TypeInfo +{ + using Type = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; + using DecodableType = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; + using DecodableArgType = chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupancySensorType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OccupancySensorType +namespace OccupancySensorTypeBitmap { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OccupancySensorTypeBitmap::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OccupancySensorTypeBitmap +namespace PIROccupiedToUnoccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PIROccupiedToUnoccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PIROccupiedToUnoccupiedDelay +namespace PIRUnoccupiedToOccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PIRUnoccupiedToOccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PIRUnoccupiedToOccupiedDelay +namespace PIRUnoccupiedToOccupiedThreshold { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PIRUnoccupiedToOccupiedThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PIRUnoccupiedToOccupiedThreshold +namespace UltrasonicOccupiedToUnoccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UltrasonicOccupiedToUnoccupiedDelay +namespace UltrasonicUnoccupiedToOccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UltrasonicUnoccupiedToOccupiedDelay +namespace UltrasonicUnoccupiedToOccupiedThreshold { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UltrasonicUnoccupiedToOccupiedThreshold +namespace PhysicalContactOccupiedToUnoccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalContactOccupiedToUnoccupiedDelay +namespace PhysicalContactUnoccupiedToOccupiedDelay { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalContactUnoccupiedToOccupiedDelay +namespace PhysicalContactUnoccupiedToOccupiedThreshold { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalContactUnoccupiedToOccupiedThreshold +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Occupancy::TypeInfo::DecodableType occupancy = + static_cast>(0); + Attributes::OccupancySensorType::TypeInfo::DecodableType occupancySensorType = + static_cast(0); + Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableType occupancySensorTypeBitmap = + static_cast>(0); + Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::DecodableType PIROccupiedToUnoccupiedDelay = static_cast(0); + Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::DecodableType PIRUnoccupiedToOccupiedDelay = static_cast(0); + Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType PIRUnoccupiedToOccupiedThreshold = + static_cast(0); + Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType ultrasonicOccupiedToUnoccupiedDelay = + static_cast(0); + Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedDelay = + static_cast(0); + Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedThreshold = + static_cast(0); + Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType physicalContactOccupiedToUnoccupiedDelay = + static_cast(0); + Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType physicalContactUnoccupiedToOccupiedDelay = + static_cast(0); + Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType + physicalContactUnoccupiedToOccupiedThreshold = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace OccupancySensing +namespace CarbonMonoxideConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement +namespace CarbonDioxideConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement +namespace NitrogenDioxideConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement +namespace OzoneConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace OzoneConcentrationMeasurement +namespace Pm25ConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace Pm25ConcentrationMeasurement +namespace FormaldehydeConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace FormaldehydeConcentrationMeasurement +namespace Pm1ConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace Pm1ConcentrationMeasurement +namespace Pm10ConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace Pm10ConcentrationMeasurement +namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement +namespace RadonConcentrationMeasurement { + +namespace Attributes { + +namespace MeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasuredValue +namespace MinMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinMeasuredValue +namespace MaxMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxMeasuredValue +namespace PeakMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValue +namespace PeakMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PeakMeasuredValueWindow +namespace AverageMeasuredValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValue +namespace AverageMeasuredValueWindow { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AverageMeasuredValueWindow +namespace Uncertainty { +struct TypeInfo +{ + using Type = float; + using DecodableType = float; + using DecodableArgType = float; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Uncertainty +namespace MeasurementUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; + using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; + using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementUnit +namespace MeasurementMedium { +struct TypeInfo +{ + using Type = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; + using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; + using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MeasurementMedium +namespace LevelValue { +struct TypeInfo +{ + using Type = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; + using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; + using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LevelValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; + Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; + Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); + Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; + Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); + Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); + Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = + static_cast(0); + Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = + static_cast(0); + Attributes::LevelValue::TypeInfo::DecodableType levelValue = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace RadonConcentrationMeasurement +namespace WakeOnLan { + +namespace Attributes { + +namespace MACAddress { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MACAddress::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 12; } +}; +} // namespace MACAddress +namespace LinkLocalAddress { +struct TypeInfo +{ + using Type = chip::ByteSpan; + using DecodableType = chip::ByteSpan; + using DecodableArgType = chip::ByteSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LinkLocalAddress::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace LinkLocalAddress +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::MACAddress::TypeInfo::DecodableType MACAddress; + Attributes::LinkLocalAddress::TypeInfo::DecodableType linkLocalAddress; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace WakeOnLan +namespace Channel { +namespace Structs { +namespace ProgramCastStruct { +enum class Fields : uint8_t +{ + kName = 0, + kRole = 1, +}; + +struct Type +{ +public: + chip::CharSpan name; + chip::CharSpan role; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace ProgramCastStruct +namespace ProgramCategoryStruct { +enum class Fields : uint8_t +{ + kCategory = 0, + kSubCategory = 1, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +public: + chip::CharSpan category; + Optional subCategory; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +using DecodableType = Type; + +} // namespace ProgramCategoryStruct +namespace SeriesInfoStruct { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + kSeason = 0, + kEpisode = 1, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } +public: + chip::CharSpan season; + chip::CharSpan episode; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ClusterRevision -struct TypeInfo +using DecodableType = Type; + +} // namespace SeriesInfoStruct +namespace ChannelInfoStruct { +enum class Fields : uint8_t { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + kMajorNumber = 0, + kMinorNumber = 1, + kName = 2, + kCallSign = 3, + kAffiliateCallSign = 4, + kIdentifier = 5, + kType = 6, +}; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +struct Type +{ +public: + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); + Optional name; + Optional callSign; + Optional affiliateCallSign; + Optional identifier; + Optional type; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Attributes -} // namespace OzoneConcentrationMeasurement -namespace Pm25ConcentrationMeasurement { -namespace Attributes { +using DecodableType = Type; -namespace MeasuredValue { -struct TypeInfo +} // namespace ChannelInfoStruct +namespace ProgramStruct { +enum class Fields : uint8_t +{ + kIdentifier = 0, + kChannel = 1, + kStartTime = 2, + kEndTime = 3, + kTitle = 4, + kSubtitle = 5, + kDescription = 6, + kAudioLanguages = 7, + kRatings = 8, + kThumbnailUrl = 9, + kPosterArtUrl = 10, + kDvbiUrl = 11, + kReleaseDate = 12, + kParentalGuidanceText = 13, + kRecordingFlag = 14, + kSeriesInfo = 15, + kCategoryList = 16, + kCastList = 17, + kExternalIDList = 18, +}; + +struct Type +{ +public: + chip::CharSpan identifier; + Structs::ChannelInfoStruct::Type channel; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); + chip::CharSpan title; + Optional subtitle; + Optional description; + Optional> audioLanguages; + Optional> ratings; + Optional thumbnailUrl; + Optional posterArtUrl; + Optional dvbiUrl; + Optional releaseDate; + Optional parentalGuidanceText; + Optional> recordingFlag; + Optional> seriesInfo; + Optional> categoryList; + Optional> castList; + Optional> externalIDList; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + chip::CharSpan identifier; + Structs::ChannelInfoStruct::DecodableType channel; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); + chip::CharSpan title; + Optional subtitle; + Optional description; + Optional> audioLanguages; + Optional> ratings; + Optional thumbnailUrl; + Optional posterArtUrl; + Optional dvbiUrl; + Optional releaseDate; + Optional parentalGuidanceText; + Optional> recordingFlag; + Optional> seriesInfo; + Optional> categoryList; + Optional> castList; + Optional> externalIDList; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo + +} // namespace ProgramStruct +namespace PageTokenStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kLimit = 0, + kAfter = 1, + kBefore = 2, +}; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + Optional limit; + Optional after; + Optional before; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +using DecodableType = Type; + +} // namespace PageTokenStruct +namespace ChannelPagingStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kPreviousToken = 0, + kNextToken = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + Optional> previousToken; + Optional> nextToken; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo + +using DecodableType = Type; + +} // namespace ChannelPagingStruct +namespace AdditionalInfoStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kName = 0, + kValue = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + chip::CharSpan name; + chip::CharSpan value; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo + +using DecodableType = Type; + +} // namespace AdditionalInfoStruct +namespace LineupInfoStruct { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + kOperatorName = 0, + kLineupName = 1, + kPostalCode = 2, + kLineupInfoType = 3, +}; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + chip::CharSpan operatorName; + Optional lineupName; + Optional postalCode; + LineupInfoTypeEnum lineupInfoType = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo + +using DecodableType = Type; + +} // namespace LineupInfoStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeChannel { +struct Type; +struct DecodableType; +} // namespace ChangeChannel + +namespace ChangeChannelResponse { +struct Type; +struct DecodableType; +} // namespace ChangeChannelResponse + +namespace ChangeChannelByNumber { +struct Type; +struct DecodableType; +} // namespace ChangeChannelByNumber + +namespace SkipChannel { +struct Type; +struct DecodableType; +} // namespace SkipChannel + +namespace GetProgramGuide { +struct Type; +struct DecodableType; +} // namespace GetProgramGuide + +namespace ProgramGuideResponse { +struct Type; +struct DecodableType; +} // namespace ProgramGuideResponse + +namespace RecordProgram { +struct Type; +struct DecodableType; +} // namespace RecordProgram + +namespace CancelRecordProgram { +struct Type; +struct DecodableType; +} // namespace CancelRecordProgram + +} // namespace Commands + +namespace Commands { +namespace ChangeChannel { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kMatch = 0, +}; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + chip::CharSpan match; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::CharSpan match; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo +}; // namespace ChangeChannel +namespace ChangeChannelResponse { +enum class Fields : uint8_t { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; + kStatus = 0, + kData = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + StatusEnum status = static_cast(0); + Optional data; + + 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::ChangeChannelResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + StatusEnum status = static_cast(0); + Optional data; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeChannelResponse +namespace ChangeChannelByNumber { +enum class Fields : uint8_t +{ + kMajorNumber = 0, + kMinorNumber = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumber::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); + + 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::ChangeChannelByNumber::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeChannelByNumber +namespace SkipChannel { +enum class Fields : uint8_t +{ + kCount = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SkipChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + int16_t count = static_cast(0); + + 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::SkipChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + int16_t count = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SkipChannel +namespace GetProgramGuide { +enum class Fields : uint8_t +{ + kStartTime = 0, + kEndTime = 1, + kChannelList = 2, + kPageToken = 3, + kRecordingFlag = 4, + kExternalIDList = 5, + kData = 6, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetProgramGuide::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + Optional startTime; + Optional endTime; + Optional> channelList; + Optional pageToken; + Optional> recordingFlag; + Optional> externalIDList; + Optional data; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::Channel::Commands::ProgramGuideResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GetProgramGuide::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + Optional startTime; + Optional endTime; + Optional> channelList; + Optional pageToken; + Optional> recordingFlag; + Optional> externalIDList; + Optional data; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetProgramGuide +namespace ProgramGuideResponse { +enum class Fields : uint8_t +{ + kChannelPagingStruct = 0, + kProgramList = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ProgramGuideResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + int16_t channelPagingStruct = static_cast(0); + DataModel::List programList; + + 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::ProgramGuideResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + int16_t channelPagingStruct = static_cast(0); + DataModel::DecodableList programList; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ProgramGuideResponse +namespace RecordProgram { +enum class Fields : uint8_t +{ + kProgramIdentifier = 0, + kShouldRecordSeries = 1, + kExternalIDList = 2, + kData = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RecordProgram::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + chip::CharSpan programIdentifier; + bool shouldRecordSeries = static_cast(0); + DataModel::List externalIDList; + chip::ByteSpan data; + + 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::RecordProgram::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + chip::CharSpan programIdentifier; + bool shouldRecordSeries = static_cast(0); + DataModel::DecodableList externalIDList; + chip::ByteSpan data; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RecordProgram +namespace CancelRecordProgram { +enum class Fields : uint8_t +{ + kProgramIdentifier = 0, + kShouldRecordSeries = 1, + kExternalIDList = 2, + kData = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CancelRecordProgram::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + + chip::CharSpan programIdentifier; + bool shouldRecordSeries = static_cast(0); + DataModel::List externalIDList; + chip::ByteSpan data; + + 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::CancelRecordProgram::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::CharSpan programIdentifier; + bool shouldRecordSeries = static_cast(0); + DataModel::DecodableList externalIDList; + chip::ByteSpan data; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Uncertainty -namespace MeasurementUnit { +}; // namespace CancelRecordProgram +} // namespace Commands + +namespace Attributes { + +namespace ChannelList { struct TypeInfo { - using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChannelList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +} // namespace ChannelList +namespace Lineup { struct TypeInfo { - using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Lineup::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace Lineup +namespace CurrentChannel { struct TypeInfo { - using Type = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue +} // namespace CurrentChannel namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } }; } // namespace ClusterRevision @@ -27537,24 +33421,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Pm25ConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); + Attributes::ChannelList::TypeInfo::DecodableType channelList; + Attributes::Lineup::TypeInfo::DecodableType lineup; + Attributes::CurrentChannel::TypeInfo::DecodableType currentChannel; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -27564,177 +33437,184 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Pm25ConcentrationMeasurement -namespace FormaldehydeConcentrationMeasurement { - -namespace Attributes { - -namespace MeasuredValue { -struct TypeInfo +} // namespace Channel +namespace TargetNavigator { +namespace Structs { +namespace TargetInfoStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kIdentifier = 0, + kName = 1, }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + uint8_t identifier = static_cast(0); + chip::CharSpan name; - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +using DecodableType = Type; + +} // namespace TargetInfoStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace NavigateTarget { +struct Type; +struct DecodableType; +} // namespace NavigateTarget + +namespace NavigateTargetResponse { +struct Type; +struct DecodableType; +} // namespace NavigateTargetResponse + +} // namespace Commands + +namespace Commands { +namespace NavigateTarget { +enum class Fields : uint8_t +{ + kTarget = 0, + kData = 1, }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::NavigateTarget::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t target = static_cast(0); + Optional data; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::NavigateTarget::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t target = static_cast(0); + Optional data; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo +}; // namespace NavigateTarget +namespace NavigateTargetResponse { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStatus = 0, + kData = 1, }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo + +struct Type { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + StatusEnum status = static_cast(0); + Optional data; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + StatusEnum status = static_cast(0); + Optional data; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +}; // namespace NavigateTargetResponse +} // namespace Commands + +namespace Attributes { + +namespace TargetList { struct TypeInfo { - using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace TargetList +namespace CurrentTarget { struct TypeInfo { - using Type = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTarget::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue +} // namespace CurrentTarget namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } }; } // namespace ClusterRevision @@ -27742,24 +33622,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::FormaldehydeConcentrationMeasurement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); + Attributes::TargetList::TypeInfo::DecodableType targetList; + Attributes::CurrentTarget::TypeInfo::DecodableType currentTarget = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -27769,891 +33637,840 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace FormaldehydeConcentrationMeasurement -namespace Pm1ConcentrationMeasurement { +namespace Events { +namespace TargetUpdated { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Attributes { +enum class Fields : uint8_t +{ + kTargetList = 0, + kCurrentTarget = 1, + kData = 2, +}; -namespace MeasuredValue { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TargetUpdated::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::List targetList; + uint8_t currentTarget = static_cast(0); + chip::ByteSpan data; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TargetUpdated::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + + DataModel::DecodableList targetList; + uint8_t currentTarget = static_cast(0); + chip::ByteSpan data; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace TargetUpdated +} // namespace Events +} // namespace TargetNavigator +namespace MediaPlayback { +namespace Structs { +namespace TrackAttributesStruct { +enum class Fields : uint8_t +{ + kLanguageCode = 0, + kDisplayName = 1, +}; + +struct Type +{ +public: + chip::CharSpan languageCode; + Optional> displayName; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace TrackAttributesStruct +namespace TrackStruct { +enum class Fields : uint8_t +{ + kId = 0, + kTrackAttributes = 1, +}; + +struct Type +{ +public: + chip::CharSpan id; + DataModel::Nullable trackAttributes; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace TrackStruct +namespace PlaybackPositionStruct { +enum class Fields : uint8_t +{ + kUpdatedAt = 0, + kPosition = 1, +}; + +struct Type +{ +public: + uint64_t updatedAt = static_cast(0); + DataModel::Nullable position; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace PlaybackPositionStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Play { +struct Type; +struct DecodableType; +} // namespace Play + +namespace Pause { +struct Type; +struct DecodableType; +} // namespace Pause + +namespace Stop { +struct Type; +struct DecodableType; +} // namespace Stop + +namespace StartOver { +struct Type; +struct DecodableType; +} // namespace StartOver + +namespace Previous { +struct Type; +struct DecodableType; +} // namespace Previous + +namespace Next { +struct Type; +struct DecodableType; +} // namespace Next + +namespace Rewind { +struct Type; +struct DecodableType; +} // namespace Rewind + +namespace FastForward { +struct Type; +struct DecodableType; +} // namespace FastForward + +namespace SkipForward { +struct Type; +struct DecodableType; +} // namespace SkipForward + +namespace SkipBackward { +struct Type; +struct DecodableType; +} // namespace SkipBackward + +namespace PlaybackResponse { +struct Type; +struct DecodableType; +} // namespace PlaybackResponse + +namespace Seek { +struct Type; +struct DecodableType; +} // namespace Seek + +namespace ActivateAudioTrack { +struct Type; +struct DecodableType; +} // namespace ActivateAudioTrack + +namespace ActivateTextTrack { +struct Type; +struct DecodableType; +} // namespace ActivateTextTrack + +namespace DeactivateTextTrack { +struct Type; +struct DecodableType; +} // namespace DeactivateTextTrack + +} // namespace Commands - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo +namespace Commands { +namespace Play { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Play::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo -{ - using Type = float; - using DecodableType = float; - using DecodableArgType = float; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo +struct DecodableType { - using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::Play::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasurementUnit -namespace MeasurementMedium { -struct TypeInfo +}; // namespace Play +namespace Pause { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { -struct TypeInfo -{ - using Type = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum; - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LevelValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace Pause +namespace Stop { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace Stop +namespace StartOver { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::Pm1ConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StartOver::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace Pm1ConcentrationMeasurement -namespace Pm10ConcentrationMeasurement { + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; -namespace Attributes { + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace MeasuredValue { -struct TypeInfo +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::StartOver::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo +}; // namespace StartOver +namespace Previous { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Previous::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo +struct DecodableType { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; +public: + static constexpr CommandId GetCommandId() { return Commands::Previous::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo +}; // namespace Previous +namespace Next { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { -struct TypeInfo -{ - using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum; - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasurementMedium -namespace LevelValue { -struct TypeInfo +struct Type { - using Type = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Next::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LevelValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Next::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace Next +namespace Rewind { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + kAudioAdvanceUnmuted = 0, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Rewind::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + Optional audioAdvanceUnmuted; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Rewind::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + Optional audioAdvanceUnmuted; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace Rewind +namespace FastForward { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } + kAudioAdvanceUnmuted = 0, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::Pm10ConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::FastForward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Optional audioAdvanceUnmuted; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace Pm10ConcentrationMeasurement -namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Attributes { + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; -namespace MeasuredValue { -struct TypeInfo + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::FastForward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + Optional audioAdvanceUnmuted; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo +}; // namespace FastForward +namespace SkipForward { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDeltaPositionMilliseconds = 0, }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SkipForward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + uint64_t deltaPositionMilliseconds = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::SkipForward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint64_t deltaPositionMilliseconds = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { -struct TypeInfo +}; // namespace SkipForward +namespace SkipBackward { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDeltaPositionMilliseconds = 0, }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SkipBackward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint64_t deltaPositionMilliseconds = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SkipBackward::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint64_t deltaPositionMilliseconds = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { -struct TypeInfo +}; // namespace SkipBackward +namespace PlaybackResponse { +enum class Fields : uint8_t { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; - - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStatus = 0, + kData = 1, }; -} // namespace Uncertainty -namespace MeasurementUnit { -struct TypeInfo + +struct Type { - using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + StatusEnum status = static_cast(0); + Optional data; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + StatusEnum status = static_cast(0); + Optional data; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasurementMedium -namespace LevelValue { -struct TypeInfo +}; // namespace PlaybackResponse +namespace Seek { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kPosition = 0, }; -} // namespace LevelValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Seek::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + uint64_t position = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Seek::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + uint64_t position = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace Seek +namespace ActivateAudioTrack { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + kTrackID = 0, + kAudioOutputIndex = 1, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ActivateAudioTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + chip::CharSpan trackID; + uint8_t audioOutputIndex = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::ActivateAudioTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + chip::CharSpan trackID; + uint8_t audioOutputIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace ActivateAudioTrack +namespace ActivateTextTrack { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } + kTrackID = 0, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ActivateTextTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + chip::CharSpan trackID; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement -namespace RadonConcentrationMeasurement { + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Attributes { + using ResponseType = DataModel::NullObjectType; -namespace MeasuredValue { -struct TypeInfo + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::ActivateTextTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::CharSpan trackID; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MeasuredValue -namespace MinMeasuredValue { -struct TypeInfo +}; // namespace ActivateTextTrack +namespace DeactivateTextTrack { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::DeactivateTextTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace MinMeasuredValue -namespace MaxMeasuredValue { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::DeactivateTextTrack::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxMeasuredValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MaxMeasuredValue -namespace PeakMeasuredValue { +}; // namespace DeactivateTextTrack +} // namespace Commands + +namespace Attributes { + +namespace CurrentState { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; + using DecodableType = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; + using DecodableArgType = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValue -namespace PeakMeasuredValueWindow { +} // namespace CurrentState +namespace StartTime { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PeakMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PeakMeasuredValueWindow -namespace AverageMeasuredValue { +} // namespace StartTime +namespace Duration { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Duration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValue -namespace AverageMeasuredValueWindow { +} // namespace Duration +namespace SampledPosition { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageMeasuredValueWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SampledPosition::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AverageMeasuredValueWindow -namespace Uncertainty { +} // namespace SampledPosition +namespace PlaybackSpeed { struct TypeInfo { using Type = float; using DecodableType = float; using DecodableArgType = float; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Uncertainty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PlaybackSpeed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Uncertainty -namespace MeasurementUnit { +} // namespace PlaybackSpeed +namespace SeekRangeEnd { struct TypeInfo { - using Type = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; - using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; - using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementUnit::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeEnd::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementUnit -namespace MeasurementMedium { +} // namespace SeekRangeEnd +namespace SeekRangeStart { struct TypeInfo { - using Type = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; - using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; - using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementMedium::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeStart::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MeasurementMedium -namespace LevelValue { +} // namespace SeekRangeStart +namespace ActiveAudioTrack { struct TypeInfo { - using Type = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; - using DecodableType = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; - using DecodableArgType = chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LevelValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveAudioTrack::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LevelValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } -}; -} // namespace ClusterRevision - +} // namespace ActiveAudioTrack +namespace AvailableAudioTracks { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::RadonConcentrationMeasurement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = chip::app::DataModel::Nullable< + chip::app::DataModel::List>; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> &; - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue; - Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType peakMeasuredValueWindow = static_cast(0); - Attributes::AverageMeasuredValue::TypeInfo::DecodableType averageMeasuredValue; - Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType averageMeasuredValueWindow = static_cast(0); - Attributes::Uncertainty::TypeInfo::DecodableType uncertainty = static_cast(0); - Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit = - static_cast(0); - Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium = - static_cast(0); - Attributes::LevelValue::TypeInfo::DecodableType levelValue = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AvailableAudioTracks::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace RadonConcentrationMeasurement -namespace WakeOnLan { - -namespace Attributes { - -namespace MACAddress { +} // namespace AvailableAudioTracks +namespace ActiveTextTrack { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MACAddress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveTextTrack::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 12; } }; -} // namespace MACAddress -namespace LinkLocalAddress { +} // namespace ActiveTextTrack +namespace AvailableTextTracks { struct TypeInfo { - using Type = chip::ByteSpan; - using DecodableType = chip::ByteSpan; - using DecodableArgType = chip::ByteSpan; + using Type = chip::app::DataModel::Nullable< + chip::app::DataModel::List>; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> &; - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LinkLocalAddress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AvailableTextTracks::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } }; -} // namespace LinkLocalAddress +} // namespace AvailableTextTracks namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } }; } // namespace ClusterRevision @@ -28661,12 +34478,22 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MACAddress::TypeInfo::DecodableType MACAddress; - Attributes::LinkLocalAddress::TypeInfo::DecodableType linkLocalAddress; + Attributes::CurrentState::TypeInfo::DecodableType currentState = + static_cast(0); + Attributes::StartTime::TypeInfo::DecodableType startTime; + Attributes::Duration::TypeInfo::DecodableType duration; + Attributes::SampledPosition::TypeInfo::DecodableType sampledPosition; + Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); + Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd; + Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart; + Attributes::ActiveAudioTrack::TypeInfo::DecodableType activeAudioTrack; + Attributes::AvailableAudioTracks::TypeInfo::DecodableType availableAudioTracks; + Attributes::ActiveTextTrack::TypeInfo::DecodableType activeTextTrack; + Attributes::AvailableTextTracks::TypeInfo::DecodableType availableTextTracks; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -28676,54 +34503,84 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace WakeOnLan -namespace Channel { -namespace Structs { -namespace ChannelInfoStruct { +namespace Events { +namespace StateChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kMajorNumber = 0, - kMinorNumber = 1, - kName = 2, - kCallSign = 3, - kAffiliateCallSign = 4, + kCurrentState = 0, + kStartTime = 1, + kDuration = 2, + kSampledPosition = 3, + kPlaybackSpeed = 4, + kSeekRangeEnd = 5, + kSeekRangeStart = 6, + kData = 7, + kAudioAdvanceUnmuted = 8, }; struct Type { public: - uint16_t majorNumber = static_cast(0); - uint16_t minorNumber = static_cast(0); - Optional name; - Optional callSign; - Optional affiliateCallSign; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr bool kIsFabricScoped = false; + PlaybackStateEnum currentState = static_cast(0); + uint64_t startTime = static_cast(0); + uint64_t duration = static_cast(0); + Structs::PlaybackPositionStruct::Type sampledPosition; + float playbackSpeed = static_cast(0); + uint64_t seekRangeEnd = static_cast(0); + uint64_t seekRangeStart = static_cast(0); + Optional data; + bool audioAdvanceUnmuted = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } -} // namespace ChannelInfoStruct -namespace LineupInfoStruct { + PlaybackStateEnum currentState = static_cast(0); + uint64_t startTime = static_cast(0); + uint64_t duration = static_cast(0); + Structs::PlaybackPositionStruct::DecodableType sampledPosition; + float playbackSpeed = static_cast(0); + uint64_t seekRangeEnd = static_cast(0); + uint64_t seekRangeStart = static_cast(0); + Optional data; + bool audioAdvanceUnmuted = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace StateChanged +} // namespace Events +} // namespace MediaPlayback +namespace MediaInput { +namespace Structs { +namespace InputInfoStruct { enum class Fields : uint8_t { - kOperatorName = 0, - kLineupName = 1, - kPostalCode = 2, - kLineupInfoType = 3, + kIndex = 0, + kInputType = 1, + kName = 2, + kDescription = 3, }; struct Type { public: - chip::CharSpan operatorName; - Optional lineupName; - Optional postalCode; - LineupInfoTypeEnum lineupInfoType = static_cast(0); + uint8_t index = static_cast(0); + InputTypeEnum inputType = static_cast(0); + chip::CharSpan name; + chip::CharSpan description; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -28734,53 +34591,53 @@ struct Type using DecodableType = Type; -} // namespace LineupInfoStruct +} // namespace InputInfoStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace ChangeChannel { +namespace SelectInput { struct Type; struct DecodableType; -} // namespace ChangeChannel +} // namespace SelectInput -namespace ChangeChannelResponse { +namespace ShowInputStatus { struct Type; struct DecodableType; -} // namespace ChangeChannelResponse +} // namespace ShowInputStatus -namespace ChangeChannelByNumber { +namespace HideInputStatus { struct Type; struct DecodableType; -} // namespace ChangeChannelByNumber +} // namespace HideInputStatus -namespace SkipChannel { +namespace RenameInput { struct Type; struct DecodableType; -} // namespace SkipChannel +} // namespace RenameInput } // namespace Commands namespace Commands { -namespace ChangeChannel { +namespace SelectInput { enum class Fields : uint8_t { - kMatch = 0, + kIndex = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - chip::CharSpan match; + uint8_t index = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -28788,29 +34645,24 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - chip::CharSpan match; + uint8_t index = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeChannel -namespace ChangeChannelResponse { +}; // namespace SelectInput +namespace ShowInputStatus { enum class Fields : uint8_t { - kStatus = 0, - kData = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - - StatusEnum status = static_cast(0); - Optional data; + static constexpr CommandId GetCommandId() { return Commands::ShowInputStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -28822,30 +34674,23 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::ShowInputStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - StatusEnum status = static_cast(0); - Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeChannelResponse -namespace ChangeChannelByNumber { +}; // namespace ShowInputStatus +namespace HideInputStatus { enum class Fields : uint8_t { - kMajorNumber = 0, - kMinorNumber = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumber::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - - uint16_t majorNumber = static_cast(0); - uint16_t minorNumber = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::HideInputStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -28857,28 +34702,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumber::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::HideInputStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - uint16_t majorNumber = static_cast(0); - uint16_t minorNumber = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeChannelByNumber -namespace SkipChannel { +}; // namespace HideInputStatus +namespace RenameInput { enum class Fields : uint8_t { - kCount = 0, + kIndex = 0, + kName = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SkipChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::RenameInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - int16_t count = static_cast(0); + uint8_t index = static_cast(0); + chip::CharSpan name; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -28890,91 +34735,78 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SkipChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr CommandId GetCommandId() { return Commands::RenameInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - int16_t count = static_cast(0); + uint8_t index = static_cast(0); + chip::CharSpan name; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SkipChannel +}; // namespace RenameInput } // namespace Commands namespace Attributes { -namespace ChannelList { +namespace InputList { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChannelList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ChannelList -namespace Lineup { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; + chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::Nullable &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Lineup::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InputList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Lineup -namespace CurrentChannel { +} // namespace InputList +namespace CurrentInput { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = - const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentInput::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentChannel +} // namespace CurrentInput namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } }; } // namespace ClusterRevision @@ -28982,13 +34814,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::ChannelList::TypeInfo::DecodableType channelList; - Attributes::Lineup::TypeInfo::DecodableType lineup; - Attributes::CurrentChannel::TypeInfo::DecodableType currentChannel; + Attributes::InputList::TypeInfo::DecodableType inputList; + Attributes::CurrentInput::TypeInfo::DecodableType currentInput = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -28998,101 +34829,31 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Channel -namespace TargetNavigator { -namespace Structs { -namespace TargetInfoStruct { -enum class Fields : uint8_t -{ - kIdentifier = 0, - kName = 1, -}; - -struct Type -{ -public: - uint8_t identifier = static_cast(0); - chip::CharSpan name; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace TargetInfoStruct -} // namespace Structs +} // namespace MediaInput +namespace LowPower { namespace Commands { // Forward-declarations so we can reference these later. -namespace NavigateTarget { -struct Type; -struct DecodableType; -} // namespace NavigateTarget - -namespace NavigateTargetResponse { +namespace Sleep { struct Type; struct DecodableType; -} // namespace NavigateTargetResponse +} // namespace Sleep } // namespace Commands namespace Commands { -namespace NavigateTarget { -enum class Fields : uint8_t -{ - kTarget = 0, - kData = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::NavigateTarget::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - - uint8_t target = static_cast(0); - Optional data; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::NavigateTarget::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - - uint8_t target = static_cast(0); - Optional data; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace NavigateTarget -namespace NavigateTargetResponse { +namespace Sleep { enum class Fields : uint8_t { - kStatus = 0, - kData = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - - TargetNavigatorStatusEnum status = static_cast(0); - Optional data; + static constexpr CommandId GetCommandId() { return Commands::Sleep::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -29104,78 +34865,50 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr CommandId GetCommandId() { return Commands::Sleep::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } - TargetNavigatorStatusEnum status = static_cast(0); - Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace NavigateTargetResponse +}; // namespace Sleep } // namespace Commands namespace Attributes { -namespace TargetList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TargetList -namespace CurrentTarget { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTarget::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentTarget namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } }; } // namespace ClusterRevision @@ -29183,12 +34916,10 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::TargetList::TypeInfo::DecodableType targetList; - Attributes::CurrentTarget::TypeInfo::DecodableType currentTarget = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -29198,342 +34929,429 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace TargetNavigator -namespace MediaPlayback { -namespace Structs { -namespace PlaybackPositionStruct { +} // namespace LowPower +namespace KeypadInput { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SendKey { +struct Type; +struct DecodableType; +} // namespace SendKey + +namespace SendKeyResponse { +struct Type; +struct DecodableType; +} // namespace SendKeyResponse + +} // namespace Commands + +namespace Commands { +namespace SendKey { enum class Fields : uint8_t { - kUpdatedAt = 0, - kPosition = 1, + kKeyCode = 0, }; struct Type { public: - uint64_t updatedAt = static_cast(0); - DataModel::Nullable position; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - static constexpr bool kIsFabricScoped = false; + CECKeyCodeEnum keyCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; -} // namespace PlaybackPositionStruct -} // namespace Structs + using ResponseType = Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType; -namespace Commands { -// Forward-declarations so we can reference these later. + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace Play { -struct Type; -struct DecodableType; -} // namespace Play +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } -namespace Pause { -struct Type; -struct DecodableType; -} // namespace Pause + CECKeyCodeEnum keyCode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SendKey +namespace SendKeyResponse { +enum class Fields : uint8_t +{ + kStatus = 0, +}; -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } -namespace StartOver { -struct Type; -struct DecodableType; -} // namespace StartOver + StatusEnum status = static_cast(0); -namespace Previous { -struct Type; -struct DecodableType; -} // namespace Previous + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Next { -struct Type; -struct DecodableType; -} // namespace Next + using ResponseType = DataModel::NullObjectType; -namespace Rewind { -struct Type; -struct DecodableType; -} // namespace Rewind + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace FastForward { -struct Type; -struct DecodableType; -} // namespace FastForward +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } -namespace SkipForward { -struct Type; -struct DecodableType; -} // namespace SkipForward + StatusEnum status = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SendKeyResponse +} // namespace Commands -namespace SkipBackward { -struct Type; -struct DecodableType; -} // namespace SkipBackward +namespace Attributes { -namespace PlaybackResponse { -struct Type; -struct DecodableType; -} // namespace PlaybackResponse +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } +}; +} // namespace ClusterRevision -namespace Seek { -struct Type; -struct DecodableType; -} // namespace Seek +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } -} // namespace Commands + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); -namespace Commands { -namespace Play { + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace KeypadInput +namespace ContentLauncher { +namespace Structs { +namespace DimensionStruct { enum class Fields : uint8_t { + kWidth = 0, + kHeight = 1, + kMetric = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Play::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + double width = static_cast(0); + double height = static_cast(0); + MetricTypeEnum metric = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Play::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Play -namespace Pause { +} // namespace DimensionStruct +namespace TrackPreferenceStruct { enum class Fields : uint8_t { + kLanguageCode = 0, + kCharacteristics = 1, + kAudioOutputIndex = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + chip::CharSpan languageCode; + Optional> characteristics; + uint8_t audioOutputIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + chip::CharSpan languageCode; + Optional> characteristics; + uint8_t audioOutputIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace Pause -namespace Stop { + +} // namespace TrackPreferenceStruct +namespace PlaybackPreferencesStruct { enum class Fields : uint8_t { + kPlaybackPosition = 0, + kTextTrack = 1, + kAudioTracks = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + uint64_t playbackPosition = static_cast(0); + Structs::TrackPreferenceStruct::Type textTrack; + Optional> audioTracks; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + uint64_t playbackPosition = static_cast(0); + Structs::TrackPreferenceStruct::DecodableType textTrack; + Optional> audioTracks; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace Stop -namespace StartOver { + +} // namespace PlaybackPreferencesStruct +namespace AdditionalInfoStruct { enum class Fields : uint8_t { + kName = 0, + kValue = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StartOver::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + chip::CharSpan name; + chip::CharSpan value; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::StartOver::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StartOver -namespace Previous { +} // namespace AdditionalInfoStruct +namespace ParameterStruct { enum class Fields : uint8_t { + kType = 0, + kValue = 1, + kExternalIDList = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Previous::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + ParameterEnum type = static_cast(0); + chip::CharSpan value; + Optional> externalIDList; - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Previous::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + ParameterEnum type = static_cast(0); + chip::CharSpan value; + Optional> externalIDList; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace Previous -namespace Next { + +} // namespace ParameterStruct +namespace ContentSearchStruct { enum class Fields : uint8_t { + kParameterList = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Next::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + DataModel::List parameterList; - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Next::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + DataModel::DecodableList parameterList; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace Next -namespace Rewind { + +} // namespace ContentSearchStruct +namespace StyleInformationStruct { enum class Fields : uint8_t { + kImageURL = 0, + kColor = 1, + kSize = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Rewind::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + Optional imageURL; + Optional color; + Optional size; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Rewind::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Rewind -namespace FastForward { +} // namespace StyleInformationStruct +namespace BrandingInformationStruct { enum class Fields : uint8_t { + kProviderName = 0, + kBackground = 1, + kLogo = 2, + kProgressBar = 3, + kSplash = 4, + kWaterMark = 5, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::FastForward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + chip::CharSpan providerName; + Optional background; + Optional logo; + Optional progressBar; + Optional splash; + Optional waterMark; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::FastForward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace FastForward -namespace SkipForward { +} // namespace BrandingInformationStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace LaunchContent { +struct Type; +struct DecodableType; +} // namespace LaunchContent + +namespace LaunchURL { +struct Type; +struct DecodableType; +} // namespace LaunchURL + +namespace LauncherResponse { +struct Type; +struct DecodableType; +} // namespace LauncherResponse + +} // namespace Commands + +namespace Commands { +namespace LaunchContent { enum class Fields : uint8_t { - kDeltaPositionMilliseconds = 0, + kSearch = 0, + kAutoPlay = 1, + kData = 2, + kPlaybackPreferences = 3, + kUseCurrentContext = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SkipForward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - uint64_t deltaPositionMilliseconds = static_cast(0); + Structs::ContentSearchStruct::Type search; + bool autoPlay = static_cast(0); + Optional data; + Optional playbackPreferences; + Optional useCurrentContext; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -29541,31 +35359,39 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SkipForward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - uint64_t deltaPositionMilliseconds = static_cast(0); + Structs::ContentSearchStruct::DecodableType search; + bool autoPlay = static_cast(0); + Optional data; + Optional playbackPreferences; + Optional useCurrentContext; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SkipForward -namespace SkipBackward { +}; // namespace LaunchContent +namespace LaunchURL { enum class Fields : uint8_t { - kDeltaPositionMilliseconds = 0, + kContentURL = 0, + kDisplayString = 1, + kBrandingInformation = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SkipBackward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchURL::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - uint64_t deltaPositionMilliseconds = static_cast(0); + chip::CharSpan contentURL; + Optional displayString; + Optional brandingInformation; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; + using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -29573,14 +35399,16 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SkipBackward::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchURL::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - uint64_t deltaPositionMilliseconds = static_cast(0); + chip::CharSpan contentURL; + Optional displayString; + Optional brandingInformation; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SkipBackward -namespace PlaybackResponse { +}; // namespace LaunchURL +namespace LauncherResponse { enum class Fields : uint8_t { kStatus = 0, @@ -29591,8 +35419,8 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } StatusEnum status = static_cast(0); Optional data; @@ -29607,170 +35435,276 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } StatusEnum status = static_cast(0); Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace PlaybackResponse -namespace Seek { +}; // namespace LauncherResponse +} // namespace Commands + +namespace Attributes { + +namespace AcceptHeader { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AcceptHeader::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AcceptHeader +namespace SupportedStreamingProtocols { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedStreamingProtocols::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedStreamingProtocols +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::AcceptHeader::TypeInfo::DecodableType acceptHeader; + Attributes::SupportedStreamingProtocols::TypeInfo::DecodableType supportedStreamingProtocols = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ContentLauncher +namespace AudioOutput { +namespace Structs { +namespace OutputInfoStruct { enum class Fields : uint8_t { - kPosition = 0, + kIndex = 0, + kOutputType = 1, + kName = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Seek::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + uint8_t index = static_cast(0); + OutputTypeEnum outputType = static_cast(0); + chip::CharSpan name; - uint64_t position = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return false; } +} // namespace OutputInfoStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SelectOutput { +struct Type; +struct DecodableType; +} // namespace SelectOutput + +namespace RenameOutput { +struct Type; +struct DecodableType; +} // namespace RenameOutput + +} // namespace Commands + +namespace Commands { +namespace SelectOutput { +enum class Fields : uint8_t +{ + kIndex = 0, }; -struct DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::Seek::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SelectOutput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - uint64_t position = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Seek -} // namespace Commands + uint8_t index = static_cast(0); -namespace Attributes { + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace CurrentState { -struct TypeInfo -{ - using Type = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; - using DecodableType = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; - using DecodableArgType = chip::app::Clusters::MediaPlayback::PlaybackStateEnum; + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace CurrentState -namespace StartTime { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::SelectOutput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t index = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace StartTime -namespace Duration { -struct TypeInfo +}; // namespace SelectOutput +namespace RenameOutput { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Duration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kIndex = 0, + kName = 1, }; -} // namespace Duration -namespace SampledPosition { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = - chip::app::DataModel::Nullable; - using DecodableArgType = - const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RenameOutput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SampledPosition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t index = static_cast(0); + chip::CharSpan name; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace SampledPosition -namespace PlaybackSpeed { -struct TypeInfo + +struct DecodableType { - using Type = float; - using DecodableType = float; - using DecodableArgType = float; +public: + static constexpr CommandId GetCommandId() { return Commands::RenameOutput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PlaybackSpeed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t index = static_cast(0); + chip::CharSpan name; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PlaybackSpeed -namespace SeekRangeEnd { +}; // namespace RenameOutput +} // namespace Commands + +namespace Attributes { + +namespace OutputList { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeEnd::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OutputList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SeekRangeEnd -namespace SeekRangeStart { +} // namespace OutputList +namespace CurrentOutput { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeStart::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentOutput::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SeekRangeStart +} // namespace CurrentOutput namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } }; } // namespace ClusterRevision @@ -29778,18 +35712,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentState::TypeInfo::DecodableType currentState = - static_cast(0); - Attributes::StartTime::TypeInfo::DecodableType startTime; - Attributes::Duration::TypeInfo::DecodableType duration; - Attributes::SampledPosition::TypeInfo::DecodableType sampledPosition; - Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); - Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd; - Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart; + Attributes::OutputList::TypeInfo::DecodableType outputList; + Attributes::CurrentOutput::TypeInfo::DecodableType currentOutput = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -29799,25 +35727,22 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace MediaPlayback -namespace MediaInput { +} // namespace AudioOutput +namespace ApplicationLauncher { namespace Structs { -namespace InputInfoStruct { +namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; +namespace ApplicationEPStruct { enum class Fields : uint8_t { - kIndex = 0, - kInputType = 1, - kName = 2, - kDescription = 3, + kApplication = 0, + kEndpoint = 1, }; struct Type { public: - uint8_t index = static_cast(0); - InputTypeEnum inputType = static_cast(0); - chip::CharSpan name; - chip::CharSpan description; + Structs::ApplicationStruct::Type application; + Optional endpoint; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -29828,53 +35753,55 @@ struct Type using DecodableType = Type; -} // namespace InputInfoStruct +} // namespace ApplicationEPStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace SelectInput { +namespace LaunchApp { struct Type; struct DecodableType; -} // namespace SelectInput +} // namespace LaunchApp -namespace ShowInputStatus { +namespace StopApp { struct Type; struct DecodableType; -} // namespace ShowInputStatus +} // namespace StopApp -namespace HideInputStatus { +namespace HideApp { struct Type; struct DecodableType; -} // namespace HideInputStatus +} // namespace HideApp -namespace RenameInput { +namespace LauncherResponse { struct Type; struct DecodableType; -} // namespace RenameInput +} // namespace LauncherResponse } // namespace Commands namespace Commands { -namespace SelectInput { +namespace LaunchApp { enum class Fields : uint8_t { - kIndex = 0, + kApplication = 0, + kData = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SelectInput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - uint8_t index = static_cast(0); + Optional application; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -29882,28 +35809,32 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SelectInput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::LaunchApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - uint8_t index = static_cast(0); + Optional application; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SelectInput -namespace ShowInputStatus { +}; // namespace LaunchApp +namespace StopApp { enum class Fields : uint8_t { + kApplication = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ShowInputStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Optional application; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -29911,27 +35842,31 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ShowInputStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + Optional application; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ShowInputStatus -namespace HideInputStatus { +}; // namespace StopApp +namespace HideApp { enum class Fields : uint8_t { + kApplication = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::HideInputStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + + Optional application; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -29939,28 +35874,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::HideInputStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + Optional application; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace HideInputStatus -namespace RenameInput { +}; // namespace HideApp +namespace LauncherResponse { enum class Fields : uint8_t { - kIndex = 0, - kName = 1, + kStatus = 0, + kData = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RenameInput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - uint8_t index = static_cast(0); - chip::CharSpan name; + StatusEnum status = static_cast(0); + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -29972,78 +35908,78 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RenameInput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - uint8_t index = static_cast(0); - chip::CharSpan name; + StatusEnum status = static_cast(0); + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RenameInput +}; // namespace LauncherResponse } // namespace Commands namespace Attributes { -namespace InputList { +namespace CatalogList { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InputList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CatalogList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InputList -namespace CurrentInput { +} // namespace CatalogList +namespace CurrentApp { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentApp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentInput +} // namespace CurrentApp namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; } // namespace ClusterRevision @@ -30051,12 +35987,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::InputList::TypeInfo::DecodableType inputList; - Attributes::CurrentInput::TypeInfo::DecodableType currentInput = static_cast(0); + Attributes::CatalogList::TypeInfo::DecodableType catalogList; + Attributes::CurrentApp::TypeInfo::DecodableType currentApp; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -30066,227 +36002,147 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace MediaInput -namespace LowPower { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Sleep { -struct Type; -struct DecodableType; -} // namespace Sleep - -} // namespace Commands +} // namespace ApplicationLauncher +namespace ApplicationBasic { +namespace Structs { +namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; +} // namespace Structs -namespace Commands { -namespace Sleep { -enum class Fields : uint8_t -{ -}; +namespace Attributes { -struct Type +namespace VendorName { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Sleep::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; - -struct DecodableType +} // namespace VendorName +namespace VendorID { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::Sleep::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Sleep -} // namespace Commands - -namespace Attributes { + using Type = chip::VendorId; + using DecodableType = chip::VendorId; + using DecodableArgType = chip::VendorId; -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ClusterRevision - +} // namespace VendorID +namespace ApplicationName { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace LowPower -namespace KeypadInput { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace SendKey { -struct Type; -struct DecodableType; -} // namespace SendKey - -namespace SendKeyResponse { -struct Type; -struct DecodableType; -} // namespace SendKeyResponse - -} // namespace Commands + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -namespace Commands { -namespace SendKey { -enum class Fields : uint8_t -{ - kKeyCode = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 256; } }; - -struct Type +} // namespace ApplicationName +namespace ProductID { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - - CecKeyCode keyCode = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace ProductID +namespace Application { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + using Type = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::Type; + using DecodableType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType &; - CecKeyCode keyCode = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Application::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace SendKey -namespace SendKeyResponse { -enum class Fields : uint8_t +} // namespace Application +namespace Status { +struct TypeInfo { - kStatus = 0, -}; + using Type = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; + using DecodableType = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; + using DecodableArgType = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Status::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Status +namespace ApplicationVersion { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - - StatusEnum status = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; - -struct DecodableType +} // namespace ApplicationVersion +namespace AllowedVendorList { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - StatusEnum status = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AllowedVendorList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace SendKeyResponse -} // namespace Commands - -namespace Attributes { - +} // namespace AllowedVendorList namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } }; } // namespace ClusterRevision @@ -30294,10 +36150,19 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::VendorName::TypeInfo::DecodableType vendorName; + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); + Attributes::ApplicationName::TypeInfo::DecodableType applicationName; + Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); + Attributes::Application::TypeInfo::DecodableType application; + Attributes::Status::TypeInfo::DecodableType status = + static_cast(0); + Attributes::ApplicationVersion::TypeInfo::DecodableType applicationVersion; + Attributes::AllowedVendorList::TypeInfo::DecodableType allowedVendorList; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -30307,218 +36172,85 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace KeypadInput -namespace ContentLauncher { -namespace Structs { -namespace DimensionStruct { -enum class Fields : uint8_t -{ - kWidth = 0, - kHeight = 1, - kMetric = 2, -}; - -struct Type -{ -public: - double width = static_cast(0); - double height = static_cast(0); - MetricTypeEnum metric = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; +} // namespace ApplicationBasic +namespace AccountLogin { -} // namespace DimensionStruct -namespace AdditionalInfoStruct { -enum class Fields : uint8_t -{ - kName = 0, - kValue = 1, -}; +namespace Commands { +// Forward-declarations so we can reference these later. -struct Type -{ -public: - chip::CharSpan name; - chip::CharSpan value; +namespace GetSetupPIN { +struct Type; +struct DecodableType; +} // namespace GetSetupPIN - CHIP_ERROR Decode(TLV::TLVReader & reader); +namespace GetSetupPINResponse { +struct Type; +struct DecodableType; +} // namespace GetSetupPINResponse - static constexpr bool kIsFabricScoped = false; +namespace Login { +struct Type; +struct DecodableType; +} // namespace Login - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; +namespace Logout { +struct Type; +struct DecodableType; +} // namespace Logout -using DecodableType = Type; +} // namespace Commands -} // namespace AdditionalInfoStruct -namespace ParameterStruct { +namespace Commands { +namespace GetSetupPIN { enum class Fields : uint8_t { - kType = 0, - kValue = 1, - kExternalIDList = 2, + kTempAccountIdentifier = 0, }; struct Type { public: - ParameterEnum type = static_cast(0); - chip::CharSpan value; - Optional> externalIDList; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - static constexpr bool kIsFabricScoped = false; + chip::CharSpan tempAccountIdentifier; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - ParameterEnum type = static_cast(0); - chip::CharSpan value; - Optional> externalIDList; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; -}; - -} // namespace ParameterStruct -namespace ContentSearchStruct { -enum class Fields : uint8_t -{ - kParameterList = 0, -}; -struct Type -{ -public: - DataModel::List parameterList; - - static constexpr bool kIsFabricScoped = false; + using ResponseType = Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - DataModel::DecodableList parameterList; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; -}; - -} // namespace ContentSearchStruct -namespace StyleInformationStruct { -enum class Fields : uint8_t -{ - kImageURL = 0, - kColor = 1, - kSize = 2, -}; - -struct Type -{ -public: - Optional imageURL; - Optional color; - Optional size; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace StyleInformationStruct -namespace BrandingInformationStruct { -enum class Fields : uint8_t -{ - kProviderName = 0, - kBackground = 1, - kLogo = 2, - kProgressBar = 3, - kSplash = 4, - kWaterMark = 5, -}; - -struct Type -{ -public: - chip::CharSpan providerName; - Optional background; - Optional logo; - Optional progressBar; - Optional splash; - Optional waterMark; + static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + chip::CharSpan tempAccountIdentifier; CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; - -using DecodableType = Type; - -} // namespace BrandingInformationStruct -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace LaunchContent { -struct Type; -struct DecodableType; -} // namespace LaunchContent - -namespace LaunchURL { -struct Type; -struct DecodableType; -} // namespace LaunchURL - -namespace LauncherResponse { -struct Type; -struct DecodableType; -} // namespace LauncherResponse - -} // namespace Commands - -namespace Commands { -namespace LaunchContent { +}; // namespace GetSetupPIN +namespace GetSetupPINResponse { enum class Fields : uint8_t { - kSearch = 0, - kAutoPlay = 1, - kData = 2, + kSetupPIN = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LaunchContent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - Structs::ContentSearchStruct::Type search; - bool autoPlay = static_cast(0); - Optional data; + chip::CharSpan setupPIN; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -30526,150 +36258,121 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LaunchContent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - Structs::ContentSearchStruct::DecodableType search; - bool autoPlay = static_cast(0); - Optional data; + chip::CharSpan setupPIN; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LaunchContent -namespace LaunchURL { +}; // namespace GetSetupPINResponse +namespace Login { enum class Fields : uint8_t { - kContentURL = 0, - kDisplayString = 1, - kBrandingInformation = 2, + kTempAccountIdentifier = 0, + kSetupPIN = 1, + kNode = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LaunchURL::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Login::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - chip::CharSpan contentURL; - Optional displayString; - Optional brandingInformation; + chip::CharSpan tempAccountIdentifier; + chip::CharSpan setupPIN; + Optional node; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LaunchURL::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Login::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - chip::CharSpan contentURL; - Optional displayString; - Optional brandingInformation; + chip::CharSpan tempAccountIdentifier; + chip::CharSpan setupPIN; + Optional node; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LaunchURL -namespace LauncherResponse { +}; // namespace Login +namespace Logout { enum class Fields : uint8_t { - kStatus = 0, - kData = 1, + kNode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - StatusEnum status = static_cast(0); - Optional data; + Optional node; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - StatusEnum status = static_cast(0); - Optional data; + Optional node; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LauncherResponse +}; // namespace Logout } // namespace Commands namespace Attributes { -namespace AcceptHeader { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcceptHeader::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcceptHeader -namespace SupportedStreamingProtocols { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedStreamingProtocols::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportedStreamingProtocols namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } }; } // namespace ClusterRevision @@ -30677,13 +36380,10 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::AcceptHeader::TypeInfo::DecodableType acceptHeader; - Attributes::SupportedStreamingProtocols::TypeInfo::DecodableType supportedStreamingProtocols = - static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -30693,23 +36393,56 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ContentLauncher -namespace AudioOutput { +namespace Events { +namespace LoggedOut { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t +{ + kNode = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LoggedOut::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr bool kIsFabricScoped = false; + + Optional node; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LoggedOut::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + + Optional node; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace LoggedOut +} // namespace Events +} // namespace AccountLogin +namespace ContentControl { namespace Structs { -namespace OutputInfoStruct { +namespace RatingNameStruct { enum class Fields : uint8_t { - kIndex = 0, - kOutputType = 1, - kName = 2, + kRatingName = 0, + kRatingNameDesc = 1, }; struct Type { public: - uint8_t index = static_cast(0); - OutputTypeEnum outputType = static_cast(0); - chip::CharSpan name; + chip::CharSpan ratingName; + Optional ratingNameDesc; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30720,253 +36453,180 @@ struct Type using DecodableType = Type; -} // namespace OutputInfoStruct +} // namespace RatingNameStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace SelectOutput { +namespace UpdatePIN { struct Type; struct DecodableType; -} // namespace SelectOutput +} // namespace UpdatePIN -namespace RenameOutput { +namespace ResetPIN { struct Type; struct DecodableType; -} // namespace RenameOutput +} // namespace ResetPIN -} // namespace Commands +namespace ResetPINResponse { +struct Type; +struct DecodableType; +} // namespace ResetPINResponse -namespace Commands { -namespace SelectOutput { -enum class Fields : uint8_t -{ - kIndex = 0, -}; +namespace Enable { +struct Type; +struct DecodableType; +} // namespace Enable -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SelectOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } +namespace Disable { +struct Type; +struct DecodableType; +} // namespace Disable - uint8_t index = static_cast(0); +namespace AddBonusTime { +struct Type; +struct DecodableType; +} // namespace AddBonusTime - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace SetScreenDailyTime { +struct Type; +struct DecodableType; +} // namespace SetScreenDailyTime - using ResponseType = DataModel::NullObjectType; +namespace BlockUnratedContent { +struct Type; +struct DecodableType; +} // namespace BlockUnratedContent - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace UnblockUnratedContent { +struct Type; +struct DecodableType; +} // namespace UnblockUnratedContent -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::SelectOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } +namespace SetOnDemandRatingThreshold { +struct Type; +struct DecodableType; +} // namespace SetOnDemandRatingThreshold - uint8_t index = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace SelectOutput -namespace RenameOutput { +namespace SetScheduledContentRatingThreshold { +struct Type; +struct DecodableType; +} // namespace SetScheduledContentRatingThreshold + +} // namespace Commands + +namespace Commands { +namespace UpdatePIN { enum class Fields : uint8_t { - kIndex = 0, - kName = 1, + kOldPIN = 0, + kNewPIN = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RenameOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - - uint8_t index = static_cast(0); - chip::CharSpan name; - - 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::RenameOutput::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - - uint8_t index = static_cast(0); - chip::CharSpan name; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace RenameOutput -} // namespace Commands - -namespace Attributes { - -namespace OutputList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OutputList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OutputList -namespace CurrentOutput { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + static constexpr CommandId GetCommandId() { return Commands::UpdatePIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentOutput::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentOutput -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } + Optional oldPIN; + chip::CharSpan newPIN; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr CommandId GetCommandId() { return Commands::UpdatePIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Attributes::OutputList::TypeInfo::DecodableType outputList; - Attributes::CurrentOutput::TypeInfo::DecodableType currentOutput = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + Optional oldPIN; + chip::CharSpan newPIN; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace AudioOutput -namespace ApplicationLauncher { -namespace Structs { -namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; -namespace ApplicationEPStruct { +}; // namespace UpdatePIN +namespace ResetPIN { enum class Fields : uint8_t { - kApplication = 0, - kEndpoint = 1, }; struct Type { public: - Structs::ApplicationStruct::Type application; - Optional endpoint; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ResetPIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr bool kIsFabricScoped = false; + using ResponseType = Clusters::ContentControl::Commands::ResetPINResponse::DecodableType; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr bool MustUseTimedInvoke() { return false; } }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ResetPIN::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } -} // namespace ApplicationEPStruct -} // namespace Structs + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetPIN +namespace ResetPINResponse { +enum class Fields : uint8_t +{ + kPINCode = 0, +}; -namespace Commands { -// Forward-declarations so we can reference these later. +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ResetPINResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } -namespace LaunchApp { -struct Type; -struct DecodableType; -} // namespace LaunchApp + chip::CharSpan PINCode; -namespace StopApp { -struct Type; -struct DecodableType; -} // namespace StopApp + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace HideApp { -struct Type; -struct DecodableType; -} // namespace HideApp + using ResponseType = DataModel::NullObjectType; -namespace LauncherResponse { -struct Type; -struct DecodableType; -} // namespace LauncherResponse + static constexpr bool MustUseTimedInvoke() { return false; } +}; -} // namespace Commands +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ResetPINResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } -namespace Commands { -namespace LaunchApp { + chip::CharSpan PINCode; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetPINResponse +namespace Enable { enum class Fields : uint8_t { - kApplication = 0, - kData = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LaunchApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - - Optional application; - Optional data; + static constexpr CommandId GetCommandId() { return Commands::Enable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -30974,32 +36634,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LaunchApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Enable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional application; - Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LaunchApp -namespace StopApp { +}; // namespace Enable +namespace Disable { enum class Fields : uint8_t { - kApplication = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - - Optional application; + static constexpr CommandId GetCommandId() { return Commands::Disable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -31007,31 +36662,32 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StopApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::Disable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional application; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StopApp -namespace HideApp { +}; // namespace Disable +namespace AddBonusTime { enum class Fields : uint8_t { - kApplication = 0, + kPINCode = 0, + kBonusTime = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddBonusTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional application; + Optional PINCode; + Optional bonusTime; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -31039,29 +36695,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::HideApp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddBonusTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional application; + Optional PINCode; + Optional bonusTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace HideApp -namespace LauncherResponse { +}; // namespace AddBonusTime +namespace SetScreenDailyTime { enum class Fields : uint8_t { - kStatus = 0, - kData = 1, + kScreenTime = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetScreenDailyTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - StatusEnum status = static_cast(0); - Optional data; + uint32_t screenTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31073,241 +36728,273 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetScreenDailyTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - StatusEnum status = static_cast(0); - Optional data; + uint32_t screenTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace LauncherResponse -} // namespace Commands - -namespace Attributes { +}; // namespace SetScreenDailyTime +namespace BlockUnratedContent { +enum class Fields : uint8_t +{ +}; -namespace CatalogList { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::BlockUnratedContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CatalogList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace CatalogList -namespace CurrentApp { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = - chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable< - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> &; +public: + static constexpr CommandId GetCommandId() { return Commands::BlockUnratedContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentApp::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace CurrentApp -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +}; // namespace BlockUnratedContent +namespace UnblockUnratedContent { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::UnblockUnratedContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::UnblockUnratedContent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +}; // namespace UnblockUnratedContent +namespace SetOnDemandRatingThreshold { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + kRating = 0, }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetOnDemandRatingThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + chip::CharSpan rating; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::SetOnDemandRatingThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + chip::CharSpan rating; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetOnDemandRatingThreshold +namespace SetScheduledContentRatingThreshold { +enum class Fields : uint8_t +{ + kRating = 0, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetScheduledContentRatingThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + chip::CharSpan rating; - Attributes::CatalogList::TypeInfo::DecodableType catalogList; - Attributes::CurrentApp::TypeInfo::DecodableType currentApp; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -} // namespace ApplicationLauncher -namespace ApplicationBasic { -namespace Structs { -namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; -} // namespace Structs + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetScheduledContentRatingThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + chip::CharSpan rating; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetScheduledContentRatingThreshold +} // namespace Commands namespace Attributes { -namespace VendorName { +namespace Enabled { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Enabled::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } }; -} // namespace VendorName -namespace VendorID { +} // namespace Enabled +namespace OnDemandRatings { struct TypeInfo { - using Type = chip::VendorId; - using DecodableType = chip::VendorId; - using DecodableArgType = chip::VendorId; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnDemandRatings::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace VendorID -namespace ApplicationName { +} // namespace OnDemandRatings +namespace OnDemandRatingThreshold { struct TypeInfo { using Type = chip::CharSpan; using DecodableType = chip::CharSpan; using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationName::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnDemandRatingThreshold::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 256; } + static constexpr size_t MaxLength() { return 8; } }; -} // namespace ApplicationName -namespace ProductID { +} // namespace OnDemandRatingThreshold +namespace ScheduledContentRatings { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductID::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScheduledContentRatings::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ProductID -namespace Application { +} // namespace ScheduledContentRatings +namespace ScheduledContentRatingThreshold { struct TypeInfo { - using Type = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::Type; - using DecodableType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Application::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScheduledContentRatingThreshold::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 8; } }; -} // namespace Application -namespace Status { +} // namespace ScheduledContentRatingThreshold +namespace ScreenDailyTime { struct TypeInfo { - using Type = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; - using DecodableType = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; - using DecodableArgType = chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Status::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScreenDailyTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Status -namespace ApplicationVersion { +} // namespace ScreenDailyTime +namespace RemainingScreenTime { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationVersion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemainingScreenTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } }; -} // namespace ApplicationVersion -namespace AllowedVendorList { +} // namespace RemainingScreenTime +namespace BlockUnrated { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AllowedVendorList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BlockUnrated::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AllowedVendorList +} // namespace BlockUnrated namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } }; } // namespace ClusterRevision @@ -31315,19 +37002,18 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); - Attributes::ApplicationName::TypeInfo::DecodableType applicationName; - Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); - Attributes::Application::TypeInfo::DecodableType application; - Attributes::Status::TypeInfo::DecodableType status = - static_cast(0); - Attributes::ApplicationVersion::TypeInfo::DecodableType applicationVersion; - Attributes::AllowedVendorList::TypeInfo::DecodableType allowedVendorList; + Attributes::Enabled::TypeInfo::DecodableType enabled = static_cast(0); + Attributes::OnDemandRatings::TypeInfo::DecodableType onDemandRatings; + Attributes::OnDemandRatingThreshold::TypeInfo::DecodableType onDemandRatingThreshold; + Attributes::ScheduledContentRatings::TypeInfo::DecodableType scheduledContentRatings; + Attributes::ScheduledContentRatingThreshold::TypeInfo::DecodableType scheduledContentRatingThreshold; + Attributes::ScreenDailyTime::TypeInfo::DecodableType screenDailyTime = static_cast(0); + Attributes::RemainingScreenTime::TypeInfo::DecodableType remainingScreenTime = static_cast(0); + Attributes::BlockUnrated::TypeInfo::DecodableType blockUnrated = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -31337,162 +37023,128 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ApplicationBasic -namespace AccountLogin { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace GetSetupPIN { -struct Type; -struct DecodableType; -} // namespace GetSetupPIN - -namespace GetSetupPINResponse { -struct Type; -struct DecodableType; -} // namespace GetSetupPINResponse - -namespace Login { -struct Type; -struct DecodableType; -} // namespace Login - -namespace Logout { -struct Type; -struct DecodableType; -} // namespace Logout - -} // namespace Commands +namespace Events { +namespace RemainingScreenTimeExpired { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Commands { -namespace GetSetupPIN { enum class Fields : uint8_t { - kTempAccountIdentifier = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - - chip::CharSpan tempAccountIdentifier; + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::RemainingScreenTimeExpired::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::RemainingScreenTimeExpired::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - chip::CharSpan tempAccountIdentifier; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetSetupPIN -namespace GetSetupPINResponse { -enum class Fields : uint8_t -{ - kSetupPIN = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - - chip::CharSpan setupPIN; +} // namespace RemainingScreenTimeExpired +} // namespace Events +} // namespace ContentControl +namespace ContentAppObserver { - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Commands { +// Forward-declarations so we can reference these later. - using ResponseType = DataModel::NullObjectType; +namespace ContentAppMessage { +struct Type; +struct DecodableType; +} // namespace ContentAppMessage - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace ContentAppMessageResponse { +struct Type; +struct DecodableType; +} // namespace ContentAppMessageResponse -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } +} // namespace Commands - chip::CharSpan setupPIN; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetSetupPINResponse -namespace Login { +namespace Commands { +namespace ContentAppMessage { enum class Fields : uint8_t { - kTempAccountIdentifier = 0, - kSetupPIN = 1, + kData = 0, + kEncodingHint = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Login::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr CommandId GetCommandId() { return Commands::ContentAppMessage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } - chip::CharSpan tempAccountIdentifier; - chip::CharSpan setupPIN; + Optional data; + chip::CharSpan encodingHint; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Login::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr CommandId GetCommandId() { return Commands::ContentAppMessage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } - chip::CharSpan tempAccountIdentifier; - chip::CharSpan setupPIN; + Optional data; + chip::CharSpan encodingHint; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Login -namespace Logout { +}; // namespace ContentAppMessage +namespace ContentAppMessageResponse { enum class Fields : uint8_t { + kStatus = 0, + kData = 1, + kEncodingHint = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr CommandId GetCommandId() { return Commands::ContentAppMessageResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } + + Optional status; + chip::CharSpan data; + chip::CharSpan encodingHint; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr CommandId GetCommandId() { return Commands::ContentAppMessageResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } + Optional status; + chip::CharSpan data; + chip::CharSpan encodingHint; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Logout +}; // namespace ContentAppMessageResponse } // namespace Commands namespace Attributes { @@ -31500,37 +37152,37 @@ namespace Attributes { namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } }; } // namespace ClusterRevision @@ -31538,7 +37190,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -31551,7 +37203,7 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace AccountLogin +} // namespace ContentAppObserver namespace ElectricalMeasurement { namespace Commands { @@ -36744,6 +42396,46 @@ struct TypeInfo }; }; } // namespace Attributes +namespace Events { +namespace PingCountEvent { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kCount = 1, + kFabricIndex = 254, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PingCountEvent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SampleMei::Id; } + static constexpr bool kIsFabricScoped = true; + + uint32_t count = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + auto GetFabricIndex() const { return fabricIndex; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PingCountEvent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SampleMei::Id; } + + uint32_t count = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace PingCountEvent +} // namespace Events } // namespace SampleMei } // namespace Clusters 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 6f71c5db8889fb..ae707a1554f607 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 @@ -158,9 +158,9 @@ namespace SceneTableSize { static constexpr AttributeId Id = 0x00000006; } // namespace SceneTableSize -namespace RemainingCapacity { +namespace FabricSceneInfo { static constexpr AttributeId Id = 0x00000007; -} // namespace RemainingCapacity +} // namespace FabricSceneInfo namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; @@ -722,6 +722,14 @@ namespace ProductAppearance { static constexpr AttributeId Id = 0x00000014; } // namespace ProductAppearance +namespace SpecificationVersion { +static constexpr AttributeId Id = 0x00000015; +} // namespace SpecificationVersion + +namespace MaxPathsPerInvoke { +static constexpr AttributeId Id = 0x00000016; +} // namespace MaxPathsPerInvoke + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -2441,7 +2449,49 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { +namespace Attributes { + +namespace SetTime { +static constexpr AttributeId Id = 0x00000000; +} // namespace SetTime + +namespace TimeRemaining { +static constexpr AttributeId Id = 0x00000001; +} // namespace TimeRemaining + +namespace TimerState { +static constexpr AttributeId Id = 0x00000002; +} // namespace TimerState + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Timer + +namespace OvenCavityOperationalState { namespace Attributes { namespace PhaseList { @@ -2493,7 +2543,91 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision } // namespace Attributes -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState + +namespace OvenMode { +namespace Attributes { + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000000; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000001; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000002; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + +namespace LaundryDryerControls { +namespace Attributes { + +namespace SupportedDrynessLevels { +static constexpr AttributeId Id = 0x00000000; +} // namespace SupportedDrynessLevels + +namespace SelectedDrynessLevel { +static constexpr AttributeId Id = 0x00000001; +} // namespace SelectedDrynessLevel + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace LaundryDryerControls namespace ModeSelect { namespace Attributes { @@ -3379,6 +3513,438 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanStateConfiguration { +namespace Attributes { + +namespace CurrentSensitivityLevel { +static constexpr AttributeId Id = 0x00000000; +} // namespace CurrentSensitivityLevel + +namespace SupportedSensitivityLevels { +static constexpr AttributeId Id = 0x00000001; +} // namespace SupportedSensitivityLevels + +namespace DefaultSensitivityLevel { +static constexpr AttributeId Id = 0x00000002; +} // namespace DefaultSensitivityLevel + +namespace AlarmsActive { +static constexpr AttributeId Id = 0x00000003; +} // namespace AlarmsActive + +namespace AlarmsSuppressed { +static constexpr AttributeId Id = 0x00000004; +} // namespace AlarmsSuppressed + +namespace AlarmsEnabled { +static constexpr AttributeId Id = 0x00000005; +} // namespace AlarmsEnabled + +namespace AlarmsSupported { +static constexpr AttributeId Id = 0x00000006; +} // namespace AlarmsSupported + +namespace SensorFault { +static constexpr AttributeId Id = 0x00000007; +} // namespace SensorFault + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanStateConfiguration + +namespace ValveConfigurationAndControl { +namespace Attributes { + +namespace OpenDuration { +static constexpr AttributeId Id = 0x00000000; +} // namespace OpenDuration + +namespace DefaultOpenDuration { +static constexpr AttributeId Id = 0x00000001; +} // namespace DefaultOpenDuration + +namespace AutoCloseTime { +static constexpr AttributeId Id = 0x00000002; +} // namespace AutoCloseTime + +namespace RemainingDuration { +static constexpr AttributeId Id = 0x00000003; +} // namespace RemainingDuration + +namespace CurrentState { +static constexpr AttributeId Id = 0x00000004; +} // namespace CurrentState + +namespace TargetState { +static constexpr AttributeId Id = 0x00000005; +} // namespace TargetState + +namespace CurrentLevel { +static constexpr AttributeId Id = 0x00000006; +} // namespace CurrentLevel + +namespace TargetLevel { +static constexpr AttributeId Id = 0x00000007; +} // namespace TargetLevel + +namespace DefaultOpenLevel { +static constexpr AttributeId Id = 0x00000008; +} // namespace DefaultOpenLevel + +namespace ValveFault { +static constexpr AttributeId Id = 0x00000009; +} // namespace ValveFault + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ValveConfigurationAndControl + +namespace ElectricalEnergyMeasurement { +namespace Attributes { + +namespace Accuracy { +static constexpr AttributeId Id = 0x00000000; +} // namespace Accuracy + +namespace CumulativeEnergyImported { +static constexpr AttributeId Id = 0x00000001; +} // namespace CumulativeEnergyImported + +namespace CumulativeEnergyExported { +static constexpr AttributeId Id = 0x00000002; +} // namespace CumulativeEnergyExported + +namespace PeriodicEnergyImported { +static constexpr AttributeId Id = 0x00000003; +} // namespace PeriodicEnergyImported + +namespace PeriodicEnergyExported { +static constexpr AttributeId Id = 0x00000004; +} // namespace PeriodicEnergyExported + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ElectricalEnergyMeasurement + +namespace DemandResponseLoadControl { +namespace Attributes { + +namespace LoadControlPrograms { +static constexpr AttributeId Id = 0x00000000; +} // namespace LoadControlPrograms + +namespace NumberOfLoadControlPrograms { +static constexpr AttributeId Id = 0x00000001; +} // namespace NumberOfLoadControlPrograms + +namespace Events { +static constexpr AttributeId Id = 0x00000002; +} // namespace Events + +namespace ActiveEvents { +static constexpr AttributeId Id = 0x00000003; +} // namespace ActiveEvents + +namespace NumberOfEventsPerProgram { +static constexpr AttributeId Id = 0x00000004; +} // namespace NumberOfEventsPerProgram + +namespace NumberOfTransitions { +static constexpr AttributeId Id = 0x00000005; +} // namespace NumberOfTransitions + +namespace DefaultRandomStart { +static constexpr AttributeId Id = 0x00000006; +} // namespace DefaultRandomStart + +namespace DefaultRandomDuration { +static constexpr AttributeId Id = 0x00000007; +} // namespace DefaultRandomDuration + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DemandResponseLoadControl + +namespace DeviceEnergyManagement { +namespace Attributes { + +namespace ESAType { +static constexpr AttributeId Id = 0x00000000; +} // namespace ESAType + +namespace ESACanGenerate { +static constexpr AttributeId Id = 0x00000001; +} // namespace ESACanGenerate + +namespace ESAState { +static constexpr AttributeId Id = 0x00000002; +} // namespace ESAState + +namespace AbsMinPower { +static constexpr AttributeId Id = 0x00000003; +} // namespace AbsMinPower + +namespace AbsMaxPower { +static constexpr AttributeId Id = 0x00000004; +} // namespace AbsMaxPower + +namespace PowerAdjustmentCapability { +static constexpr AttributeId Id = 0x00000005; +} // namespace PowerAdjustmentCapability + +namespace Forecast { +static constexpr AttributeId Id = 0x00000006; +} // namespace Forecast + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { +namespace Attributes { + +namespace State { +static constexpr AttributeId Id = 0x00000000; +} // namespace State + +namespace SupplyState { +static constexpr AttributeId Id = 0x00000001; +} // namespace SupplyState + +namespace FaultState { +static constexpr AttributeId Id = 0x00000002; +} // namespace FaultState + +namespace ChargingEnabledUntil { +static constexpr AttributeId Id = 0x00000003; +} // namespace ChargingEnabledUntil + +namespace DischargingEnabledUntil { +static constexpr AttributeId Id = 0x00000004; +} // namespace DischargingEnabledUntil + +namespace CircuitCapacity { +static constexpr AttributeId Id = 0x00000005; +} // namespace CircuitCapacity + +namespace MinimumChargeCurrent { +static constexpr AttributeId Id = 0x00000006; +} // namespace MinimumChargeCurrent + +namespace MaximumChargeCurrent { +static constexpr AttributeId Id = 0x00000007; +} // namespace MaximumChargeCurrent + +namespace MaximumDischargeCurrent { +static constexpr AttributeId Id = 0x00000008; +} // namespace MaximumDischargeCurrent + +namespace UserMaximumChargeCurrent { +static constexpr AttributeId Id = 0x00000009; +} // namespace UserMaximumChargeCurrent + +namespace RandomizationDelayWindow { +static constexpr AttributeId Id = 0x0000000A; +} // namespace RandomizationDelayWindow + +namespace NumberOfWeeklyTargets { +static constexpr AttributeId Id = 0x00000021; +} // namespace NumberOfWeeklyTargets + +namespace NumberOfDailyTargets { +static constexpr AttributeId Id = 0x00000022; +} // namespace NumberOfDailyTargets + +namespace NextChargeStartTime { +static constexpr AttributeId Id = 0x00000023; +} // namespace NextChargeStartTime + +namespace NextChargeTargetTime { +static constexpr AttributeId Id = 0x00000024; +} // namespace NextChargeTargetTime + +namespace NextChargeRequiredEnergy { +static constexpr AttributeId Id = 0x00000025; +} // namespace NextChargeRequiredEnergy + +namespace NextChargeTargetSoC { +static constexpr AttributeId Id = 0x00000026; +} // namespace NextChargeTargetSoC + +namespace ApproximateEVEfficiency { +static constexpr AttributeId Id = 0x00000027; +} // namespace ApproximateEVEfficiency + +namespace StateOfCharge { +static constexpr AttributeId Id = 0x00000030; +} // namespace StateOfCharge + +namespace BatteryCapacity { +static constexpr AttributeId Id = 0x00000031; +} // namespace BatteryCapacity + +namespace VehicleID { +static constexpr AttributeId Id = 0x00000032; +} // namespace VehicleID + +namespace SessionID { +static constexpr AttributeId Id = 0x00000040; +} // namespace SessionID + +namespace SessionDuration { +static constexpr AttributeId Id = 0x00000041; +} // namespace SessionDuration + +namespace SessionEnergyCharged { +static constexpr AttributeId Id = 0x00000042; +} // namespace SessionEnergyCharged + +namespace SessionEnergyDischarged { +static constexpr AttributeId Id = 0x00000043; +} // namespace SessionEnergyDischarged + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace EnergyEvse + namespace DoorLock { namespace Attributes { @@ -5754,6 +6320,22 @@ namespace SeekRangeStart { static constexpr AttributeId Id = 0x00000006; } // namespace SeekRangeStart +namespace ActiveAudioTrack { +static constexpr AttributeId Id = 0x00000007; +} // namespace ActiveAudioTrack + +namespace AvailableAudioTracks { +static constexpr AttributeId Id = 0x00000008; +} // namespace AvailableAudioTracks + +namespace ActiveTextTrack { +static constexpr AttributeId Id = 0x00000009; +} // namespace ActiveTextTrack + +namespace AvailableTextTracks { +static constexpr AttributeId Id = 0x0000000A; +} // namespace AvailableTextTracks + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -6085,6 +6667,98 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace AccountLogin +namespace ContentControl { +namespace Attributes { + +namespace Enabled { +static constexpr AttributeId Id = 0x00000000; +} // namespace Enabled + +namespace OnDemandRatings { +static constexpr AttributeId Id = 0x00000001; +} // namespace OnDemandRatings + +namespace OnDemandRatingThreshold { +static constexpr AttributeId Id = 0x00000002; +} // namespace OnDemandRatingThreshold + +namespace ScheduledContentRatings { +static constexpr AttributeId Id = 0x00000003; +} // namespace ScheduledContentRatings + +namespace ScheduledContentRatingThreshold { +static constexpr AttributeId Id = 0x00000004; +} // namespace ScheduledContentRatingThreshold + +namespace ScreenDailyTime { +static constexpr AttributeId Id = 0x00000005; +} // namespace ScreenDailyTime + +namespace RemainingScreenTime { +static constexpr AttributeId Id = 0x00000006; +} // namespace RemainingScreenTime + +namespace BlockUnrated { +static constexpr AttributeId Id = 0x00000007; +} // namespace BlockUnrated + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ContentControl + +namespace ContentAppObserver { +namespace Attributes { + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ContentAppObserver + namespace ElectricalMeasurement { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 5986262b36123a..3bcd1734de0353 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -148,9 +148,18 @@ static constexpr ClusterId Id = 0x00000045; namespace IcdManagement { static constexpr ClusterId Id = 0x00000046; } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { +static constexpr ClusterId Id = 0x00000047; +} // namespace Timer +namespace OvenCavityOperationalState { static constexpr ClusterId Id = 0x00000048; -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState +namespace OvenMode { +static constexpr ClusterId Id = 0x00000049; +} // namespace OvenMode +namespace LaundryDryerControls { +static constexpr ClusterId Id = 0x0000004A; +} // namespace LaundryDryerControls namespace ModeSelect { static constexpr ClusterId Id = 0x00000050; } // namespace ModeSelect @@ -205,6 +214,24 @@ static constexpr ClusterId Id = 0x00000071; namespace ActivatedCarbonFilterMonitoring { static constexpr ClusterId Id = 0x00000072; } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanStateConfiguration { +static constexpr ClusterId Id = 0x00000080; +} // namespace BooleanStateConfiguration +namespace ValveConfigurationAndControl { +static constexpr ClusterId Id = 0x00000081; +} // namespace ValveConfigurationAndControl +namespace ElectricalEnergyMeasurement { +static constexpr ClusterId Id = 0x00000091; +} // namespace ElectricalEnergyMeasurement +namespace DemandResponseLoadControl { +static constexpr ClusterId Id = 0x00000096; +} // namespace DemandResponseLoadControl +namespace DeviceEnergyManagement { +static constexpr ClusterId Id = 0x00000098; +} // namespace DeviceEnergyManagement +namespace EnergyEvse { +static constexpr ClusterId Id = 0x00000099; +} // namespace EnergyEvse namespace DoorLock { static constexpr ClusterId Id = 0x00000101; } // namespace DoorLock @@ -316,6 +343,12 @@ static constexpr ClusterId Id = 0x0000050D; namespace AccountLogin { static constexpr ClusterId Id = 0x0000050E; } // namespace AccountLogin +namespace ContentControl { +static constexpr ClusterId Id = 0x0000050F; +} // namespace ContentControl +namespace ContentAppObserver { +static constexpr ClusterId Id = 0x00000510; +} // namespace ContentAppObserver namespace ElectricalMeasurement { static constexpr ClusterId Id = 0x00000B04; } // namespace ElectricalMeasurement 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 fa397b10a818bc..d903540c90f79f 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 @@ -644,10 +644,36 @@ namespace StayActiveRequest { static constexpr CommandId Id = 0x00000003; } // namespace StayActiveRequest +namespace StayActiveResponse { +static constexpr CommandId Id = 0x00000004; +} // namespace StayActiveResponse + } // namespace Commands } // namespace IcdManagement -namespace OvenOperationalState { +namespace Timer { +namespace Commands { + +namespace SetTimer { +static constexpr CommandId Id = 0x00000000; +} // namespace SetTimer + +namespace ResetTimer { +static constexpr CommandId Id = 0x00000001; +} // namespace ResetTimer + +namespace AddTime { +static constexpr CommandId Id = 0x00000002; +} // namespace AddTime + +namespace ReduceTime { +static constexpr CommandId Id = 0x00000003; +} // namespace ReduceTime + +} // namespace Commands +} // namespace Timer + +namespace OvenCavityOperationalState { namespace Commands { namespace Pause { @@ -671,7 +697,21 @@ static constexpr CommandId Id = 0x00000004; } // namespace OperationalCommandResponse } // namespace Commands -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState + +namespace OvenMode { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace OvenMode namespace ModeSelect { namespace Commands { @@ -873,6 +913,132 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanStateConfiguration { +namespace Commands { + +namespace SuppressAlarm { +static constexpr CommandId Id = 0x00000000; +} // namespace SuppressAlarm + +namespace EnableDisableAlarm { +static constexpr CommandId Id = 0x00000001; +} // namespace EnableDisableAlarm + +} // namespace Commands +} // namespace BooleanStateConfiguration + +namespace ValveConfigurationAndControl { +namespace Commands { + +namespace Open { +static constexpr CommandId Id = 0x00000000; +} // namespace Open + +namespace Close { +static constexpr CommandId Id = 0x00000001; +} // namespace Close + +} // namespace Commands +} // namespace ValveConfigurationAndControl + +namespace DemandResponseLoadControl { +namespace Commands { + +namespace RegisterLoadControlProgramRequest { +static constexpr CommandId Id = 0x00000000; +} // namespace RegisterLoadControlProgramRequest + +namespace UnregisterLoadControlProgramRequest { +static constexpr CommandId Id = 0x00000001; +} // namespace UnregisterLoadControlProgramRequest + +namespace AddLoadControlEventRequest { +static constexpr CommandId Id = 0x00000002; +} // namespace AddLoadControlEventRequest + +namespace RemoveLoadControlEventRequest { +static constexpr CommandId Id = 0x00000003; +} // namespace RemoveLoadControlEventRequest + +namespace ClearLoadControlEventsRequest { +static constexpr CommandId Id = 0x00000004; +} // namespace ClearLoadControlEventsRequest + +} // namespace Commands +} // namespace DemandResponseLoadControl + +namespace DeviceEnergyManagement { +namespace Commands { + +namespace PowerAdjustRequest { +static constexpr CommandId Id = 0x00000000; +} // namespace PowerAdjustRequest + +namespace CancelPowerAdjustRequest { +static constexpr CommandId Id = 0x00000001; +} // namespace CancelPowerAdjustRequest + +namespace StartTimeAdjustRequest { +static constexpr CommandId Id = 0x00000002; +} // namespace StartTimeAdjustRequest + +namespace PauseRequest { +static constexpr CommandId Id = 0x00000003; +} // namespace PauseRequest + +namespace ResumeRequest { +static constexpr CommandId Id = 0x00000004; +} // namespace ResumeRequest + +namespace ModifyForecastRequest { +static constexpr CommandId Id = 0x00000005; +} // namespace ModifyForecastRequest + +namespace RequestConstraintBasedForecast { +static constexpr CommandId Id = 0x00000006; +} // namespace RequestConstraintBasedForecast + +} // namespace Commands +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { +namespace Commands { + +namespace GetTargetsResponse { +static constexpr CommandId Id = 0x00000000; +} // namespace GetTargetsResponse + +namespace Disable { +static constexpr CommandId Id = 0x00000001; +} // namespace Disable + +namespace EnableCharging { +static constexpr CommandId Id = 0x00000002; +} // namespace EnableCharging + +namespace EnableDischarging { +static constexpr CommandId Id = 0x00000003; +} // namespace EnableDischarging + +namespace StartDiagnostics { +static constexpr CommandId Id = 0x00000004; +} // namespace StartDiagnostics + +namespace SetTargets { +static constexpr CommandId Id = 0x00000005; +} // namespace SetTargets + +namespace GetTargets { +static constexpr CommandId Id = 0x00000006; +} // namespace GetTargets + +namespace ClearTargets { +static constexpr CommandId Id = 0x00000007; +} // namespace ClearTargets + +} // namespace Commands +} // namespace EnergyEvse + namespace DoorLock { namespace Commands { @@ -1164,6 +1330,22 @@ namespace SkipChannel { static constexpr CommandId Id = 0x00000003; } // namespace SkipChannel +namespace GetProgramGuide { +static constexpr CommandId Id = 0x00000004; +} // namespace GetProgramGuide + +namespace ProgramGuideResponse { +static constexpr CommandId Id = 0x00000005; +} // namespace ProgramGuideResponse + +namespace RecordProgram { +static constexpr CommandId Id = 0x00000006; +} // namespace RecordProgram + +namespace CancelRecordProgram { +static constexpr CommandId Id = 0x00000007; +} // namespace CancelRecordProgram + } // namespace Commands } // namespace Channel @@ -1232,6 +1414,18 @@ namespace Seek { static constexpr CommandId Id = 0x0000000B; } // namespace Seek +namespace ActivateAudioTrack { +static constexpr CommandId Id = 0x0000000C; +} // namespace ActivateAudioTrack + +namespace ActivateTextTrack { +static constexpr CommandId Id = 0x0000000D; +} // namespace ActivateTextTrack + +namespace DeactivateTextTrack { +static constexpr CommandId Id = 0x0000000E; +} // namespace DeactivateTextTrack + } // namespace Commands } // namespace MediaPlayback @@ -1357,6 +1551,70 @@ static constexpr CommandId Id = 0x00000003; } // namespace Commands } // namespace AccountLogin +namespace ContentControl { +namespace Commands { + +namespace UpdatePIN { +static constexpr CommandId Id = 0x00000000; +} // namespace UpdatePIN + +namespace ResetPIN { +static constexpr CommandId Id = 0x00000001; +} // namespace ResetPIN + +namespace ResetPINResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace ResetPINResponse + +namespace Enable { +static constexpr CommandId Id = 0x00000003; +} // namespace Enable + +namespace Disable { +static constexpr CommandId Id = 0x00000004; +} // namespace Disable + +namespace AddBonusTime { +static constexpr CommandId Id = 0x00000005; +} // namespace AddBonusTime + +namespace SetScreenDailyTime { +static constexpr CommandId Id = 0x00000006; +} // namespace SetScreenDailyTime + +namespace BlockUnratedContent { +static constexpr CommandId Id = 0x00000007; +} // namespace BlockUnratedContent + +namespace UnblockUnratedContent { +static constexpr CommandId Id = 0x00000008; +} // namespace UnblockUnratedContent + +namespace SetOnDemandRatingThreshold { +static constexpr CommandId Id = 0x00000009; +} // namespace SetOnDemandRatingThreshold + +namespace SetScheduledContentRatingThreshold { +static constexpr CommandId Id = 0x0000000A; +} // namespace SetScheduledContentRatingThreshold + +} // namespace Commands +} // namespace ContentControl + +namespace ContentAppObserver { +namespace Commands { + +namespace ContentAppMessage { +static constexpr CommandId Id = 0x00000000; +} // namespace ContentAppMessage + +namespace ContentAppMessageResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace ContentAppMessageResponse + +} // namespace Commands +} // namespace ContentAppObserver + namespace ElectricalMeasurement { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 3fe625fccaf60f..0ea221e713cc6c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -267,7 +267,7 @@ static constexpr EventId Id = 0x00000000; } // namespace Events } // namespace BooleanState -namespace OvenOperationalState { +namespace OvenCavityOperationalState { namespace Events { namespace OperationalError { @@ -279,7 +279,7 @@ static constexpr EventId Id = 0x00000001; } // namespace OperationCompletion } // namespace Events -} // namespace OvenOperationalState +} // namespace OvenCavityOperationalState namespace RefrigeratorAlarm { namespace Events { @@ -379,6 +379,110 @@ static constexpr EventId Id = 0x00000001; } // namespace Events } // namespace RvcOperationalState +namespace BooleanStateConfiguration { +namespace Events { + +namespace AlarmsStateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace AlarmsStateChanged + +namespace SensorFault { +static constexpr EventId Id = 0x00000001; +} // namespace SensorFault + +} // namespace Events +} // namespace BooleanStateConfiguration + +namespace ValveConfigurationAndControl { +namespace Events { + +namespace ValveStateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace ValveStateChanged + +namespace ValveFault { +static constexpr EventId Id = 0x00000001; +} // namespace ValveFault + +} // namespace Events +} // namespace ValveConfigurationAndControl + +namespace ElectricalEnergyMeasurement { +namespace Events { + +namespace CumulativeEnergyMeasured { +static constexpr EventId Id = 0x00000000; +} // namespace CumulativeEnergyMeasured + +namespace PeriodicEnergyMeasured { +static constexpr EventId Id = 0x00000001; +} // namespace PeriodicEnergyMeasured + +} // namespace Events +} // namespace ElectricalEnergyMeasurement + +namespace DemandResponseLoadControl { +namespace Events { + +namespace LoadControlEventStatusChange { +static constexpr EventId Id = 0x00000000; +} // namespace LoadControlEventStatusChange + +} // namespace Events +} // namespace DemandResponseLoadControl + +namespace DeviceEnergyManagement { +namespace Events { + +namespace PowerAdjustStart { +static constexpr EventId Id = 0x00000000; +} // namespace PowerAdjustStart + +namespace PowerAdjustEnd { +static constexpr EventId Id = 0x00000001; +} // namespace PowerAdjustEnd + +namespace Paused { +static constexpr EventId Id = 0x00000002; +} // namespace Paused + +namespace Resumed { +static constexpr EventId Id = 0x00000003; +} // namespace Resumed + +} // namespace Events +} // namespace DeviceEnergyManagement + +namespace EnergyEvse { +namespace Events { + +namespace EVConnected { +static constexpr EventId Id = 0x00000000; +} // namespace EVConnected + +namespace EVNotDetected { +static constexpr EventId Id = 0x00000001; +} // namespace EVNotDetected + +namespace EnergyTransferStarted { +static constexpr EventId Id = 0x00000002; +} // namespace EnergyTransferStarted + +namespace EnergyTransferStopped { +static constexpr EventId Id = 0x00000003; +} // namespace EnergyTransferStopped + +namespace Fault { +static constexpr EventId Id = 0x00000004; +} // namespace Fault + +namespace Rfid { +static constexpr EventId Id = 0x00000005; +} // namespace Rfid + +} // namespace Events +} // namespace EnergyEvse + namespace DoorLock { namespace Events { @@ -479,6 +583,46 @@ static constexpr EventId Id = 0x00000010; } // namespace Events } // namespace PumpConfigurationAndControl +namespace TargetNavigator { +namespace Events { + +namespace TargetUpdated { +static constexpr EventId Id = 0x00000000; +} // namespace TargetUpdated + +} // namespace Events +} // namespace TargetNavigator + +namespace MediaPlayback { +namespace Events { + +namespace StateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace StateChanged + +} // namespace Events +} // namespace MediaPlayback + +namespace AccountLogin { +namespace Events { + +namespace LoggedOut { +static constexpr EventId Id = 0x00000000; +} // namespace LoggedOut + +} // namespace Events +} // namespace AccountLogin + +namespace ContentControl { +namespace Events { + +namespace RemainingScreenTimeExpired { +static constexpr EventId Id = 0x00000000; +} // namespace RemainingScreenTimeExpired + +} // namespace Events +} // namespace ContentControl + namespace UnitTesting { namespace Events { @@ -493,6 +637,16 @@ static constexpr EventId Id = 0x00000002; } // namespace Events } // namespace UnitTesting +namespace SampleMei { +namespace Events { + +namespace PingCountEvent { +static constexpr EventId Id = 0x00000000; +} // namespace PingCountEvent + +} // namespace Events +} // namespace SampleMei + } // namespace Clusters } // namespace app } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 86fa061b9289ab..a2f0dd80afba47 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -286,13 +286,32 @@ #define CHIP_PRINTCLUSTER_ICD_MANAGEMENT_CLUSTER #endif +#if defined(ZCL_USING_TIMER_CLUSTER_SERVER) || defined(ZCL_USING_TIMER_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_TIMER_CLUSTER { chip::app::Clusters::Timer::Id, "Timer" }, +#else +#define CHIP_PRINTCLUSTER_TIMER_CLUSTER +#endif + #if defined(ZCL_USING_OPERATIONAL_STATE_OVEN_CLUSTER_SERVER) || defined(ZCL_USING_OPERATIONAL_STATE_OVEN_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_OPERATIONAL_STATE_OVEN_CLUSTER \ - { chip::app::Clusters::OvenOperationalState::Id, "Oven Operational State" }, + { chip::app::Clusters::OvenCavityOperationalState::Id, "Oven Cavity Operational State" }, #else #define CHIP_PRINTCLUSTER_OPERATIONAL_STATE_OVEN_CLUSTER #endif +#if defined(ZCL_USING_OVEN_MODE_CLUSTER_SERVER) || defined(ZCL_USING_OVEN_MODE_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER { chip::app::Clusters::OvenMode::Id, "Oven Mode" }, +#else +#define CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER +#endif + +#if defined(ZCL_USING_LAUNDRY_DRYER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_LAUNDRY_DRYER_CONTROLS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_LAUNDRY_DRYER_CONTROLS_CLUSTER \ + { chip::app::Clusters::LaundryDryerControls::Id, "Laundry Dryer Controls" }, +#else +#define CHIP_PRINTCLUSTER_LAUNDRY_DRYER_CONTROLS_CLUSTER +#endif + #if defined(ZCL_USING_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_MODE_SELECT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { chip::app::Clusters::ModeSelect::Id, "Mode Select" }, #else @@ -409,6 +428,49 @@ #define CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER #endif +#if defined(ZCL_USING_BOOLEAN_STATE_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_STATE_CONFIGURATION_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER \ + { chip::app::Clusters::BooleanStateConfiguration::Id, "Boolean State Configuration" }, +#else +#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER +#endif + +#if defined(ZCL_USING_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER) || \ + defined(ZCL_USING_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER \ + { chip::app::Clusters::ValveConfigurationAndControl::Id, "Valve Configuration and Control" }, +#else +#define CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER +#endif + +#if defined(ZCL_USING_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_SERVER) || \ + defined(ZCL_USING_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER \ + { chip::app::Clusters::ElectricalEnergyMeasurement::Id, "Electrical Energy Measurement" }, +#else +#define CHIP_PRINTCLUSTER_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER +#endif + +#if defined(ZCL_USING_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER \ + { chip::app::Clusters::DemandResponseLoadControl::Id, "Demand Response Load Control" }, +#else +#define CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER +#endif + +#if defined(ZCL_USING_DEVICE_ENERGY_MANAGEMENT_CLUSTER_SERVER) || defined(ZCL_USING_DEVICE_ENERGY_MANAGEMENT_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_DEVICE_ENERGY_MANAGEMENT_CLUSTER \ + { chip::app::Clusters::DeviceEnergyManagement::Id, "Device Energy Management" }, +#else +#define CHIP_PRINTCLUSTER_DEVICE_ENERGY_MANAGEMENT_CLUSTER +#endif + +#if defined(ZCL_USING_ENERGY_EVSE_CLUSTER_SERVER) || defined(ZCL_USING_ENERGY_EVSE_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_ENERGY_EVSE_CLUSTER { chip::app::Clusters::EnergyEvse::Id, "Energy EVSE" }, +#else +#define CHIP_PRINTCLUSTER_ENERGY_EVSE_CLUSTER +#endif + #if defined(ZCL_USING_DOOR_LOCK_CLUSTER_SERVER) || defined(ZCL_USING_DOOR_LOCK_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER { chip::app::Clusters::DoorLock::Id, "Door Lock" }, #else @@ -660,6 +722,18 @@ #define CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER #endif +#if defined(ZCL_USING_CONTENT_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_CONTENT_CONTROL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_CONTENT_CONTROL_CLUSTER { chip::app::Clusters::ContentControl::Id, "Content Control" }, +#else +#define CHIP_PRINTCLUSTER_CONTENT_CONTROL_CLUSTER +#endif + +#if defined(ZCL_USING_CONTENT_APP_OBSERVER_CLUSTER_SERVER) || defined(ZCL_USING_CONTENT_APP_OBSERVER_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_CONTENT_APP_OBSERVER_CLUSTER { chip::app::Clusters::ContentAppObserver::Id, "Content App Observer" }, +#else +#define CHIP_PRINTCLUSTER_CONTENT_APP_OBSERVER_CLUSTER +#endif + #if defined(ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ { chip::app::Clusters::ElectricalMeasurement::Id, "Electrical Measurement" }, @@ -727,7 +801,10 @@ CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER \ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ CHIP_PRINTCLUSTER_ICD_MANAGEMENT_CLUSTER \ + CHIP_PRINTCLUSTER_TIMER_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_OVEN_CLUSTER \ + CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER \ + CHIP_PRINTCLUSTER_LAUNDRY_DRYER_CONTROLS_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_CLUSTER \ CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER \ @@ -746,6 +823,12 @@ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER \ CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER \ + CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER \ + CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER \ + CHIP_PRINTCLUSTER_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER \ + CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER \ + CHIP_PRINTCLUSTER_DEVICE_ENERGY_MANAGEMENT_CLUSTER \ + CHIP_PRINTCLUSTER_ENERGY_EVSE_CLUSTER \ CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER \ CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER \ CHIP_PRINTCLUSTER_BARRIER_CONTROL_CLUSTER \ @@ -783,6 +866,8 @@ CHIP_PRINTCLUSTER_APPLICATION_LAUNCHER_CLUSTER \ CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER \ CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER \ + CHIP_PRINTCLUSTER_CONTENT_CONTROL_CLUSTER \ + CHIP_PRINTCLUSTER_CONTENT_APP_OBSERVER_CLUSTER \ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER \ CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 98282eab5e55bb..e45f9a82f0de23 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -75,7 +75,10 @@ | ProxyValid | 0x0044 | | BooleanState | 0x0045 | | IcdManagement | 0x0046 | -| OvenOperationalState | 0x0048 | +| Timer | 0x0047 | +| OvenCavityOperationalState | 0x0048 | +| OvenMode | 0x0049 | +| LaundryDryerControls | 0x004A | | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | @@ -94,6 +97,12 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | +| BooleanStateConfiguration | 0x0080 | +| ValveConfigurationAndControl | 0x0081 | +| ElectricalEnergyMeasurement | 0x0091 | +| DemandResponseLoadControl | 0x0096 | +| DeviceEnergyManagement | 0x0098 | +| EnergyEvse | 0x0099 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | | BarrierControl | 0x0103 | @@ -131,6 +140,8 @@ | ApplicationLauncher | 0x050C | | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | +| ContentControl | 0x050F | +| ContentAppObserver | 0x0510 | | ElectricalMeasurement | 0x0B04 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| @@ -504,7 +515,7 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand | * NameSupport | 0x0004 | | * LastConfiguredBy | 0x0005 | | * SceneTableSize | 0x0006 | -| * RemainingCapacity | 0x0007 | +| * FabricSceneInfo | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -2202,6 +2213,8 @@ class ActionsDisableActionWithDuration : public ClusterCommand | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | | * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4710,7 +4723,177 @@ class IcdManagementStayActiveRequest : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster OvenOperationalState | 0x0048 | +| Cluster Timer | 0x0047 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SetTimer + */ +class TimerSetTimer : public ClusterCommand +{ +public: + TimerSetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-timer", credsIssuerConfig) + { + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::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::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::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::Timer::Commands::SetTimer::Type mRequest; +}; + +/* + * Command ResetTimer + */ +class TimerResetTimer : public ClusterCommand +{ +public: + TimerResetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-timer", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::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::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::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::Timer::Commands::ResetTimer::Type mRequest; +}; + +/* + * Command AddTime + */ +class TimerAddTime : public ClusterCommand +{ +public: + TimerAddTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-time", credsIssuerConfig) + { + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::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::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::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::Timer::Commands::AddTime::Type mRequest; +}; + +/* + * Command ReduceTime + */ +class TimerReduceTime : public ClusterCommand +{ +public: + TimerReduceTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reduce-time", credsIssuerConfig) + { + AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::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::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::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::Timer::Commands::ReduceTime::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster OvenCavityOperationalState | 0x0048 | |------------------------------------------------------------------------------| | Commands: | | | * Pause | 0x00 | @@ -4740,18 +4923,18 @@ class IcdManagementStayActiveRequest : public ClusterCommand /* * Command Pause */ -class OvenOperationalStatePause : public ClusterCommand +class OvenCavityOperationalStatePause : public ClusterCommand { public: - OvenOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + OvenCavityOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4760,8 +4943,8 @@ class OvenOperationalStatePause : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4770,24 +4953,24 @@ class OvenOperationalStatePause : public ClusterCommand } private: - chip::app::Clusters::OvenOperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type mRequest; }; /* * Command Stop */ -class OvenOperationalStateStop : public ClusterCommand +class OvenCavityOperationalStateStop : public ClusterCommand { public: - OvenOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + OvenCavityOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4796,8 +4979,8 @@ class OvenOperationalStateStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4806,24 +4989,24 @@ class OvenOperationalStateStop : public ClusterCommand } private: - chip::app::Clusters::OvenOperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type mRequest; }; /* * Command Start */ -class OvenOperationalStateStart : public ClusterCommand +class OvenCavityOperationalStateStart : public ClusterCommand { public: - OvenOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + OvenCavityOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4832,8 +5015,8 @@ class OvenOperationalStateStart : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4842,24 +5025,82 @@ class OvenOperationalStateStart : public ClusterCommand } private: - chip::app::Clusters::OvenOperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type mRequest; }; /* * Command Resume */ -class OvenOperationalStateResume : public ClusterCommand +class OvenCavityOperationalStateResume : public ClusterCommand +{ +public: + OvenCavityOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::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::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::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::OvenCavityOperationalState::Commands::Resume::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster OvenMode | 0x0049 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ChangeToMode + */ +class OvenModeChangeToMode : public ClusterCommand { public: - OvenOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4868,8 +5109,8 @@ class OvenOperationalStateResume : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4878,9 +5119,27 @@ class OvenOperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::OvenOperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster LaundryDryerControls | 0x004A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedDrynessLevels | 0x0000 | +| * SelectedDrynessLevel | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /*----------------------------------------------------------------------------*\ | Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| @@ -6112,66 +6371,21 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | +| Cluster BooleanStateConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -| * UnboltDoor | 0x27 | +| * SuppressAlarm | 0x00 | +| * EnableDisableAlarm | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | +| * CurrentSensitivityLevel | 0x0000 | +| * SupportedSensitivityLevels | 0x0001 | +| * DefaultSensitivityLevel | 0x0002 | +| * AlarmsActive | 0x0003 | +| * AlarmsSuppressed | 0x0004 | +| * AlarmsEnabled | 0x0005 | +| * AlarmsSupported | 0x0006 | +| * SensorFault | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6180,29 +6394,27 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | +| * AlarmsStateChanged | 0x0000 | +| * SensorFault | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command LockDoor + * Command SuppressAlarm */ -class DoorLockLockDoor : public ClusterCommand +class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { public: - DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) + BooleanStateConfigurationSuppressAlarm(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("suppress-alarm", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6211,8 +6423,8 @@ class DoorLockLockDoor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6221,25 +6433,26 @@ class DoorLockLockDoor : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; }; /* - * Command UnlockDoor + * Command EnableDisableAlarm */ -class DoorLockUnlockDoor : public ClusterCommand +class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { public: - DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) + BooleanStateConfigurationEnableDisableAlarm(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enable-disable-alarm", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6248,8 +6461,8 @@ class DoorLockUnlockDoor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6258,27 +6471,56 @@ class DoorLockUnlockDoor : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ValveConfigurationAndControl | 0x0081 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Open | 0x00 | +| * Close | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OpenDuration | 0x0000 | +| * DefaultOpenDuration | 0x0001 | +| * AutoCloseTime | 0x0002 | +| * RemainingDuration | 0x0003 | +| * CurrentState | 0x0004 | +| * TargetState | 0x0005 | +| * CurrentLevel | 0x0006 | +| * TargetLevel | 0x0007 | +| * DefaultOpenLevel | 0x0008 | +| * ValveFault | 0x0009 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ValveStateChanged | 0x0000 | +| * ValveFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + /* - * Command UnlockWithTimeout + * Command Open */ -class DoorLockUnlockWithTimeout : public ClusterCommand +class ValveConfigurationAndControlOpen : public ClusterCommand { public: - DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("unlock-with-timeout", credsIssuerConfig) + ValveConfigurationAndControlOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("open", credsIssuerConfig) { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); + AddArgument("TargetLevel", 0, UINT8_MAX, &mRequest.targetLevel); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6287,8 +6529,8 @@ class DoorLockUnlockWithTimeout : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6297,32 +6539,24 @@ class DoorLockUnlockWithTimeout : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type mRequest; }; /* - * Command SetWeekDaySchedule + * Command Close */ -class DoorLockSetWeekDaySchedule : public ClusterCommand +class ValveConfigurationAndControlClose : public ClusterCommand { public: - DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-week-day-schedule", credsIssuerConfig) + ValveConfigurationAndControlClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("close", credsIssuerConfig) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6331,8 +6565,8 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6341,27 +6575,81 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; + chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalEnergyMeasurement | 0x0091 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Accuracy | 0x0000 | +| * CumulativeEnergyImported | 0x0001 | +| * CumulativeEnergyExported | 0x0002 | +| * PeriodicEnergyImported | 0x0003 | +| * PeriodicEnergyExported | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * CumulativeEnergyMeasured | 0x0000 | +| * PeriodicEnergyMeasured | 0x0001 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster DemandResponseLoadControl | 0x0096 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterLoadControlProgramRequest | 0x00 | +| * UnregisterLoadControlProgramRequest | 0x01 | +| * AddLoadControlEventRequest | 0x02 | +| * RemoveLoadControlEventRequest | 0x03 | +| * ClearLoadControlEventsRequest | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LoadControlPrograms | 0x0000 | +| * NumberOfLoadControlPrograms | 0x0001 | +| * Events | 0x0002 | +| * ActiveEvents | 0x0003 | +| * NumberOfEventsPerProgram | 0x0004 | +| * NumberOfTransitions | 0x0005 | +| * DefaultRandomStart | 0x0006 | +| * DefaultRandomDuration | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * LoadControlEventStatusChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Command GetWeekDaySchedule + * Command RegisterLoadControlProgramRequest */ -class DoorLockGetWeekDaySchedule : public ClusterCommand +class DemandResponseLoadControlRegisterLoadControlProgramRequest : public ClusterCommand { public: - DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-week-day-schedule", credsIssuerConfig) + DemandResponseLoadControlRegisterLoadControlProgramRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("register-load-control-program-request", credsIssuerConfig), + mComplex_LoadControlProgram(&mRequest.loadControlProgram) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LoadControlProgram", &mComplex_LoadControlProgram); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6370,8 +6658,9 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6380,27 +6669,29 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type mRequest; + TypedComplexArgument + mComplex_LoadControlProgram; }; /* - * Command ClearWeekDaySchedule + * Command UnregisterLoadControlProgramRequest */ -class DoorLockClearWeekDaySchedule : public ClusterCommand +class DemandResponseLoadControlUnregisterLoadControlProgramRequest : public ClusterCommand { public: - DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-week-day-schedule", credsIssuerConfig) + DemandResponseLoadControlUnregisterLoadControlProgramRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unregister-load-control-program-request", credsIssuerConfig) { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LoadControlProgramID", &mRequest.loadControlProgramID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6409,8 +6700,9 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6419,29 +6711,27 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type mRequest; }; /* - * Command SetYearDaySchedule + * Command AddLoadControlEventRequest */ -class DoorLockSetYearDaySchedule : public ClusterCommand +class DemandResponseLoadControlAddLoadControlEventRequest : public ClusterCommand { public: - DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-year-day-schedule", credsIssuerConfig) + DemandResponseLoadControlAddLoadControlEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-load-control-event-request", credsIssuerConfig), mComplex_Event(&mRequest.event) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("Event", &mComplex_Event); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6450,8 +6740,9 @@ class DoorLockSetYearDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6460,27 +6751,29 @@ class DoorLockSetYearDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type mRequest; + TypedComplexArgument mComplex_Event; }; /* - * Command GetYearDaySchedule + * Command RemoveLoadControlEventRequest */ -class DoorLockGetYearDaySchedule : public ClusterCommand +class DemandResponseLoadControlRemoveLoadControlEventRequest : public ClusterCommand { public: - DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-year-day-schedule", credsIssuerConfig) + DemandResponseLoadControlRemoveLoadControlEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-load-control-event-request", credsIssuerConfig) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("EventID", &mRequest.eventID); + AddArgument("CancelControl", 0, UINT16_MAX, &mRequest.cancelControl); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6489,8 +6782,9 @@ class DoorLockGetYearDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6499,27 +6793,26 @@ class DoorLockGetYearDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type mRequest; }; /* - * Command ClearYearDaySchedule + * Command ClearLoadControlEventsRequest */ -class DoorLockClearYearDaySchedule : public ClusterCommand +class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCommand { public: - DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-year-day-schedule", credsIssuerConfig) + DemandResponseLoadControlClearLoadControlEventsRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-load-control-events-request", credsIssuerConfig) { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6528,8 +6821,9 @@ class DoorLockClearYearDaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6538,29 +6832,61 @@ class DoorLockClearYearDaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; + chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster DeviceEnergyManagement | 0x0098 | +|------------------------------------------------------------------------------| +| Commands: | | +| * PowerAdjustRequest | 0x00 | +| * CancelPowerAdjustRequest | 0x01 | +| * StartTimeAdjustRequest | 0x02 | +| * PauseRequest | 0x03 | +| * ResumeRequest | 0x04 | +| * ModifyForecastRequest | 0x05 | +| * RequestConstraintBasedForecast | 0x06 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ESAType | 0x0000 | +| * ESACanGenerate | 0x0001 | +| * ESAState | 0x0002 | +| * AbsMinPower | 0x0003 | +| * AbsMaxPower | 0x0004 | +| * PowerAdjustmentCapability | 0x0005 | +| * Forecast | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * PowerAdjustStart | 0x0000 | +| * PowerAdjustEnd | 0x0001 | +| * Paused | 0x0002 | +| * Resumed | 0x0003 | +\*----------------------------------------------------------------------------*/ + /* - * Command SetHolidaySchedule + * Command PowerAdjustRequest */ -class DoorLockSetHolidaySchedule : public ClusterCommand +class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { public: - DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-holiday-schedule", credsIssuerConfig) + DeviceEnergyManagementPowerAdjustRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("power-adjust-request", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + AddArgument("Power", INT64_MIN, INT64_MAX, &mRequest.power); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6569,8 +6895,8 @@ class DoorLockSetHolidaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6579,26 +6905,25 @@ class DoorLockSetHolidaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type mRequest; }; /* - * Command GetHolidaySchedule + * Command CancelPowerAdjustRequest */ -class DoorLockGetHolidaySchedule : public ClusterCommand +class DeviceEnergyManagementCancelPowerAdjustRequest : public ClusterCommand { public: - DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-holiday-schedule", credsIssuerConfig) + DeviceEnergyManagementCancelPowerAdjustRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("cancel-power-adjust-request", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6607,8 +6932,8 @@ class DoorLockGetHolidaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6617,26 +6942,26 @@ class DoorLockGetHolidaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type mRequest; }; /* - * Command ClearHolidaySchedule + * Command StartTimeAdjustRequest */ -class DoorLockClearHolidaySchedule : public ClusterCommand +class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { public: - DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-holiday-schedule", credsIssuerConfig) + DeviceEnergyManagementStartTimeAdjustRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("start-time-adjust-request", credsIssuerConfig) { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6645,8 +6970,8 @@ class DoorLockClearHolidaySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6655,31 +6980,26 @@ class DoorLockClearHolidaySchedule : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type mRequest; }; /* - * Command SetUser + * Command PauseRequest */ -class DoorLockSetUser : public ClusterCommand +class DeviceEnergyManagementPauseRequest : public ClusterCommand { public: - DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) + DeviceEnergyManagementPauseRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("pause-request", credsIssuerConfig) { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6688,8 +7008,8 @@ class DoorLockSetUser : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6698,25 +7018,25 @@ class DoorLockSetUser : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type mRequest; }; /* - * Command GetUser + * Command ResumeRequest */ -class DoorLockGetUser : public ClusterCommand +class DeviceEnergyManagementResumeRequest : public ClusterCommand { public: - DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) + DeviceEnergyManagementResumeRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("resume-request", credsIssuerConfig) { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6725,8 +7045,8 @@ class DoorLockGetUser : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6735,25 +7055,27 @@ class DoorLockGetUser : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Type mRequest; }; /* - * Command ClearUser + * Command ModifyForecastRequest */ -class DoorLockClearUser : public ClusterCommand +class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { public: - DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) + DeviceEnergyManagementModifyForecastRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("modify-forecast-request", credsIssuerConfig), mComplex_SlotAdjustments(&mRequest.slotAdjustments) { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("ForecastId", 0, UINT32_MAX, &mRequest.forecastId); + AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6762,8 +7084,8 @@ class DoorLockClearUser : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6772,31 +7094,30 @@ class DoorLockClearUser : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_SlotAdjustments; }; /* - * Command SetCredential + * Command RequestConstraintBasedForecast */ -class DoorLockSetCredential : public ClusterCommand +class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterCommand { public: - DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + DeviceEnergyManagementRequestConstraintBasedForecast(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("request-constraint-based-forecast", credsIssuerConfig), mComplex_Constraints(&mRequest.constraints) { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("Constraints", &mComplex_Constraints); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6805,8 +7126,9 @@ class DoorLockSetCredential : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6815,27 +7137,81 @@ class DoorLockSetCredential : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Constraints; }; +/*----------------------------------------------------------------------------*\ +| Cluster EnergyEvse | 0x0099 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Disable | 0x01 | +| * EnableCharging | 0x02 | +| * EnableDischarging | 0x03 | +| * StartDiagnostics | 0x04 | +| * SetTargets | 0x05 | +| * GetTargets | 0x06 | +| * ClearTargets | 0x07 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * State | 0x0000 | +| * SupplyState | 0x0001 | +| * FaultState | 0x0002 | +| * ChargingEnabledUntil | 0x0003 | +| * DischargingEnabledUntil | 0x0004 | +| * CircuitCapacity | 0x0005 | +| * MinimumChargeCurrent | 0x0006 | +| * MaximumChargeCurrent | 0x0007 | +| * MaximumDischargeCurrent | 0x0008 | +| * UserMaximumChargeCurrent | 0x0009 | +| * RandomizationDelayWindow | 0x000A | +| * NumberOfWeeklyTargets | 0x0021 | +| * NumberOfDailyTargets | 0x0022 | +| * NextChargeStartTime | 0x0023 | +| * NextChargeTargetTime | 0x0024 | +| * NextChargeRequiredEnergy | 0x0025 | +| * NextChargeTargetSoC | 0x0026 | +| * ApproximateEVEfficiency | 0x0027 | +| * StateOfCharge | 0x0030 | +| * BatteryCapacity | 0x0031 | +| * VehicleID | 0x0032 | +| * SessionID | 0x0040 | +| * SessionDuration | 0x0041 | +| * SessionEnergyCharged | 0x0042 | +| * SessionEnergyDischarged | 0x0043 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * EVConnected | 0x0000 | +| * EVNotDetected | 0x0001 | +| * EnergyTransferStarted | 0x0002 | +| * EnergyTransferStopped | 0x0003 | +| * Fault | 0x0004 | +| * Rfid | 0x0005 | +\*----------------------------------------------------------------------------*/ + /* - * Command GetCredentialStatus + * Command Disable */ -class DoorLockGetCredentialStatus : public ClusterCommand +class EnergyEvseDisable : public ClusterCommand { public: - DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + EnergyEvseDisable(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable", credsIssuerConfig) { - AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::Disable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6844,8 +7220,8 @@ class DoorLockGetCredentialStatus : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::Disable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6854,27 +7230,27 @@ class DoorLockGetCredentialStatus : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; + chip::app::Clusters::EnergyEvse::Commands::Disable::Type mRequest; }; /* - * Command ClearCredential + * Command EnableCharging */ -class DoorLockClearCredential : public ClusterCommand +class EnergyEvseEnableCharging : public ClusterCommand { public: - DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) + EnergyEvseEnableCharging(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-charging", credsIssuerConfig) { - AddArgument("Credential", &mComplex_Credential); + AddArgument("ChargingEnabledUntil", 0, UINT32_MAX, &mRequest.chargingEnabledUntil); + AddArgument("MinimumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.minimumChargeCurrent); + AddArgument("MaximumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumChargeCurrent); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6883,8 +7259,8 @@ class DoorLockClearCredential : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6893,27 +7269,27 @@ class DoorLockClearCredential : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> - mComplex_Credential; + chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type mRequest; }; /* - * Command UnboltDoor + * Command EnableDischarging */ -class DoorLockUnboltDoor : public ClusterCommand +class EnergyEvseEnableDischarging : public ClusterCommand { public: - DoorLockUnboltDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unbolt-door", credsIssuerConfig) + EnergyEvseEnableDischarging(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enable-discharging", credsIssuerConfig) { - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("DischargingEnabledUntil", 0, UINT32_MAX, &mRequest.dischargingEnabledUntil); + AddArgument("MaximumDischargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumDischargeCurrent); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6922,8 +7298,8 @@ class DoorLockUnboltDoor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6932,69 +7308,25 @@ class DoorLockUnboltDoor : public ClusterCommand } private: - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; + chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command UpOrOpen + * Command StartDiagnostics */ -class WindowCoveringUpOrOpen : public ClusterCommand +class EnergyEvseStartDiagnostics : public ClusterCommand { public: - WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) + EnergyEvseStartDiagnostics(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("start-diagnostics", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7003,8 +7335,8 @@ class WindowCoveringUpOrOpen : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7013,24 +7345,27 @@ class WindowCoveringUpOrOpen : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; + chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Type mRequest; }; /* - * Command DownOrClose + * Command SetTargets */ -class WindowCoveringDownOrClose : public ClusterCommand +class EnergyEvseSetTargets : public ClusterCommand { public: - WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) + EnergyEvseSetTargets(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-targets", credsIssuerConfig), mComplex_ChargingTargets(&mRequest.chargingTargets) { + AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); + AddArgument("ChargingTargets", &mComplex_ChargingTargets); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::SetTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7039,8 +7374,8 @@ class WindowCoveringDownOrClose : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::SetTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7049,24 +7384,27 @@ class WindowCoveringDownOrClose : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; + chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest; + TypedComplexArgument> + mComplex_ChargingTargets; }; /* - * Command StopMotion + * Command GetTargets */ -class WindowCoveringStopMotion : public ClusterCommand +class EnergyEvseGetTargets : public ClusterCommand { public: - WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) + EnergyEvseGetTargets(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-targets", credsIssuerConfig) { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::GetTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7075,8 +7413,8 @@ class WindowCoveringStopMotion : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::GetTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7085,26 +7423,24 @@ class WindowCoveringStopMotion : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; + chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type mRequest; }; /* - * Command GoToLiftValue + * Command ClearTargets */ -class WindowCoveringGoToLiftValue : public ClusterCommand +class EnergyEvseClearTargets : public ClusterCommand { public: - WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-value", credsIssuerConfig) + EnergyEvseClearTargets(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-targets", credsIssuerConfig) { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7113,8 +7449,8 @@ class WindowCoveringGoToLiftValue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7123,26 +7459,101 @@ class WindowCoveringGoToLiftValue : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; + chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster DoorLock | 0x0101 | +|------------------------------------------------------------------------------| +| Commands: | | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +| * UnboltDoor | 0x27 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | +\*----------------------------------------------------------------------------*/ + /* - * Command GoToLiftPercentage + * Command LockDoor */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand +class DoorLockLockDoor : public ClusterCommand { public: - WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-percentage", credsIssuerConfig) + DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7151,8 +7562,8 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7161,26 +7572,25 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; /* - * Command GoToTiltValue + * Command UnlockDoor */ -class WindowCoveringGoToTiltValue : public ClusterCommand +class DoorLockUnlockDoor : public ClusterCommand { public: - WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-value", credsIssuerConfig) + DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7189,8 +7599,8 @@ class WindowCoveringGoToTiltValue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7199,27 +7609,28 @@ class WindowCoveringGoToTiltValue : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command GoToTiltPercentage + * Command UnlockWithTimeout */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) + DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unlock-with-timeout", credsIssuerConfig) { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; - + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::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); @@ -7227,8 +7638,8 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7237,54 +7648,32 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command BarrierControlGoToPercent + * Command SetWeekDaySchedule */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) + DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-week-day-schedule", credsIssuerConfig) { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7293,8 +7682,8 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7303,25 +7692,27 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand } private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; /* - * Command BarrierControlStop + * Command GetWeekDaySchedule */ -class BarrierControlBarrierControlStop : public ClusterCommand +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-stop", credsIssuerConfig) + DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-week-day-schedule", credsIssuerConfig) { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7330,8 +7721,8 @@ class BarrierControlBarrierControlStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7340,152 +7731,27 @@ class BarrierControlBarrierControlStop : public ClusterCommand } private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetpointRaiseLower + * Command ClearWeekDaySchedule */ -class ThermostatSetpointRaiseLower : public ClusterCommand +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("setpoint-raise-lower", credsIssuerConfig) + DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-week-day-schedule", credsIssuerConfig) { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7494,8 +7760,8 @@ class ThermostatSetpointRaiseLower : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7504,29 +7770,29 @@ class ThermostatSetpointRaiseLower : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; /* - * Command SetWeeklySchedule + * Command SetYearDaySchedule */ -class ThermostatSetWeeklySchedule : public ClusterCommand +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) + DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-year-day-schedule", credsIssuerConfig) { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7535,8 +7801,8 @@ class ThermostatSetWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7545,30 +7811,27 @@ class ThermostatSetWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; /* - * Command GetWeeklySchedule + * Command GetYearDaySchedule */ -class ThermostatGetWeeklySchedule : public ClusterCommand +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-weekly-schedule", credsIssuerConfig) + DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-year-day-schedule", credsIssuerConfig) { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7577,8 +7840,8 @@ class ThermostatGetWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7587,25 +7850,27 @@ class ThermostatGetWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Command ClearYearDaySchedule */ -class ThermostatClearWeeklySchedule : public ClusterCommand +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-weekly-schedule", credsIssuerConfig) + DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-year-day-schedule", credsIssuerConfig) { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7614,8 +7879,8 @@ class ThermostatClearWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7624,56 +7889,29 @@ class ThermostatClearWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Step | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * AirflowDirection | 0x000B | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Step + * Command SetHolidaySchedule */ -class FanControlStep : public ClusterCommand +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - FanControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) + DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-holiday-schedule", credsIssuerConfig) { - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Wrap", 0, 1, &mRequest.wrap); - AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7682,8 +7920,8 @@ class FanControlStep : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7692,135 +7930,26 @@ class FanControlStep : public ClusterCommand } private: - chip::app::Clusters::FanControl::Commands::Step::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command MoveToHue + * Command GetHolidaySchedule */ -class ColorControlMoveToHue : public ClusterCommand +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) + DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-holiday-schedule", credsIssuerConfig) { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7829,8 +7958,8 @@ class ColorControlMoveToHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7839,28 +7968,26 @@ class ColorControlMoveToHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Command MoveHue + * Command ClearHolidaySchedule */ -class ColorControlMoveHue : public ClusterCommand +class DoorLockClearHolidaySchedule : public ClusterCommand { public: - ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) + DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-holiday-schedule", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7869,8 +7996,8 @@ class ColorControlMoveHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7879,29 +8006,31 @@ class ColorControlMoveHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; /* - * Command StepHue + * Command SetUser */ -class ColorControlStepHue : public ClusterCommand +class DoorLockSetUser : public ClusterCommand { public: - ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) + DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7910,8 +8039,8 @@ class ColorControlStepHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7920,29 +8049,25 @@ class ColorControlStepHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command MoveToSaturation + * Command GetUser */ -class ColorControlMoveToSaturation : public ClusterCommand +class DoorLockGetUser : public ClusterCommand { public: - ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-saturation", credsIssuerConfig) + DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7951,8 +8076,8 @@ class ColorControlMoveToSaturation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -7961,28 +8086,25 @@ class ColorControlMoveToSaturation : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; /* - * Command MoveSaturation + * Command ClearUser */ -class ColorControlMoveSaturation : public ClusterCommand +class DoorLockClearUser : public ClusterCommand { public: - ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) + DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -7991,8 +8113,8 @@ class ColorControlMoveSaturation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8001,29 +8123,31 @@ class ColorControlMoveSaturation : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; /* - * Command StepSaturation + * Command SetCredential */ -class ColorControlStepSaturation : public ClusterCommand +class DoorLockSetCredential : public ClusterCommand { public: - ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) + DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8032,8 +8156,8 @@ class ColorControlStepSaturation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8042,30 +8166,27 @@ class ColorControlStepSaturation : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command MoveToHueAndSaturation + * Command GetCredentialStatus */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand +class DoorLockGetCredentialStatus : public ClusterCommand { public: - ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) + DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8074,8 +8195,8 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8084,29 +8205,27 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command MoveToColor + * Command ClearCredential */ -class ColorControlMoveToColor : public ClusterCommand +class DoorLockClearCredential : public ClusterCommand { public: - ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) + DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8115,8 +8234,8 @@ class ColorControlMoveToColor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8125,28 +8244,27 @@ class ColorControlMoveToColor : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> + mComplex_Credential; }; /* - * Command MoveColor + * Command UnboltDoor */ -class ColorControlMoveColor : public ClusterCommand +class DoorLockUnboltDoor : public ClusterCommand { public: - ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) + DoorLockUnboltDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unbolt-door", credsIssuerConfig) { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8155,8 +8273,8 @@ class ColorControlMoveColor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8165,29 +8283,69 @@ class ColorControlMoveColor : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command StepColor + * Command UpOrOpen */ -class ColorControlStepColor : public ClusterCommand +class WindowCoveringUpOrOpen : public ClusterCommand { public: - ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) + WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8196,8 +8354,8 @@ class ColorControlStepColor : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8206,29 +8364,24 @@ class ColorControlStepColor : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; }; /* - * Command MoveToColorTemperature + * Command DownOrClose */ -class ColorControlMoveToColorTemperature : public ClusterCommand +class WindowCoveringDownOrClose : public ClusterCommand { public: - ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-color-temperature", credsIssuerConfig) + WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8237,8 +8390,8 @@ class ColorControlMoveToColorTemperature : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8247,30 +8400,24 @@ class ColorControlMoveToColorTemperature : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; }; /* - * Command EnhancedMoveToHue + * Command StopMotion */ -class ColorControlEnhancedMoveToHue : public ClusterCommand +class WindowCoveringStopMotion : public ClusterCommand { public: - ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) + WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8279,8 +8426,8 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8289,29 +8436,26 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; }; /* - * Command EnhancedMoveHue + * Command GoToLiftValue */ -class ColorControlEnhancedMoveHue : public ClusterCommand +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-hue", credsIssuerConfig) + WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-value", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8320,8 +8464,8 @@ class ColorControlEnhancedMoveHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8330,30 +8474,26 @@ class ColorControlEnhancedMoveHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; /* - * Command EnhancedStepHue + * Command GoToLiftPercentage */ -class ColorControlEnhancedStepHue : public ClusterCommand +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-step-hue", credsIssuerConfig) + WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-percentage", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8362,8 +8502,8 @@ class ColorControlEnhancedStepHue : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8372,30 +8512,26 @@ class ColorControlEnhancedStepHue : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; /* - * Command EnhancedMoveToHueAndSaturation + * Command GoToTiltValue */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) + WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-value", credsIssuerConfig) { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8404,8 +8540,8 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8414,31 +8550,26 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; }; /* - * Command ColorLoopSet + * Command GoToTiltPercentage */ -class ColorControlColorLoopSet : public ClusterCommand +class WindowCoveringGoToTiltPercentage : public ClusterCommand { public: - ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) + WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8447,8 +8578,8 @@ class ColorControlColorLoopSet : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8457,69 +8588,54 @@ class ColorControlColorLoopSet : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -/* - * Command StopMoveStep - */ -class ColorControlStopMoveStep : public ClusterCommand -{ -public: - ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) - { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::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::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::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::ColorControl::Commands::StopMoveStep::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster BarrierControl | 0x0103 | +|------------------------------------------------------------------------------| +| Commands: | | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command MoveColorTemperature + * Command BarrierControlGoToPercent */ -class ColorControlMoveColorTemperature : public ClusterCommand +class BarrierControlBarrierControlGoToPercent : public ClusterCommand { public: - ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-color-temperature", credsIssuerConfig) + BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8528,8 +8644,8 @@ class ColorControlMoveColorTemperature : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8538,32 +8654,25 @@ class ColorControlMoveColorTemperature : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; /* - * Command StepColorTemperature + * Command BarrierControlStop */ -class ColorControlStepColorTemperature : public ClusterCommand +class BarrierControlBarrierControlStop : public ClusterCommand { public: - ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("step-color-temperature", credsIssuerConfig) + BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-stop", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8572,8 +8681,8 @@ class ColorControlStepColorTemperature : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8582,50 +8691,38 @@ class ColorControlStepColorTemperature : public ClusterCommand } private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | +| Cluster PumpConfigurationAndControl | 0x0200 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8634,18 +8731,84 @@ class ColorControlStepColorTemperature : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | +| Cluster Thermostat | 0x0201 | |------------------------------------------------------------------------------| | Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8656,170 +8819,184 @@ class ColorControlStepColorTemperature : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +/* + * Command SetpointRaiseLower + */ +class ThermostatSetpointRaiseLower : public ClusterCommand +{ +public: + ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("setpoint-raise-lower", credsIssuerConfig) + { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); + } -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; -/*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + 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); + } -/*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * PIROccupiedToUnoccupiedDelay | 0x0010 | -| * PIRUnoccupiedToOccupiedDelay | 0x0011 | -| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; -/*----------------------------------------------------------------------------*\ -| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); -/*----------------------------------------------------------------------------*\ -| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; +}; + +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand +{ +public: + ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) + { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; +}; + +/* + * Command GetWeeklySchedule + */ +class ThermostatGetWeeklySchedule : public ClusterCommand +{ +public: + ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-weekly-schedule", credsIssuerConfig) + { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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::Thermostat::Commands::GetWeeklySchedule::Type mRequest; +}; + +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand +{ +public: + ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-weekly-schedule", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; +}; /*----------------------------------------------------------------------------*\ -| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | +| Cluster FanControl | 0x0202 | |------------------------------------------------------------------------------| | Commands: | | +| * Step | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * AirflowDirection | 0x000B | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8830,23 +9007,54 @@ class ColorControlStepColorTemperature : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ +/* + * Command Step + */ +class FanControlStep : public ClusterCommand +{ +public: + FanControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) + { + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Wrap", 0, 1, &mRequest.wrap); + AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::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::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::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::FanControl::Commands::Step::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ -| Cluster OzoneConcentrationMeasurement | 0x0415 | +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8858,197 +9066,82 @@ class ColorControlStepColorTemperature : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster Pm25ConcentrationMeasurement | 0x042A | +| Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| | Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster FormaldehydeConcentrationMeasurement | 0x042B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Pm1ConcentrationMeasurement | 0x042C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Pm10ConcentrationMeasurement | 0x042D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster RadonConcentrationMeasurement | 0x042F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster WakeOnLan | 0x0503 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MACAddress | 0x0000 | -| * LinkLocalAddress | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Channel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x02 | -| * SkipChannel | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * Lineup | 0x0001 | -| * CurrentChannel | 0x0002 | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9060,21 +9153,25 @@ class ColorControlStepColorTemperature : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ChangeChannel + * Command MoveToHue */ -class ChannelChangeChannel : public ClusterCommand +class ColorControlMoveToHue : public ClusterCommand { public: - ChannelChangeChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-channel", credsIssuerConfig) + ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) { - AddArgument("Match", &mRequest.match); + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9083,8 +9180,8 @@ class ChannelChangeChannel : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9093,27 +9190,28 @@ class ChannelChangeChannel : public ClusterCommand } private: - chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; /* - * Command ChangeChannelByNumber + * Command MoveHue */ -class ChannelChangeChannelByNumber : public ClusterCommand +class ColorControlMoveHue : public ClusterCommand { public: - ChannelChangeChannelByNumber(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("change-channel-by-number", credsIssuerConfig) + ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9122,8 +9220,8 @@ class ChannelChangeChannelByNumber : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9132,25 +9230,29 @@ class ChannelChangeChannelByNumber : public ClusterCommand } private: - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; /* - * Command SkipChannel + * Command StepHue */ -class ChannelSkipChannel : public ClusterCommand +class ColorControlStepHue : public ClusterCommand { public: - ChannelSkipChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-channel", credsIssuerConfig) + ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) { - AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9159,8 +9261,8 @@ class ChannelSkipChannel : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9169,46 +9271,29 @@ class ChannelSkipChannel : public ClusterCommand } private: - chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster TargetNavigator | 0x0505 | -|------------------------------------------------------------------------------| -| Commands: | | -| * NavigateTarget | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TargetList | 0x0000 | -| * CurrentTarget | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command NavigateTarget + * Command MoveToSaturation */ -class TargetNavigatorNavigateTarget : public ClusterCommand +class ColorControlMoveToSaturation : public ClusterCommand { public: - TargetNavigatorNavigateTarget(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("navigate-target", credsIssuerConfig) + ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-saturation", credsIssuerConfig) { - AddArgument("Target", 0, UINT8_MAX, &mRequest.target); - AddArgument("Data", &mRequest.data); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9217,8 +9302,8 @@ class TargetNavigatorNavigateTarget : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9227,58 +9312,28 @@ class TargetNavigatorNavigateTarget : public ClusterCommand } private: - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster MediaPlayback | 0x0506 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Play | 0x00 | -| * Pause | 0x01 | -| * Stop | 0x02 | -| * StartOver | 0x03 | -| * Previous | 0x04 | -| * Next | 0x05 | -| * Rewind | 0x06 | -| * FastForward | 0x07 | -| * SkipForward | 0x08 | -| * SkipBackward | 0x09 | -| * Seek | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentState | 0x0000 | -| * StartTime | 0x0001 | -| * Duration | 0x0002 | -| * SampledPosition | 0x0003 | -| * PlaybackSpeed | 0x0004 | -| * SeekRangeEnd | 0x0005 | -| * SeekRangeStart | 0x0006 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Play + * Command MoveSaturation */ -class MediaPlaybackPlay : public ClusterCommand +class ColorControlMoveSaturation : public ClusterCommand { public: - MediaPlaybackPlay(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("play", credsIssuerConfig) + ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9287,8 +9342,8 @@ class MediaPlaybackPlay : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9297,24 +9352,29 @@ class MediaPlaybackPlay : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Play::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; /* - * Command Pause + * Command StepSaturation */ -class MediaPlaybackPause : public ClusterCommand +class ColorControlStepSaturation : public ClusterCommand { public: - MediaPlaybackPause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9323,8 +9383,8 @@ class MediaPlaybackPause : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9333,24 +9393,30 @@ class MediaPlaybackPause : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Pause::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Command Stop + * Command MoveToHueAndSaturation */ -class MediaPlaybackStop : public ClusterCommand +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - MediaPlaybackStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9359,8 +9425,8 @@ class MediaPlaybackStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9369,24 +9435,29 @@ class MediaPlaybackStop : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Stop::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; /* - * Command StartOver + * Command MoveToColor */ -class MediaPlaybackStartOver : public ClusterCommand +class ColorControlMoveToColor : public ClusterCommand { public: - MediaPlaybackStartOver(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-over", credsIssuerConfig) + ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) { + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9395,8 +9466,8 @@ class MediaPlaybackStartOver : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9405,24 +9476,28 @@ class MediaPlaybackStartOver : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; /* - * Command Previous + * Command MoveColor */ -class MediaPlaybackPrevious : public ClusterCommand +class ColorControlMoveColor : public ClusterCommand { public: - MediaPlaybackPrevious(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("previous", credsIssuerConfig) + ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9431,8 +9506,8 @@ class MediaPlaybackPrevious : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9441,24 +9516,29 @@ class MediaPlaybackPrevious : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Previous::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Command Next + * Command StepColor */ -class MediaPlaybackNext : public ClusterCommand +class ColorControlStepColor : public ClusterCommand { public: - MediaPlaybackNext(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("next", credsIssuerConfig) + ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) { + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9467,8 +9547,8 @@ class MediaPlaybackNext : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9477,24 +9557,29 @@ class MediaPlaybackNext : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Next::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; /* - * Command Rewind + * Command MoveToColorTemperature */ -class MediaPlaybackRewind : public ClusterCommand +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - MediaPlaybackRewind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rewind", credsIssuerConfig) + ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-color-temperature", credsIssuerConfig) { + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9503,8 +9588,8 @@ class MediaPlaybackRewind : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9513,24 +9598,30 @@ class MediaPlaybackRewind : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Command FastForward + * Command EnhancedMoveToHue */ -class MediaPlaybackFastForward : public ClusterCommand +class ColorControlEnhancedMoveToHue : public ClusterCommand { public: - MediaPlaybackFastForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-forward", credsIssuerConfig) + ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9539,8 +9630,8 @@ class MediaPlaybackFastForward : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9549,25 +9640,29 @@ class MediaPlaybackFastForward : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; /* - * Command SkipForward + * Command EnhancedMoveHue */ -class MediaPlaybackSkipForward : public ClusterCommand +class ColorControlEnhancedMoveHue : public ClusterCommand { public: - MediaPlaybackSkipForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-forward", credsIssuerConfig) + ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-hue", credsIssuerConfig) { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9576,8 +9671,8 @@ class MediaPlaybackSkipForward : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9586,25 +9681,30 @@ class MediaPlaybackSkipForward : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; /* - * Command SkipBackward + * Command EnhancedStepHue */ -class MediaPlaybackSkipBackward : public ClusterCommand +class ColorControlEnhancedStepHue : public ClusterCommand { public: - MediaPlaybackSkipBackward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-backward", credsIssuerConfig) + ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-step-hue", credsIssuerConfig) { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9613,8 +9713,8 @@ class MediaPlaybackSkipBackward : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9623,25 +9723,30 @@ class MediaPlaybackSkipBackward : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; /* - * Command Seek + * Command EnhancedMoveToHueAndSaturation */ -class MediaPlaybackSeek : public ClusterCommand +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { public: - MediaPlaybackSeek(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("seek", credsIssuerConfig) + ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) { - AddArgument("Position", 0, UINT64_MAX, &mRequest.position); + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9650,8 +9755,8 @@ class MediaPlaybackSeek : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9660,47 +9765,31 @@ class MediaPlaybackSeek : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster MediaInput | 0x0507 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectInput | 0x00 | -| * ShowInputStatus | 0x01 | -| * HideInputStatus | 0x02 | -| * RenameInput | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * InputList | 0x0000 | -| * CurrentInput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SelectInput + * Command ColorLoopSet */ -class MediaInputSelectInput : public ClusterCommand +class ColorControlColorLoopSet : public ClusterCommand { public: - MediaInputSelectInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-input", credsIssuerConfig) + ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9709,8 +9798,8 @@ class MediaInputSelectInput : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9719,24 +9808,26 @@ class MediaInputSelectInput : public ClusterCommand } private: - chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; /* - * Command ShowInputStatus + * Command StopMoveStep */ -class MediaInputShowInputStatus : public ClusterCommand +class ColorControlStopMoveStep : public ClusterCommand { public: - MediaInputShowInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("show-input-status", credsIssuerConfig) + ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9745,8 +9836,8 @@ class MediaInputShowInputStatus : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9755,24 +9846,31 @@ class MediaInputShowInputStatus : public ClusterCommand } private: - chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; /* - * Command HideInputStatus + * Command MoveColorTemperature */ -class MediaInputHideInputStatus : public ClusterCommand +class ColorControlMoveColorTemperature : public ClusterCommand { public: - MediaInputHideInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("hide-input-status", credsIssuerConfig) + ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-color-temperature", credsIssuerConfig) { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9781,8 +9879,8 @@ class MediaInputHideInputStatus : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9791,26 +9889,32 @@ class MediaInputHideInputStatus : public ClusterCommand } private: - chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; /* - * Command RenameInput + * Command StepColorTemperature */ -class MediaInputRenameInput : public ClusterCommand +class ColorControlStepColorTemperature : public ClusterCommand { public: - MediaInputRenameInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-input", credsIssuerConfig) + ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("step-color-temperature", credsIssuerConfig) { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9819,8 +9923,8 @@ class MediaInputRenameInput : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9829,16 +9933,29 @@ class MediaInputRenameInput : public ClusterCommand } private: - chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LowPower | 0x0508 | +| Cluster BallastConfiguration | 0x0301 | |------------------------------------------------------------------------------| | Commands: | | -| * Sleep | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9849,49 +9966,37 @@ class MediaInputRenameInput : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command Sleep - */ -class LowPowerSleep : public ClusterCommand -{ -public: - LowPowerSleep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("sleep", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::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::LowPower::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::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::LowPower::Commands::Sleep::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster IlluminanceMeasurement | 0x0400 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster KeypadInput | 0x0509 | +| Cluster TemperatureMeasurement | 0x0402 | |------------------------------------------------------------------------------| | Commands: | | -| * SendKey | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9902,53 +10007,21 @@ class LowPowerSleep : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command SendKey - */ -class KeypadInputSendKey : public ClusterCommand -{ -public: - KeypadInputSendKey(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("send-key", credsIssuerConfig) - { - AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::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::KeypadInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::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::KeypadInput::Commands::SendKey::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster ContentLauncher | 0x050A | +| Cluster PressureMeasurement | 0x0403 | |------------------------------------------------------------------------------| | Commands: | | -| * LaunchContent | 0x00 | -| * LaunchURL | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * AcceptHeader | 0x0000 | -| * SupportedStreamingProtocols | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9959,99 +10032,16 @@ class KeypadInputSendKey : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command LaunchContent - */ -class ContentLauncherLaunchContent : public ClusterCommand -{ -public: - ContentLauncherLaunchContent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-content", credsIssuerConfig), mComplex_Search(&mRequest.search) - { - AddArgument("Search", &mComplex_Search); - AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::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::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::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::ContentLauncher::Commands::LaunchContent::Type mRequest; - TypedComplexArgument mComplex_Search; -}; - -/* - * Command LaunchURL - */ -class ContentLauncherLaunchURL : public ClusterCommand -{ -public: - ContentLauncherLaunchURL(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation) - { - AddArgument("ContentURL", &mRequest.contentURL); - AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::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::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::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::ContentLauncher::Commands::LaunchURL::Type mRequest; - TypedComplexArgument> - mComplex_BrandingInformation; -}; - /*----------------------------------------------------------------------------*\ -| Cluster AudioOutput | 0x050B | +| Cluster FlowMeasurement | 0x0404 | |------------------------------------------------------------------------------| | Commands: | | -| * SelectOutput | 0x00 | -| * RenameOutput | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * OutputList | 0x0000 | -| * CurrentOutput | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10062,92 +10052,16 @@ class ContentLauncherLaunchURL : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command SelectOutput - */ -class AudioOutputSelectOutput : public ClusterCommand -{ -public: - AudioOutputSelectOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-output", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::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::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::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::AudioOutput::Commands::SelectOutput::Type mRequest; -}; - -/* - * Command RenameOutput - */ -class AudioOutputRenameOutput : public ClusterCommand -{ -public: - AudioOutputRenameOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-output", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::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::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::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::AudioOutput::Commands::RenameOutput::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster ApplicationLauncher | 0x050C | +| Cluster RelativeHumidityMeasurement | 0x0405 | |------------------------------------------------------------------------------| | Commands: | | -| * LaunchApp | 0x00 | -| * StopApp | 0x01 | -| * HideApp | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * CatalogList | 0x0000 | -| * CurrentApp | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10158,141 +10072,51 @@ class AudioOutputRenameOutput : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command LaunchApp - */ -class ApplicationLauncherLaunchApp : public ClusterCommand -{ -public: - ApplicationLauncherLaunchApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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::ApplicationLauncher::Commands::LaunchApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; -}; - -/* - * Command StopApp - */ -class ApplicationLauncherStopApp : public ClusterCommand -{ -public: - ApplicationLauncherStopApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("stop-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::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::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::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::ApplicationLauncher::Commands::StopApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; -}; - -/* - * Command HideApp - */ -class ApplicationLauncherHideApp : public ClusterCommand -{ -public: - ApplicationLauncherHideApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("hide-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::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::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::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::ApplicationLauncher::Commands::HideApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; -}; +/*----------------------------------------------------------------------------*\ +| Cluster OccupancySensing | 0x0406 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * PIROccupiedToUnoccupiedDelay | 0x0010 | +| * PIRUnoccupiedToOccupiedDelay | 0x0011 | +| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster ApplicationBasic | 0x050D | +| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * VendorName | 0x0000 | -| * VendorID | 0x0001 | -| * ApplicationName | 0x0002 | -| * ProductID | 0x0003 | -| * Application | 0x0004 | -| * Status | 0x0005 | -| * ApplicationVersion | 0x0006 | -| * AllowedVendorList | 0x0007 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10304,14 +10128,22 @@ class ApplicationLauncherHideApp : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster AccountLogin | 0x050E | +| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | |------------------------------------------------------------------------------| | Commands: | | -| * GetSetupPIN | 0x00 | -| * Login | 0x02 | -| * Logout | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10322,60 +10154,281 @@ class ApplicationLauncherHideApp : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command GetSetupPIN - */ -class AccountLoginGetSetupPIN : public ClusterCommand -{ -public: - AccountLoginGetSetupPIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-setup-pin", credsIssuerConfig) - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - ClusterCommand::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; +/*----------------------------------------------------------------------------*\ +| Cluster OzoneConcentrationMeasurement | 0x0415 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - 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); - } +/*----------------------------------------------------------------------------*\ +| Cluster Pm25ConcentrationMeasurement | 0x042A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; +/*----------------------------------------------------------------------------*\ +| Cluster FormaldehydeConcentrationMeasurement | 0x042B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); +/*----------------------------------------------------------------------------*\ +| Cluster Pm1ConcentrationMeasurement | 0x042C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster Pm10ConcentrationMeasurement | 0x042D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster RadonConcentrationMeasurement | 0x042F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster WakeOnLan | 0x0503 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MACAddress | 0x0000 | +| * LinkLocalAddress | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster Channel | 0x0504 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x02 | +| * SkipChannel | 0x03 | +| * GetProgramGuide | 0x04 | +| * RecordProgram | 0x06 | +| * CancelRecordProgram | 0x07 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ChannelList | 0x0000 | +| * Lineup | 0x0001 | +| * CurrentChannel | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command Login + * Command ChangeChannel */ -class AccountLoginLogin : public ClusterCommand +class ChannelChangeChannel : public ClusterCommand { public: - AccountLoginLogin(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("login", credsIssuerConfig) + ChannelChangeChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-channel", credsIssuerConfig) { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - AddArgument("SetupPIN", &mRequest.setupPIN); + AddArgument("Match", &mRequest.match); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10384,8 +10437,8 @@ class AccountLoginLogin : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10394,24 +10447,27 @@ class AccountLoginLogin : public ClusterCommand } private: - chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; }; /* - * Command Logout + * Command ChangeChannelByNumber */ -class AccountLoginLogout : public ClusterCommand +class ChannelChangeChannelByNumber : public ClusterCommand { public: - AccountLoginLogout(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("logout", credsIssuerConfig) + ChannelChangeChannelByNumber(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-channel-by-number", credsIssuerConfig) { + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10420,8 +10476,8 @@ class AccountLoginLogout : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10430,171 +10486,25 @@ class AccountLoginLogout : public ClusterCommand } private: - chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ElectricalMeasurement | 0x0B04 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetProfileInfoCommand | 0x00 | -| * GetMeasurementProfileCommand | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasurementType | 0x0000 | -| * DcVoltage | 0x0100 | -| * DcVoltageMin | 0x0101 | -| * DcVoltageMax | 0x0102 | -| * DcCurrent | 0x0103 | -| * DcCurrentMin | 0x0104 | -| * DcCurrentMax | 0x0105 | -| * DcPower | 0x0106 | -| * DcPowerMin | 0x0107 | -| * DcPowerMax | 0x0108 | -| * DcVoltageMultiplier | 0x0200 | -| * DcVoltageDivisor | 0x0201 | -| * DcCurrentMultiplier | 0x0202 | -| * DcCurrentDivisor | 0x0203 | -| * DcPowerMultiplier | 0x0204 | -| * DcPowerDivisor | 0x0205 | -| * AcFrequency | 0x0300 | -| * AcFrequencyMin | 0x0301 | -| * AcFrequencyMax | 0x0302 | -| * NeutralCurrent | 0x0303 | -| * TotalActivePower | 0x0304 | -| * TotalReactivePower | 0x0305 | -| * TotalApparentPower | 0x0306 | -| * Measured1stHarmonicCurrent | 0x0307 | -| * Measured3rdHarmonicCurrent | 0x0308 | -| * Measured5thHarmonicCurrent | 0x0309 | -| * Measured7thHarmonicCurrent | 0x030A | -| * Measured9thHarmonicCurrent | 0x030B | -| * Measured11thHarmonicCurrent | 0x030C | -| * MeasuredPhase1stHarmonicCurrent | 0x030D | -| * MeasuredPhase3rdHarmonicCurrent | 0x030E | -| * MeasuredPhase5thHarmonicCurrent | 0x030F | -| * MeasuredPhase7thHarmonicCurrent | 0x0310 | -| * MeasuredPhase9thHarmonicCurrent | 0x0311 | -| * MeasuredPhase11thHarmonicCurrent | 0x0312 | -| * AcFrequencyMultiplier | 0x0400 | -| * AcFrequencyDivisor | 0x0401 | -| * PowerMultiplier | 0x0402 | -| * PowerDivisor | 0x0403 | -| * HarmonicCurrentMultiplier | 0x0404 | -| * PhaseHarmonicCurrentMultiplier | 0x0405 | -| * InstantaneousVoltage | 0x0500 | -| * InstantaneousLineCurrent | 0x0501 | -| * InstantaneousActiveCurrent | 0x0502 | -| * InstantaneousReactiveCurrent | 0x0503 | -| * InstantaneousPower | 0x0504 | -| * RmsVoltage | 0x0505 | -| * RmsVoltageMin | 0x0506 | -| * RmsVoltageMax | 0x0507 | -| * RmsCurrent | 0x0508 | -| * RmsCurrentMin | 0x0509 | -| * RmsCurrentMax | 0x050A | -| * ActivePower | 0x050B | -| * ActivePowerMin | 0x050C | -| * ActivePowerMax | 0x050D | -| * ReactivePower | 0x050E | -| * ApparentPower | 0x050F | -| * PowerFactor | 0x0510 | -| * AverageRmsVoltageMeasurementPeriod | 0x0511 | -| * AverageRmsUnderVoltageCounter | 0x0513 | -| * RmsExtremeOverVoltagePeriod | 0x0514 | -| * RmsExtremeUnderVoltagePeriod | 0x0515 | -| * RmsVoltageSagPeriod | 0x0516 | -| * RmsVoltageSwellPeriod | 0x0517 | -| * AcVoltageMultiplier | 0x0600 | -| * AcVoltageDivisor | 0x0601 | -| * AcCurrentMultiplier | 0x0602 | -| * AcCurrentDivisor | 0x0603 | -| * AcPowerMultiplier | 0x0604 | -| * AcPowerDivisor | 0x0605 | -| * OverloadAlarmsMask | 0x0700 | -| * VoltageOverload | 0x0701 | -| * CurrentOverload | 0x0702 | -| * AcOverloadAlarmsMask | 0x0800 | -| * AcVoltageOverload | 0x0801 | -| * AcCurrentOverload | 0x0802 | -| * AcActivePowerOverload | 0x0803 | -| * AcReactivePowerOverload | 0x0804 | -| * AverageRmsOverVoltage | 0x0805 | -| * AverageRmsUnderVoltage | 0x0806 | -| * RmsExtremeOverVoltage | 0x0807 | -| * RmsExtremeUnderVoltage | 0x0808 | -| * RmsVoltageSag | 0x0809 | -| * RmsVoltageSwell | 0x080A | -| * LineCurrentPhaseB | 0x0901 | -| * ActiveCurrentPhaseB | 0x0902 | -| * ReactiveCurrentPhaseB | 0x0903 | -| * RmsVoltagePhaseB | 0x0905 | -| * RmsVoltageMinPhaseB | 0x0906 | -| * RmsVoltageMaxPhaseB | 0x0907 | -| * RmsCurrentPhaseB | 0x0908 | -| * RmsCurrentMinPhaseB | 0x0909 | -| * RmsCurrentMaxPhaseB | 0x090A | -| * ActivePowerPhaseB | 0x090B | -| * ActivePowerMinPhaseB | 0x090C | -| * ActivePowerMaxPhaseB | 0x090D | -| * ReactivePowerPhaseB | 0x090E | -| * ApparentPowerPhaseB | 0x090F | -| * PowerFactorPhaseB | 0x0910 | -| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | -| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | -| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | -| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | -| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | -| * RmsVoltageSagPeriodPhaseB | 0x0916 | -| * RmsVoltageSwellPeriodPhaseB | 0x0917 | -| * LineCurrentPhaseC | 0x0A01 | -| * ActiveCurrentPhaseC | 0x0A02 | -| * ReactiveCurrentPhaseC | 0x0A03 | -| * RmsVoltagePhaseC | 0x0A05 | -| * RmsVoltageMinPhaseC | 0x0A06 | -| * RmsVoltageMaxPhaseC | 0x0A07 | -| * RmsCurrentPhaseC | 0x0A08 | -| * RmsCurrentMinPhaseC | 0x0A09 | -| * RmsCurrentMaxPhaseC | 0x0A0A | -| * ActivePowerPhaseC | 0x0A0B | -| * ActivePowerMinPhaseC | 0x0A0C | -| * ActivePowerMaxPhaseC | 0x0A0D | -| * ReactivePowerPhaseC | 0x0A0E | -| * ApparentPowerPhaseC | 0x0A0F | -| * PowerFactorPhaseC | 0x0A10 | -| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | -| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | -| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | -| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | -| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | -| * RmsVoltageSagPeriodPhaseC | 0x0A16 | -| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command GetProfileInfoCommand + * Command SkipChannel */ -class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand +class ChannelSkipChannel : public ClusterCommand { public: - ElectricalMeasurementGetProfileInfoCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-profile-info-command", credsIssuerConfig) + ChannelSkipChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-channel", credsIssuerConfig) { + AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10603,8 +10513,8 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10613,29 +10523,33 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand } private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type mRequest; + chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; }; /* - * Command GetMeasurementProfileCommand + * Command GetProgramGuide */ -class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand +class ChannelGetProgramGuide : public ClusterCommand { public: - ElectricalMeasurementGetMeasurementProfileCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-measurement-profile-command", credsIssuerConfig) + ChannelGetProgramGuide(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-program-guide", credsIssuerConfig), mComplex_ChannelList(&mRequest.channelList), + mComplex_PageToken(&mRequest.pageToken), mComplex_ExternalIDList(&mRequest.externalIDList) { - AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); - AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); + AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); + AddArgument("ChannelList", &mComplex_ChannelList); + AddArgument("PageToken", &mComplex_PageToken); + AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); + AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::GetProgramGuide::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10644,9 +10558,8 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::GetProgramGuide::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10655,119 +10568,111 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand } private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; + chip::app::Clusters::Channel::Commands::GetProgramGuide::Type mRequest; + TypedComplexArgument< + chip::Optional>> + mComplex_ChannelList; + TypedComplexArgument> mComplex_PageToken; + TypedComplexArgument< + chip::Optional>> + mComplex_ExternalIDList; +}; + +/* + * Command RecordProgram + */ +class ChannelRecordProgram : public ClusterCommand +{ +public: + ChannelRecordProgram(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("record-program", credsIssuerConfig), mComplex_ExternalIDList(&mRequest.externalIDList) + { + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); + AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::RecordProgram::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::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::RecordProgram::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::Channel::Commands::RecordProgram::Type mRequest; + TypedComplexArgument> + mComplex_ExternalIDList; +}; + +/* + * Command CancelRecordProgram + */ +class ChannelCancelRecordProgram : public ClusterCommand +{ +public: + ChannelCancelRecordProgram(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("cancel-record-program", credsIssuerConfig), mComplex_ExternalIDList(&mRequest.externalIDList) + { + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); + AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::CancelRecordProgram::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::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::CancelRecordProgram::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::Channel::Commands::CancelRecordProgram::Type mRequest; + TypedComplexArgument> + mComplex_ExternalIDList; }; /*----------------------------------------------------------------------------*\ -| Cluster UnitTesting | 0xFFF1FC05 | +| Cluster TargetNavigator | 0x0505 | |------------------------------------------------------------------------------| | Commands: | | -| * Test | 0x00 | -| * TestNotHandled | 0x01 | -| * TestSpecific | 0x02 | -| * TestUnknownCommand | 0x03 | -| * TestAddArguments | 0x04 | -| * TestSimpleArgumentRequest | 0x05 | -| * TestStructArrayArgumentRequest | 0x06 | -| * TestStructArgumentRequest | 0x07 | -| * TestNestedStructArgumentRequest | 0x08 | -| * TestListStructArgumentRequest | 0x09 | -| * TestListInt8UArgumentRequest | 0x0A | -| * TestNestedStructListArgumentRequest | 0x0B | -| * TestListNestedStructListArgumentRequest | 0x0C | -| * TestListInt8UReverseRequest | 0x0D | -| * TestEnumsRequest | 0x0E | -| * TestNullableOptionalRequest | 0x0F | -| * TestComplexNullableOptionalRequest | 0x10 | -| * SimpleStructEchoRequest | 0x11 | -| * TimedInvokeRequest | 0x12 | -| * TestSimpleOptionalArgumentRequest | 0x13 | -| * TestEmitTestEventRequest | 0x14 | -| * TestEmitTestFabricScopedEventRequest | 0x15 | +| * NavigateTarget | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Boolean | 0x0000 | -| * Bitmap8 | 0x0001 | -| * Bitmap16 | 0x0002 | -| * Bitmap32 | 0x0003 | -| * Bitmap64 | 0x0004 | -| * Int8u | 0x0005 | -| * Int16u | 0x0006 | -| * Int24u | 0x0007 | -| * Int32u | 0x0008 | -| * Int40u | 0x0009 | -| * Int48u | 0x000A | -| * Int56u | 0x000B | -| * Int64u | 0x000C | -| * Int8s | 0x000D | -| * Int16s | 0x000E | -| * Int24s | 0x000F | -| * Int32s | 0x0010 | -| * Int40s | 0x0011 | -| * Int48s | 0x0012 | -| * Int56s | 0x0013 | -| * Int64s | 0x0014 | -| * Enum8 | 0x0015 | -| * Enum16 | 0x0016 | -| * FloatSingle | 0x0017 | -| * FloatDouble | 0x0018 | -| * OctetString | 0x0019 | -| * ListInt8u | 0x001A | -| * ListOctetString | 0x001B | -| * ListStructOctetString | 0x001C | -| * LongOctetString | 0x001D | -| * CharString | 0x001E | -| * LongCharString | 0x001F | -| * EpochUs | 0x0020 | -| * EpochS | 0x0021 | -| * VendorId | 0x0022 | -| * ListNullablesAndOptionalsStruct | 0x0023 | -| * EnumAttr | 0x0024 | -| * StructAttr | 0x0025 | -| * RangeRestrictedInt8u | 0x0026 | -| * RangeRestrictedInt8s | 0x0027 | -| * RangeRestrictedInt16u | 0x0028 | -| * RangeRestrictedInt16s | 0x0029 | -| * ListLongOctetString | 0x002A | -| * ListFabricScoped | 0x002B | -| * TimedWriteBoolean | 0x0030 | -| * GeneralErrorBoolean | 0x0031 | -| * ClusterErrorBoolean | 0x0032 | -| * Unsupported | 0x00FF | -| * NullableBoolean | 0x4000 | -| * NullableBitmap8 | 0x4001 | -| * NullableBitmap16 | 0x4002 | -| * NullableBitmap32 | 0x4003 | -| * NullableBitmap64 | 0x4004 | -| * NullableInt8u | 0x4005 | -| * NullableInt16u | 0x4006 | -| * NullableInt24u | 0x4007 | -| * NullableInt32u | 0x4008 | -| * NullableInt40u | 0x4009 | -| * NullableInt48u | 0x400A | -| * NullableInt56u | 0x400B | -| * NullableInt64u | 0x400C | -| * NullableInt8s | 0x400D | -| * NullableInt16s | 0x400E | -| * NullableInt24s | 0x400F | -| * NullableInt32s | 0x4010 | -| * NullableInt40s | 0x4011 | -| * NullableInt48s | 0x4012 | -| * NullableInt56s | 0x4013 | -| * NullableInt64s | 0x4014 | -| * NullableEnum8 | 0x4015 | -| * NullableEnum16 | 0x4016 | -| * NullableFloatSingle | 0x4017 | -| * NullableFloatDouble | 0x4018 | -| * NullableOctetString | 0x4019 | -| * NullableCharString | 0x401E | -| * NullableEnumAttr | 0x4024 | -| * NullableStruct | 0x4025 | -| * NullableRangeRestrictedInt8u | 0x4026 | -| * NullableRangeRestrictedInt8s | 0x4027 | -| * NullableRangeRestrictedInt16u | 0x4028 | -| * NullableRangeRestrictedInt16s | 0x4029 | -| * WriteOnlyInt8u | 0x402A | +| * TargetList | 0x0000 | +| * CurrentTarget | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10776,25 +10681,27 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * TestEvent | 0x0001 | -| * TestFabricScopedEvent | 0x0002 | +| * TargetUpdated | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command Test + * Command NavigateTarget */ -class UnitTestingTest : public ClusterCommand +class TargetNavigatorNavigateTarget : public ClusterCommand { public: - UnitTestingTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig) + TargetNavigatorNavigateTarget(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("navigate-target", credsIssuerConfig) { + AddArgument("Target", 0, UINT8_MAX, &mRequest.target); + AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10803,8 +10710,8 @@ class UnitTestingTest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10813,24 +10720,66 @@ class UnitTestingTest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::Test::Type mRequest; + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster MediaPlayback | 0x0506 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Play | 0x00 | +| * Pause | 0x01 | +| * Stop | 0x02 | +| * StartOver | 0x03 | +| * Previous | 0x04 | +| * Next | 0x05 | +| * Rewind | 0x06 | +| * FastForward | 0x07 | +| * SkipForward | 0x08 | +| * SkipBackward | 0x09 | +| * Seek | 0x0B | +| * ActivateAudioTrack | 0x0C | +| * ActivateTextTrack | 0x0D | +| * DeactivateTextTrack | 0x0E | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentState | 0x0000 | +| * StartTime | 0x0001 | +| * Duration | 0x0002 | +| * SampledPosition | 0x0003 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | +| * ActiveAudioTrack | 0x0007 | +| * AvailableAudioTracks | 0x0008 | +| * ActiveTextTrack | 0x0009 | +| * AvailableTextTracks | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChanged | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Command TestNotHandled + * Command Play */ -class UnitTestingTestNotHandled : public ClusterCommand +class MediaPlaybackPlay : public ClusterCommand { public: - UnitTestingTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig) + MediaPlaybackPlay(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("play", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10839,8 +10788,8 @@ class UnitTestingTestNotHandled : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10849,24 +10798,24 @@ class UnitTestingTestNotHandled : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::Play::Type mRequest; }; /* - * Command TestSpecific + * Command Pause */ -class UnitTestingTestSpecific : public ClusterCommand +class MediaPlaybackPause : public ClusterCommand { public: - UnitTestingTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig) + MediaPlaybackPause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10875,8 +10824,8 @@ class UnitTestingTestSpecific : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10885,25 +10834,24 @@ class UnitTestingTestSpecific : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestSpecific::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type mRequest; }; /* - * Command TestUnknownCommand + * Command Stop */ -class UnitTestingTestUnknownCommand : public ClusterCommand +class MediaPlaybackStop : public ClusterCommand { public: - UnitTestingTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-unknown-command", credsIssuerConfig) + MediaPlaybackStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10912,8 +10860,8 @@ class UnitTestingTestUnknownCommand : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10922,27 +10870,24 @@ class UnitTestingTestUnknownCommand : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::Stop::Type mRequest; }; /* - * Command TestAddArguments + * Command StartOver */ -class UnitTestingTestAddArguments : public ClusterCommand +class MediaPlaybackStartOver : public ClusterCommand { public: - UnitTestingTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-add-arguments", credsIssuerConfig) + MediaPlaybackStartOver(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-over", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10951,8 +10896,8 @@ class UnitTestingTestAddArguments : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10961,26 +10906,24 @@ class UnitTestingTestAddArguments : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::StartOver::Type mRequest; }; /* - * Command TestSimpleArgumentRequest + * Command Previous */ -class UnitTestingTestSimpleArgumentRequest : public ClusterCommand +class MediaPlaybackPrevious : public ClusterCommand { public: - UnitTestingTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-simple-argument-request", credsIssuerConfig) + MediaPlaybackPrevious(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("previous", credsIssuerConfig) { - AddArgument("Arg1", 0, 1, &mRequest.arg1); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -10989,8 +10932,8 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -10999,32 +10942,24 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::Previous::Type mRequest; }; /* - * Command TestStructArrayArgumentRequest + * Command Next */ -class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand +class MediaPlaybackNext : public ClusterCommand { public: - UnitTestingTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-struct-array-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1), - mComplex_Arg2(&mRequest.arg2), mComplex_Arg3(&mRequest.arg3), mComplex_Arg4(&mRequest.arg4) + MediaPlaybackNext(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("next", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); - AddArgument("Arg2", &mComplex_Arg2); - AddArgument("Arg3", &mComplex_Arg3); - AddArgument("Arg4", &mComplex_Arg4); - AddArgument("Arg5", 0, UINT8_MAX, &mRequest.arg5); - AddArgument("Arg6", 0, 1, &mRequest.arg6); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11033,8 +10968,8 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11043,32 +10978,25 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; - TypedComplexArgument> - mComplex_Arg2; - TypedComplexArgument> mComplex_Arg3; - TypedComplexArgument> mComplex_Arg4; + chip::app::Clusters::MediaPlayback::Commands::Next::Type mRequest; }; /* - * Command TestStructArgumentRequest + * Command Rewind */ -class UnitTestingTestStructArgumentRequest : public ClusterCommand +class MediaPlaybackRewind : public ClusterCommand { public: - UnitTestingTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackRewind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rewind", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11077,8 +11005,8 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11087,27 +11015,25 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; }; /* - * Command TestNestedStructArgumentRequest + * Command FastForward */ -class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand +class MediaPlaybackFastForward : public ClusterCommand { public: - UnitTestingTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nested-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackFastForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-forward", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11116,8 +11042,8 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11126,27 +11052,25 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; }; /* - * Command TestListStructArgumentRequest + * Command SkipForward */ -class UnitTestingTestListStructArgumentRequest : public ClusterCommand +class MediaPlaybackSkipForward : public ClusterCommand { public: - UnitTestingTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackSkipForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-forward", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11155,8 +11079,8 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11165,28 +11089,25 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; /* - * Command TestListInt8UArgumentRequest + * Command SkipBackward */ -class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand +class MediaPlaybackSkipBackward : public ClusterCommand { public: - UnitTestingTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-int8uargument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackSkipBackward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-backward", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11195,8 +11116,8 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11205,27 +11126,25 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type mRequest; - TypedComplexArgument> mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; /* - * Command TestNestedStructListArgumentRequest + * Command Seek */ -class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand +class MediaPlaybackSeek : public ClusterCommand { public: - UnitTestingTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackSeek(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("seek", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("Position", 0, UINT64_MAX, &mRequest.position); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11234,8 +11153,8 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11244,28 +11163,27 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; }; /* - * Command TestListNestedStructListArgumentRequest + * Command ActivateAudioTrack */ -class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand +class MediaPlaybackActivateAudioTrack : public ClusterCommand { public: - UnitTestingTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackActivateAudioTrack(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("activate-audio-track", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("TrackID", &mRequest.trackID); + AddArgument("AudioOutputIndex", 0, UINT8_MAX, &mRequest.audioOutputIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11274,9 +11192,8 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11285,28 +11202,26 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Type mRequest; }; /* - * Command TestListInt8UReverseRequest + * Command ActivateTextTrack */ -class UnitTestingTestListInt8UReverseRequest : public ClusterCommand +class MediaPlaybackActivateTextTrack : public ClusterCommand { public: - UnitTestingTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-int8ureverse-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaPlaybackActivateTextTrack(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("activate-text-track", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); + AddArgument("TrackID", &mRequest.trackID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11315,8 +11230,8 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11325,28 +11240,25 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type mRequest; - TypedComplexArgument> mComplex_Arg1; + chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Type mRequest; }; /* - * Command TestEnumsRequest + * Command DeactivateTextTrack */ -class UnitTestingTestEnumsRequest : public ClusterCommand +class MediaPlaybackDeactivateTextTrack : public ClusterCommand { public: - UnitTestingTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-enums-request", credsIssuerConfig) + MediaPlaybackDeactivateTextTrack(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("deactivate-text-track", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11355,8 +11267,8 @@ class UnitTestingTestEnumsRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11365,26 +11277,47 @@ class UnitTestingTestEnumsRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster MediaInput | 0x0507 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectInput | 0x00 | +| * ShowInputStatus | 0x01 | +| * HideInputStatus | 0x02 | +| * RenameInput | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * InputList | 0x0000 | +| * CurrentInput | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command TestNullableOptionalRequest + * Command SelectInput */ -class UnitTestingTestNullableOptionalRequest : public ClusterCommand +class MediaInputSelectInput : public ClusterCommand { public: - UnitTestingTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nullable-optional-request", credsIssuerConfig) + MediaInputSelectInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-input", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11393,8 +11326,8 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11403,40 +11336,24 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type mRequest; + chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; }; /* - * Command TestComplexNullableOptionalRequest + * Command ShowInputStatus */ -class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand +class MediaInputShowInputStatus : public ClusterCommand { public: - UnitTestingTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-complex-nullable-optional-request", credsIssuerConfig), - mComplex_NullableStruct(&mRequest.nullableStruct), mComplex_OptionalStruct(&mRequest.optionalStruct), - mComplex_NullableOptionalStruct(&mRequest.nullableOptionalStruct), mComplex_NullableList(&mRequest.nullableList), - mComplex_OptionalList(&mRequest.optionalList), mComplex_NullableOptionalList(&mRequest.nullableOptionalList) + MediaInputShowInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("show-input-status", credsIssuerConfig) { - AddArgument("NullableInt", 0, UINT16_MAX, &mRequest.nullableInt); - AddArgument("OptionalInt", 0, UINT16_MAX, &mRequest.optionalInt); - AddArgument("NullableOptionalInt", 0, UINT16_MAX, &mRequest.nullableOptionalInt); - AddArgument("NullableString", &mRequest.nullableString); - AddArgument("OptionalString", &mRequest.optionalString); - AddArgument("NullableOptionalString", &mRequest.nullableOptionalString); - AddArgument("NullableStruct", &mComplex_NullableStruct); - AddArgument("OptionalStruct", &mComplex_OptionalStruct); - AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct); - AddArgument("NullableList", &mComplex_NullableList); - AddArgument("OptionalList", &mComplex_OptionalList); - AddArgument("NullableOptionalList", &mComplex_NullableOptionalList); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11445,8 +11362,8 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11455,40 +11372,24 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Type mRequest; - TypedComplexArgument> - mComplex_NullableStruct; - TypedComplexArgument> mComplex_OptionalStruct; - TypedComplexArgument< - chip::Optional>> - mComplex_NullableOptionalStruct; - TypedComplexArgument< - chip::app::DataModel::Nullable>> - mComplex_NullableList; - TypedComplexArgument>> - mComplex_OptionalList; - TypedComplexArgument>>> - mComplex_NullableOptionalList; + chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type mRequest; }; /* - * Command SimpleStructEchoRequest + * Command HideInputStatus */ -class UnitTestingSimpleStructEchoRequest : public ClusterCommand +class MediaInputHideInputStatus : public ClusterCommand { public: - UnitTestingSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("simple-struct-echo-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + MediaInputHideInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("hide-input-status", credsIssuerConfig) { - AddArgument("Arg1", &mComplex_Arg1); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11497,8 +11398,8 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11507,26 +11408,26 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; + chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type mRequest; }; /* - * Command TimedInvokeRequest + * Command RenameInput */ -class UnitTestingTimedInvokeRequest : public ClusterCommand +class MediaInputRenameInput : public ClusterCommand { public: - UnitTestingTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("timed-invoke-request", credsIssuerConfig) + MediaInputRenameInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-input", credsIssuerConfig) { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11535,8 +11436,8 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11545,66 +11446,41 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type mRequest; + chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; }; -/* - * Command TestSimpleOptionalArgumentRequest - */ -class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand -{ -public: - UnitTestingTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-simple-optional-argument-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, 1, &mRequest.arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster LowPower | 0x0508 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Sleep | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command TestEmitTestEventRequest + * Command Sleep */ -class UnitTestingTestEmitTestEventRequest : public ClusterCommand +class LowPowerSleep : public ClusterCommand { public: - UnitTestingTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-emit-test-event-request", credsIssuerConfig) + LowPowerSleep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("sleep", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); - AddArgument("Arg3", 0, 1, &mRequest.arg3); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11613,8 +11489,8 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11623,26 +11499,42 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type mRequest; + chip::app::Clusters::LowPower::Commands::Sleep::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster KeypadInput | 0x0509 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SendKey | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command TestEmitTestFabricScopedEventRequest + * Command SendKey */ -class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand +class KeypadInputSendKey : public ClusterCommand { public: - UnitTestingTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-emit-test-fabric-scoped-event-request", credsIssuerConfig) + KeypadInputSendKey(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("send-key", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11651,8 +11543,8 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11661,17 +11553,19 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand } private: - chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest; + chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster FaultInjection | 0xFFF1FC06 | +| Cluster ContentLauncher | 0x050A | |------------------------------------------------------------------------------| | Commands: | | -| * FailAtFault | 0x00 | -| * FailRandomlyAtFault | 0x01 | +| * LaunchContent | 0x00 | +| * LaunchURL | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | +| * AcceptHeader | 0x0000 | +| * SupportedStreamingProtocols | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -11683,25 +11577,27 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command FailAtFault + * Command LaunchContent */ -class FaultInjectionFailAtFault : public ClusterCommand +class ContentLauncherLaunchContent : public ClusterCommand { public: - FaultInjectionFailAtFault(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fail-at-fault", credsIssuerConfig) + ContentLauncherLaunchContent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-content", credsIssuerConfig), mComplex_Search(&mRequest.search), + mComplex_PlaybackPreferences(&mRequest.playbackPreferences) { - AddArgument("Type", 0, UINT8_MAX, &mRequest.type); - AddArgument("Id", 0, UINT32_MAX, &mRequest.id); - AddArgument("NumCallsToSkip", 0, UINT32_MAX, &mRequest.numCallsToSkip); - AddArgument("NumCallsToFail", 0, UINT32_MAX, &mRequest.numCallsToFail); - AddArgument("TakeMutex", 0, 1, &mRequest.takeMutex); + AddArgument("Search", &mComplex_Search); + AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Data", &mRequest.data); + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); + AddArgument("UseCurrentContext", 0, 1, &mRequest.useCurrentContext); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11710,8 +11606,8 @@ class FaultInjectionFailAtFault : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11720,28 +11616,31 @@ class FaultInjectionFailAtFault : public ClusterCommand } private: - chip::app::Clusters::FaultInjection::Commands::FailAtFault::Type mRequest; + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; + TypedComplexArgument mComplex_Search; + TypedComplexArgument> + mComplex_PlaybackPreferences; }; /* - * Command FailRandomlyAtFault + * Command LaunchURL */ -class FaultInjectionFailRandomlyAtFault : public ClusterCommand +class ContentLauncherLaunchURL : public ClusterCommand { public: - FaultInjectionFailRandomlyAtFault(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("fail-randomly-at-fault", credsIssuerConfig) + ContentLauncherLaunchURL(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation) { - AddArgument("Type", 0, UINT8_MAX, &mRequest.type); - AddArgument("Id", 0, UINT32_MAX, &mRequest.id); - AddArgument("Percentage", 0, UINT8_MAX, &mRequest.percentage); + AddArgument("ContentURL", &mRequest.contentURL); + AddArgument("DisplayString", &mRequest.displayString); + AddArgument("BrandingInformation", &mComplex_BrandingInformation); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11750,8 +11649,8 @@ class FaultInjectionFailRandomlyAtFault : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11760,18 +11659,21 @@ class FaultInjectionFailRandomlyAtFault : public ClusterCommand } private: - chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Type mRequest; + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; + TypedComplexArgument> + mComplex_BrandingInformation; }; /*----------------------------------------------------------------------------*\ -| Cluster SampleMei | 0xFFF1FC20 | +| Cluster AudioOutput | 0x050B | |------------------------------------------------------------------------------| | Commands: | | -| * Ping | 0x00 | -| * AddArguments | 0x02 | +| * SelectOutput | 0x00 | +| * RenameOutput | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * FlipFlop | 0x0000 | +| * OutputList | 0x0000 | +| * CurrentOutput | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -11783,20 +11685,21 @@ class FaultInjectionFailRandomlyAtFault : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command Ping + * Command SelectOutput */ -class SampleMeiPing : public ClusterCommand +class AudioOutputSelectOutput : public ClusterCommand { public: - SampleMeiPing(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("ping", credsIssuerConfig) + AudioOutputSelectOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-output", credsIssuerConfig) { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::Ping::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11805,8 +11708,8 @@ class SampleMeiPing : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::Ping::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11815,26 +11718,26 @@ class SampleMeiPing : public ClusterCommand } private: - chip::app::Clusters::SampleMei::Commands::Ping::Type mRequest; + chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; }; /* - * Command AddArguments + * Command RenameOutput */ -class SampleMeiAddArguments : public ClusterCommand +class AudioOutputRenameOutput : public ClusterCommand { public: - SampleMeiAddArguments(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-arguments", credsIssuerConfig) + AudioOutputRenameOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-output", credsIssuerConfig) { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::AddArguments::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -11843,8 +11746,8 @@ class SampleMeiAddArguments : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::AddArguments::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -11853,31 +11756,2897 @@ class SampleMeiAddArguments : public ClusterCommand } private: - chip::app::Clusters::SampleMei::Commands::AddArguments::Type mRequest; + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Register all Clusters commands | +| Cluster ApplicationLauncher | 0x050C | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchApp | 0x00 | +| * StopApp | 0x01 | +| * HideApp | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CatalogList | 0x0000 | +| * CurrentApp | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | \*----------------------------------------------------------------------------*/ -void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::Identify; - - const char * clusterName = "Identify"; - commands_list clusterCommands = { +/* + * Command LaunchApp + */ +class ApplicationLauncherLaunchApp : public ClusterCommand +{ +public: + ApplicationLauncherLaunchApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-app", credsIssuerConfig), mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; +}; + +/* + * Command StopApp + */ +class ApplicationLauncherStopApp : public ClusterCommand +{ +public: + ApplicationLauncherStopApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stop-app", credsIssuerConfig), mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::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::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::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::ApplicationLauncher::Commands::StopApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; +}; + +/* + * Command HideApp + */ +class ApplicationLauncherHideApp : public ClusterCommand +{ +public: + ApplicationLauncherHideApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("hide-app", credsIssuerConfig), mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::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::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::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::ApplicationLauncher::Commands::HideApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationBasic | 0x050D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0000 | +| * VendorID | 0x0001 | +| * ApplicationName | 0x0002 | +| * ProductID | 0x0003 | +| * Application | 0x0004 | +| * Status | 0x0005 | +| * ApplicationVersion | 0x0006 | +| * AllowedVendorList | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster AccountLogin | 0x050E | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetSetupPIN | 0x00 | +| * Login | 0x02 | +| * Logout | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * LoggedOut | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetSetupPIN + */ +class AccountLoginGetSetupPIN : public ClusterCommand +{ +public: + AccountLoginGetSetupPIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-setup-pin", credsIssuerConfig) + { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::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::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::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::AccountLogin::Commands::GetSetupPIN::Type mRequest; +}; + +/* + * Command Login + */ +class AccountLoginLogin : public ClusterCommand +{ +public: + AccountLoginLogin(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("login", credsIssuerConfig) + { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + AddArgument("SetupPIN", &mRequest.setupPIN); + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::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::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::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::AccountLogin::Commands::Login::Type mRequest; +}; + +/* + * Command Logout + */ +class AccountLoginLogout : public ClusterCommand +{ +public: + AccountLoginLogout(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("logout", credsIssuerConfig) + { + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::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::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::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::AccountLogin::Commands::Logout::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ContentControl | 0x050F | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpdatePIN | 0x00 | +| * ResetPIN | 0x01 | +| * Enable | 0x03 | +| * Disable | 0x04 | +| * AddBonusTime | 0x05 | +| * SetScreenDailyTime | 0x06 | +| * BlockUnratedContent | 0x07 | +| * UnblockUnratedContent | 0x08 | +| * SetOnDemandRatingThreshold | 0x09 | +| * SetScheduledContentRatingThreshold | 0x0A | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Enabled | 0x0000 | +| * OnDemandRatings | 0x0001 | +| * OnDemandRatingThreshold | 0x0002 | +| * ScheduledContentRatings | 0x0003 | +| * ScheduledContentRatingThreshold | 0x0004 | +| * ScreenDailyTime | 0x0005 | +| * RemainingScreenTime | 0x0006 | +| * BlockUnrated | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * RemainingScreenTimeExpired | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/* + * Command UpdatePIN + */ +class ContentControlUpdatePIN : public ClusterCommand +{ +public: + ContentControlUpdatePIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-pin", credsIssuerConfig) + { + AddArgument("OldPIN", &mRequest.oldPIN); + AddArgument("NewPIN", &mRequest.newPIN); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UpdatePIN::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UpdatePIN::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::ContentControl::Commands::UpdatePIN::Type mRequest; +}; + +/* + * Command ResetPIN + */ +class ContentControlResetPIN : public ClusterCommand +{ +public: + ContentControlResetPIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-pin", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::ResetPIN::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::ResetPIN::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::ContentControl::Commands::ResetPIN::Type mRequest; +}; + +/* + * Command Enable + */ +class ContentControlEnable : public ClusterCommand +{ +public: + ContentControlEnable(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Enable::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Enable::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::ContentControl::Commands::Enable::Type mRequest; +}; + +/* + * Command Disable + */ +class ContentControlDisable : public ClusterCommand +{ +public: + ContentControlDisable(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Disable::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Disable::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::ContentControl::Commands::Disable::Type mRequest; +}; + +/* + * Command AddBonusTime + */ +class ContentControlAddBonusTime : public ClusterCommand +{ +public: + ContentControlAddBonusTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-bonus-time", credsIssuerConfig) + { + AddArgument("PINCode", &mRequest.PINCode); + AddArgument("BonusTime", 0, UINT32_MAX, &mRequest.bonusTime); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBonusTime::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBonusTime::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::ContentControl::Commands::AddBonusTime::Type mRequest; +}; + +/* + * Command SetScreenDailyTime + */ +class ContentControlSetScreenDailyTime : public ClusterCommand +{ +public: + ContentControlSetScreenDailyTime(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-screen-daily-time", credsIssuerConfig) + { + AddArgument("ScreenTime", 0, UINT32_MAX, &mRequest.screenTime); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::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::ContentControl::Commands::SetScreenDailyTime::Type mRequest; +}; + +/* + * Command BlockUnratedContent + */ +class ContentControlBlockUnratedContent : public ClusterCommand +{ +public: + ContentControlBlockUnratedContent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("block-unrated-content", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::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::ContentControl::Commands::BlockUnratedContent::Type mRequest; +}; + +/* + * Command UnblockUnratedContent + */ +class ContentControlUnblockUnratedContent : public ClusterCommand +{ +public: + ContentControlUnblockUnratedContent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unblock-unrated-content", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::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::ContentControl::Commands::UnblockUnratedContent::Type mRequest; +}; + +/* + * Command SetOnDemandRatingThreshold + */ +class ContentControlSetOnDemandRatingThreshold : public ClusterCommand +{ +public: + ContentControlSetOnDemandRatingThreshold(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-on-demand-rating-threshold", credsIssuerConfig) + { + AddArgument("Rating", &mRequest.rating); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::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::ContentControl::Commands::SetOnDemandRatingThreshold::Type mRequest; +}; + +/* + * Command SetScheduledContentRatingThreshold + */ +class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand +{ +public: + ContentControlSetScheduledContentRatingThreshold(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-scheduled-content-rating-threshold", credsIssuerConfig) + { + AddArgument("Rating", &mRequest.rating); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::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::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::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::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ContentAppObserver | 0x0510 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ContentAppMessage | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ContentAppMessage + */ +class ContentAppObserverContentAppMessage : public ClusterCommand +{ +public: + ContentAppObserverContentAppMessage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("content-app-message", credsIssuerConfig) + { + AddArgument("Data", &mRequest.data); + AddArgument("EncodingHint", &mRequest.encodingHint); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::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::ContentAppObserver::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::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::ContentAppObserver::Commands::ContentAppMessage::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalMeasurement | 0x0B04 | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetProfileInfoCommand | 0x00 | +| * GetMeasurementProfileCommand | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasurementType | 0x0000 | +| * DcVoltage | 0x0100 | +| * DcVoltageMin | 0x0101 | +| * DcVoltageMax | 0x0102 | +| * DcCurrent | 0x0103 | +| * DcCurrentMin | 0x0104 | +| * DcCurrentMax | 0x0105 | +| * DcPower | 0x0106 | +| * DcPowerMin | 0x0107 | +| * DcPowerMax | 0x0108 | +| * DcVoltageMultiplier | 0x0200 | +| * DcVoltageDivisor | 0x0201 | +| * DcCurrentMultiplier | 0x0202 | +| * DcCurrentDivisor | 0x0203 | +| * DcPowerMultiplier | 0x0204 | +| * DcPowerDivisor | 0x0205 | +| * AcFrequency | 0x0300 | +| * AcFrequencyMin | 0x0301 | +| * AcFrequencyMax | 0x0302 | +| * NeutralCurrent | 0x0303 | +| * TotalActivePower | 0x0304 | +| * TotalReactivePower | 0x0305 | +| * TotalApparentPower | 0x0306 | +| * Measured1stHarmonicCurrent | 0x0307 | +| * Measured3rdHarmonicCurrent | 0x0308 | +| * Measured5thHarmonicCurrent | 0x0309 | +| * Measured7thHarmonicCurrent | 0x030A | +| * Measured9thHarmonicCurrent | 0x030B | +| * Measured11thHarmonicCurrent | 0x030C | +| * MeasuredPhase1stHarmonicCurrent | 0x030D | +| * MeasuredPhase3rdHarmonicCurrent | 0x030E | +| * MeasuredPhase5thHarmonicCurrent | 0x030F | +| * MeasuredPhase7thHarmonicCurrent | 0x0310 | +| * MeasuredPhase9thHarmonicCurrent | 0x0311 | +| * MeasuredPhase11thHarmonicCurrent | 0x0312 | +| * AcFrequencyMultiplier | 0x0400 | +| * AcFrequencyDivisor | 0x0401 | +| * PowerMultiplier | 0x0402 | +| * PowerDivisor | 0x0403 | +| * HarmonicCurrentMultiplier | 0x0404 | +| * PhaseHarmonicCurrentMultiplier | 0x0405 | +| * InstantaneousVoltage | 0x0500 | +| * InstantaneousLineCurrent | 0x0501 | +| * InstantaneousActiveCurrent | 0x0502 | +| * InstantaneousReactiveCurrent | 0x0503 | +| * InstantaneousPower | 0x0504 | +| * RmsVoltage | 0x0505 | +| * RmsVoltageMin | 0x0506 | +| * RmsVoltageMax | 0x0507 | +| * RmsCurrent | 0x0508 | +| * RmsCurrentMin | 0x0509 | +| * RmsCurrentMax | 0x050A | +| * ActivePower | 0x050B | +| * ActivePowerMin | 0x050C | +| * ActivePowerMax | 0x050D | +| * ReactivePower | 0x050E | +| * ApparentPower | 0x050F | +| * PowerFactor | 0x0510 | +| * AverageRmsVoltageMeasurementPeriod | 0x0511 | +| * AverageRmsUnderVoltageCounter | 0x0513 | +| * RmsExtremeOverVoltagePeriod | 0x0514 | +| * RmsExtremeUnderVoltagePeriod | 0x0515 | +| * RmsVoltageSagPeriod | 0x0516 | +| * RmsVoltageSwellPeriod | 0x0517 | +| * AcVoltageMultiplier | 0x0600 | +| * AcVoltageDivisor | 0x0601 | +| * AcCurrentMultiplier | 0x0602 | +| * AcCurrentDivisor | 0x0603 | +| * AcPowerMultiplier | 0x0604 | +| * AcPowerDivisor | 0x0605 | +| * OverloadAlarmsMask | 0x0700 | +| * VoltageOverload | 0x0701 | +| * CurrentOverload | 0x0702 | +| * AcOverloadAlarmsMask | 0x0800 | +| * AcVoltageOverload | 0x0801 | +| * AcCurrentOverload | 0x0802 | +| * AcActivePowerOverload | 0x0803 | +| * AcReactivePowerOverload | 0x0804 | +| * AverageRmsOverVoltage | 0x0805 | +| * AverageRmsUnderVoltage | 0x0806 | +| * RmsExtremeOverVoltage | 0x0807 | +| * RmsExtremeUnderVoltage | 0x0808 | +| * RmsVoltageSag | 0x0809 | +| * RmsVoltageSwell | 0x080A | +| * LineCurrentPhaseB | 0x0901 | +| * ActiveCurrentPhaseB | 0x0902 | +| * ReactiveCurrentPhaseB | 0x0903 | +| * RmsVoltagePhaseB | 0x0905 | +| * RmsVoltageMinPhaseB | 0x0906 | +| * RmsVoltageMaxPhaseB | 0x0907 | +| * RmsCurrentPhaseB | 0x0908 | +| * RmsCurrentMinPhaseB | 0x0909 | +| * RmsCurrentMaxPhaseB | 0x090A | +| * ActivePowerPhaseB | 0x090B | +| * ActivePowerMinPhaseB | 0x090C | +| * ActivePowerMaxPhaseB | 0x090D | +| * ReactivePowerPhaseB | 0x090E | +| * ApparentPowerPhaseB | 0x090F | +| * PowerFactorPhaseB | 0x0910 | +| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | +| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | +| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | +| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | +| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | +| * RmsVoltageSagPeriodPhaseB | 0x0916 | +| * RmsVoltageSwellPeriodPhaseB | 0x0917 | +| * LineCurrentPhaseC | 0x0A01 | +| * ActiveCurrentPhaseC | 0x0A02 | +| * ReactiveCurrentPhaseC | 0x0A03 | +| * RmsVoltagePhaseC | 0x0A05 | +| * RmsVoltageMinPhaseC | 0x0A06 | +| * RmsVoltageMaxPhaseC | 0x0A07 | +| * RmsCurrentPhaseC | 0x0A08 | +| * RmsCurrentMinPhaseC | 0x0A09 | +| * RmsCurrentMaxPhaseC | 0x0A0A | +| * ActivePowerPhaseC | 0x0A0B | +| * ActivePowerMinPhaseC | 0x0A0C | +| * ActivePowerMaxPhaseC | 0x0A0D | +| * ReactivePowerPhaseC | 0x0A0E | +| * ApparentPowerPhaseC | 0x0A0F | +| * PowerFactorPhaseC | 0x0A10 | +| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | +| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | +| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | +| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | +| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | +| * RmsVoltageSagPeriodPhaseC | 0x0A16 | +| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetProfileInfoCommand + */ +class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand +{ +public: + ElectricalMeasurementGetProfileInfoCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-profile-info-command", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::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::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::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::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type mRequest; +}; + +/* + * Command GetMeasurementProfileCommand + */ +class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand +{ +public: + ElectricalMeasurementGetMeasurementProfileCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-measurement-profile-command", credsIssuerConfig) + { + AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); + AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster UnitTesting | 0xFFF1FC05 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Test | 0x00 | +| * TestNotHandled | 0x01 | +| * TestSpecific | 0x02 | +| * TestUnknownCommand | 0x03 | +| * TestAddArguments | 0x04 | +| * TestSimpleArgumentRequest | 0x05 | +| * TestStructArrayArgumentRequest | 0x06 | +| * TestStructArgumentRequest | 0x07 | +| * TestNestedStructArgumentRequest | 0x08 | +| * TestListStructArgumentRequest | 0x09 | +| * TestListInt8UArgumentRequest | 0x0A | +| * TestNestedStructListArgumentRequest | 0x0B | +| * TestListNestedStructListArgumentRequest | 0x0C | +| * TestListInt8UReverseRequest | 0x0D | +| * TestEnumsRequest | 0x0E | +| * TestNullableOptionalRequest | 0x0F | +| * TestComplexNullableOptionalRequest | 0x10 | +| * SimpleStructEchoRequest | 0x11 | +| * TimedInvokeRequest | 0x12 | +| * TestSimpleOptionalArgumentRequest | 0x13 | +| * TestEmitTestEventRequest | 0x14 | +| * TestEmitTestFabricScopedEventRequest | 0x15 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Boolean | 0x0000 | +| * Bitmap8 | 0x0001 | +| * Bitmap16 | 0x0002 | +| * Bitmap32 | 0x0003 | +| * Bitmap64 | 0x0004 | +| * Int8u | 0x0005 | +| * Int16u | 0x0006 | +| * Int24u | 0x0007 | +| * Int32u | 0x0008 | +| * Int40u | 0x0009 | +| * Int48u | 0x000A | +| * Int56u | 0x000B | +| * Int64u | 0x000C | +| * Int8s | 0x000D | +| * Int16s | 0x000E | +| * Int24s | 0x000F | +| * Int32s | 0x0010 | +| * Int40s | 0x0011 | +| * Int48s | 0x0012 | +| * Int56s | 0x0013 | +| * Int64s | 0x0014 | +| * Enum8 | 0x0015 | +| * Enum16 | 0x0016 | +| * FloatSingle | 0x0017 | +| * FloatDouble | 0x0018 | +| * OctetString | 0x0019 | +| * ListInt8u | 0x001A | +| * ListOctetString | 0x001B | +| * ListStructOctetString | 0x001C | +| * LongOctetString | 0x001D | +| * CharString | 0x001E | +| * LongCharString | 0x001F | +| * EpochUs | 0x0020 | +| * EpochS | 0x0021 | +| * VendorId | 0x0022 | +| * ListNullablesAndOptionalsStruct | 0x0023 | +| * EnumAttr | 0x0024 | +| * StructAttr | 0x0025 | +| * RangeRestrictedInt8u | 0x0026 | +| * RangeRestrictedInt8s | 0x0027 | +| * RangeRestrictedInt16u | 0x0028 | +| * RangeRestrictedInt16s | 0x0029 | +| * ListLongOctetString | 0x002A | +| * ListFabricScoped | 0x002B | +| * TimedWriteBoolean | 0x0030 | +| * GeneralErrorBoolean | 0x0031 | +| * ClusterErrorBoolean | 0x0032 | +| * Unsupported | 0x00FF | +| * NullableBoolean | 0x4000 | +| * NullableBitmap8 | 0x4001 | +| * NullableBitmap16 | 0x4002 | +| * NullableBitmap32 | 0x4003 | +| * NullableBitmap64 | 0x4004 | +| * NullableInt8u | 0x4005 | +| * NullableInt16u | 0x4006 | +| * NullableInt24u | 0x4007 | +| * NullableInt32u | 0x4008 | +| * NullableInt40u | 0x4009 | +| * NullableInt48u | 0x400A | +| * NullableInt56u | 0x400B | +| * NullableInt64u | 0x400C | +| * NullableInt8s | 0x400D | +| * NullableInt16s | 0x400E | +| * NullableInt24s | 0x400F | +| * NullableInt32s | 0x4010 | +| * NullableInt40s | 0x4011 | +| * NullableInt48s | 0x4012 | +| * NullableInt56s | 0x4013 | +| * NullableInt64s | 0x4014 | +| * NullableEnum8 | 0x4015 | +| * NullableEnum16 | 0x4016 | +| * NullableFloatSingle | 0x4017 | +| * NullableFloatDouble | 0x4018 | +| * NullableOctetString | 0x4019 | +| * NullableCharString | 0x401E | +| * NullableEnumAttr | 0x4024 | +| * NullableStruct | 0x4025 | +| * NullableRangeRestrictedInt8u | 0x4026 | +| * NullableRangeRestrictedInt8s | 0x4027 | +| * NullableRangeRestrictedInt16u | 0x4028 | +| * NullableRangeRestrictedInt16s | 0x4029 | +| * WriteOnlyInt8u | 0x402A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * TestEvent | 0x0001 | +| * TestFabricScopedEvent | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Command Test + */ +class UnitTestingTest : public ClusterCommand +{ +public: + UnitTestingTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::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::UnitTesting::Commands::Test::Type mRequest; +}; + +/* + * Command TestNotHandled + */ +class UnitTestingTestNotHandled : public ClusterCommand +{ +public: + UnitTestingTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::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::UnitTesting::Commands::TestNotHandled::Type mRequest; +}; + +/* + * Command TestSpecific + */ +class UnitTestingTestSpecific : public ClusterCommand +{ +public: + UnitTestingTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::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::UnitTesting::Commands::TestSpecific::Type mRequest; +}; + +/* + * Command TestUnknownCommand + */ +class UnitTestingTestUnknownCommand : public ClusterCommand +{ +public: + UnitTestingTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-unknown-command", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::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::UnitTesting::Commands::TestUnknownCommand::Type mRequest; +}; + +/* + * Command TestAddArguments + */ +class UnitTestingTestAddArguments : public ClusterCommand +{ +public: + UnitTestingTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-add-arguments", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::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::UnitTesting::Commands::TestAddArguments::Type mRequest; +}; + +/* + * Command TestSimpleArgumentRequest + */ +class UnitTestingTestSimpleArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-simple-argument-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, 1, &mRequest.arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::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::UnitTesting::Commands::TestSimpleArgumentRequest::Type mRequest; +}; + +/* + * Command TestStructArrayArgumentRequest + */ +class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-struct-array-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1), + mComplex_Arg2(&mRequest.arg2), mComplex_Arg3(&mRequest.arg3), mComplex_Arg4(&mRequest.arg4) + { + AddArgument("Arg1", &mComplex_Arg1); + AddArgument("Arg2", &mComplex_Arg2); + AddArgument("Arg3", &mComplex_Arg3); + AddArgument("Arg4", &mComplex_Arg4); + AddArgument("Arg5", 0, UINT8_MAX, &mRequest.arg5); + AddArgument("Arg6", 0, 1, &mRequest.arg6); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::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::UnitTesting::Commands::TestStructArrayArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; + TypedComplexArgument> + mComplex_Arg2; + TypedComplexArgument> mComplex_Arg3; + TypedComplexArgument> mComplex_Arg4; +}; + +/* + * Command TestStructArgumentRequest + */ +class UnitTestingTestStructArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::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::UnitTesting::Commands::TestStructArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; +}; + +/* + * Command TestNestedStructArgumentRequest + */ +class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nested-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::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::UnitTesting::Commands::TestNestedStructArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; +}; + +/* + * Command TestListStructArgumentRequest + */ +class UnitTestingTestListStructArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::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::UnitTesting::Commands::TestListStructArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; +}; + +/* + * Command TestListInt8UArgumentRequest + */ +class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-int8uargument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::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::UnitTesting::Commands::TestListInt8UArgumentRequest::Type mRequest; + TypedComplexArgument> mComplex_Arg1; +}; + +/* + * Command TestNestedStructListArgumentRequest + */ +class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::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::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; +}; + +/* + * Command TestListNestedStructListArgumentRequest + */ +class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::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::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; +}; + +/* + * Command TestListInt8UReverseRequest + */ +class UnitTestingTestListInt8UReverseRequest : public ClusterCommand +{ +public: + UnitTestingTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-int8ureverse-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::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::UnitTesting::Commands::TestListInt8UReverseRequest::Type mRequest; + TypedComplexArgument> mComplex_Arg1; +}; + +/* + * Command TestEnumsRequest + */ +class UnitTestingTestEnumsRequest : public ClusterCommand +{ +public: + UnitTestingTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-enums-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::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::UnitTesting::Commands::TestEnumsRequest::Type mRequest; +}; + +/* + * Command TestNullableOptionalRequest + */ +class UnitTestingTestNullableOptionalRequest : public ClusterCommand +{ +public: + UnitTestingTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nullable-optional-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::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::UnitTesting::Commands::TestNullableOptionalRequest::Type mRequest; +}; + +/* + * Command TestComplexNullableOptionalRequest + */ +class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand +{ +public: + UnitTestingTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-complex-nullable-optional-request", credsIssuerConfig), + mComplex_NullableStruct(&mRequest.nullableStruct), mComplex_OptionalStruct(&mRequest.optionalStruct), + mComplex_NullableOptionalStruct(&mRequest.nullableOptionalStruct), mComplex_NullableList(&mRequest.nullableList), + mComplex_OptionalList(&mRequest.optionalList), mComplex_NullableOptionalList(&mRequest.nullableOptionalList) + { + AddArgument("NullableInt", 0, UINT16_MAX, &mRequest.nullableInt); + AddArgument("OptionalInt", 0, UINT16_MAX, &mRequest.optionalInt); + AddArgument("NullableOptionalInt", 0, UINT16_MAX, &mRequest.nullableOptionalInt); + AddArgument("NullableString", &mRequest.nullableString); + AddArgument("OptionalString", &mRequest.optionalString); + AddArgument("NullableOptionalString", &mRequest.nullableOptionalString); + AddArgument("NullableStruct", &mComplex_NullableStruct); + AddArgument("OptionalStruct", &mComplex_OptionalStruct); + AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct); + AddArgument("NullableList", &mComplex_NullableList); + AddArgument("OptionalList", &mComplex_OptionalList); + AddArgument("NullableOptionalList", &mComplex_NullableOptionalList); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::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::UnitTesting::Commands::TestComplexNullableOptionalRequest::Type mRequest; + TypedComplexArgument> + mComplex_NullableStruct; + TypedComplexArgument> mComplex_OptionalStruct; + TypedComplexArgument< + chip::Optional>> + mComplex_NullableOptionalStruct; + TypedComplexArgument< + chip::app::DataModel::Nullable>> + mComplex_NullableList; + TypedComplexArgument>> + mComplex_OptionalList; + TypedComplexArgument>>> + mComplex_NullableOptionalList; +}; + +/* + * Command SimpleStructEchoRequest + */ +class UnitTestingSimpleStructEchoRequest : public ClusterCommand +{ +public: + UnitTestingSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("simple-struct-echo-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) + { + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::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::UnitTesting::Commands::SimpleStructEchoRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; +}; + +/* + * Command TimedInvokeRequest + */ +class UnitTestingTimedInvokeRequest : public ClusterCommand +{ +public: + UnitTestingTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("timed-invoke-request", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::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::UnitTesting::Commands::TimedInvokeRequest::Type mRequest; +}; + +/* + * Command TestSimpleOptionalArgumentRequest + */ +class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand +{ +public: + UnitTestingTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-simple-optional-argument-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, 1, &mRequest.arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::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::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type mRequest; +}; + +/* + * Command TestEmitTestEventRequest + */ +class UnitTestingTestEmitTestEventRequest : public ClusterCommand +{ +public: + UnitTestingTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-emit-test-event-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + AddArgument("Arg3", 0, 1, &mRequest.arg3); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::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::UnitTesting::Commands::TestEmitTestEventRequest::Type mRequest; +}; + +/* + * Command TestEmitTestFabricScopedEventRequest + */ +class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand +{ +public: + UnitTestingTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-emit-test-fabric-scoped-event-request", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::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::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::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::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster FaultInjection | 0xFFF1FC06 | +|------------------------------------------------------------------------------| +| Commands: | | +| * FailAtFault | 0x00 | +| * FailRandomlyAtFault | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command FailAtFault + */ +class FaultInjectionFailAtFault : public ClusterCommand +{ +public: + FaultInjectionFailAtFault(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fail-at-fault", credsIssuerConfig) + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("NumCallsToSkip", 0, UINT32_MAX, &mRequest.numCallsToSkip); + AddArgument("NumCallsToFail", 0, UINT32_MAX, &mRequest.numCallsToFail); + AddArgument("TakeMutex", 0, 1, &mRequest.takeMutex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::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::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::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::FaultInjection::Commands::FailAtFault::Type mRequest; +}; + +/* + * Command FailRandomlyAtFault + */ +class FaultInjectionFailRandomlyAtFault : public ClusterCommand +{ +public: + FaultInjectionFailRandomlyAtFault(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("fail-randomly-at-fault", credsIssuerConfig) + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("Percentage", 0, UINT8_MAX, &mRequest.percentage); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::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::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::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::FaultInjection::Commands::FailRandomlyAtFault::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster SampleMei | 0xFFF1FC20 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Ping | 0x00 | +| * AddArguments | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * FlipFlop | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * PingCountEvent | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/* + * Command Ping + */ +class SampleMeiPing : public ClusterCommand +{ +public: + SampleMeiPing(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("ping", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::Ping::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::SampleMei::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::Ping::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::SampleMei::Commands::Ping::Type mRequest; +}; + +/* + * Command AddArguments + */ +class SampleMeiAddArguments : public ClusterCommand +{ +public: + SampleMeiAddArguments(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-arguments", credsIssuerConfig) + { + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SampleMei::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::AddArguments::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::SampleMei::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SampleMei::Commands::AddArguments::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::SampleMei::Commands::AddArguments::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Register all Clusters commands | +\*----------------------------------------------------------------------------*/ +void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Identify; + + const char * clusterName = "Identify"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // + make_unique(Id, "identify-type", Attributes::IdentifyType::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "identify-time", 0, UINT16_MAX, Attributes::IdentifyTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "identify-type", 0, UINT8_MAX, Attributes::IdentifyType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // + make_unique(Id, "identify-type", Attributes::IdentifyType::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterGroups(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Groups; + + const char * clusterName = "Groups"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterScenes(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Scenes; + + const char * clusterName = "Scenes"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // + make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // + make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // + make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // + make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "scene-count", 0, UINT8_MAX, Attributes::SceneCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-scene", 0, UINT8_MAX, Attributes::CurrentScene::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-group", 0, UINT16_MAX, Attributes::CurrentGroup::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "scene-valid", 0, 1, Attributes::SceneValid::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "last-configured-by", 0, UINT64_MAX, Attributes::LastConfiguredBy::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "scene-table-size", 0, UINT16_MAX, Attributes::SceneTableSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // + make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // + make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // + make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // + make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::OnOff; + + const char * clusterName = "OnOff"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // + make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // + make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // + make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // + make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "on-off", 0, 1, Attributes::OnOff::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "global-scene-control", 0, 1, Attributes::GlobalSceneControl::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "on-time", 0, UINT16_MAX, Attributes::OnTime::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "off-wait-time", 0, UINT16_MAX, Attributes::OffWaitTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-on-off", 0, UINT8_MAX, Attributes::StartUpOnOff::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // + make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // + make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // + make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // + make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::OnOffSwitchConfiguration; + + const char * clusterName = "OnOffSwitchConfiguration"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // + make_unique(Id, "switch-actions", Attributes::SwitchActions::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "switch-type", 0, UINT8_MAX, Attributes::SwitchType::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "switch-actions", 0, UINT8_MAX, Attributes::SwitchActions::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // + make_unique(Id, "switch-actions", Attributes::SwitchActions::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::LevelControl; + + const char * clusterName = "LevelControl"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // + make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // + make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // + make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // + make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // + make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // + make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // + make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // + make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // + make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "current-level", 0, UINT8_MAX, Attributes::CurrentLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "remaining-time", 0, UINT16_MAX, Attributes::RemainingTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "min-level", 0, UINT8_MAX, Attributes::MinLevel::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "max-level", 0, UINT8_MAX, Attributes::MaxLevel::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "current-frequency", 0, UINT16_MAX, Attributes::CurrentFrequency::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "min-frequency", 0, UINT16_MAX, Attributes::MinFrequency::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-frequency", 0, UINT16_MAX, Attributes::MaxFrequency::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "options", 0, UINT8_MAX, Attributes::Options::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "on-off-transition-time", 0, UINT16_MAX, Attributes::OnOffTransitionTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-level", 0, UINT8_MAX, Attributes::OnLevel::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-transition-time", 0, UINT16_MAX, + Attributes::OnTransitionTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "off-transition-time", 0, UINT16_MAX, + Attributes::OffTransitionTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "default-move-rate", 0, UINT8_MAX, Attributes::DefaultMoveRate::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "start-up-current-level", 0, UINT8_MAX, + Attributes::StartUpCurrentLevel::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // + make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // + make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // + make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // + make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // + make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // + make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // + make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // + make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // + make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::BinaryInputBasic; + + const char * clusterName = "BinaryInputBasic"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // + make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // + make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // + make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // + make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // + make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // + make_unique(Id, "application-type", Attributes::ApplicationType::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "active-text", Attributes::ActiveText::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "inactive-text", Attributes::InactiveText::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "out-of-service", 0, 1, Attributes::OutOfService::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "polarity", 0, UINT8_MAX, Attributes::Polarity::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "present-value", 0, 1, Attributes::PresentValue::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "reliability", 0, UINT8_MAX, Attributes::Reliability::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "status-flags", 0, UINT8_MAX, Attributes::StatusFlags::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "application-type", 0, UINT32_MAX, Attributes::ApplicationType::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // + make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // + make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // + make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // + make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // + make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // + make_unique(Id, "application-type", Attributes::ApplicationType::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::PulseWidthModulation; + + const char * clusterName = "PulseWidthModulation"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Descriptor; + + const char * clusterName = "Descriptor"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // + make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // + make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // + make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // + make_unique(Id, "tag-list", Attributes::TagList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "device-type-list", Attributes::DeviceTypeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "server-list", Attributes::ServerList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "client-list", Attributes::ClientList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "parts-list", Attributes::PartsList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "tag-list", Attributes::TagList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // + make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // + make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // + make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // + make_unique(Id, "tag-list", Attributes::TagList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterBinding(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::Binding; + + const char * clusterName = "Binding"; + + commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // - make_unique(Id, "identify-type", Attributes::IdentifyType::Id, credsIssuerConfig), // + make_unique(Id, "binding", Attributes::Binding::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11885,10 +14654,9 @@ void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * cre make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "identify-time", 0, UINT16_MAX, Attributes::IdentifyTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( - Id, "identify-type", 0, UINT8_MAX, Attributes::IdentifyType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "binding", Attributes::Binding::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11903,8 +14671,7 @@ void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * cre make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // - make_unique(Id, "identify-type", Attributes::IdentifyType::Id, credsIssuerConfig), // + make_unique(Id, "binding", Attributes::Binding::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11920,28 +14687,29 @@ void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * cre commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterGroups(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Groups; + using namespace chip::app::Clusters::AccessControl; - const char * clusterName = "Groups"; + const char * clusterName = "AccessControl"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // + make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // + make_unique(Id, "subjects-per-access-control-entry", Attributes::SubjectsPerAccessControlEntry::Id, + credsIssuerConfig), // + make_unique(Id, "targets-per-access-control-entry", Attributes::TargetsPerAccessControlEntry::Id, + credsIssuerConfig), // + make_unique(Id, "access-control-entries-per-fabric", Attributes::AccessControlEntriesPerFabric::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11949,8 +14717,21 @@ void registerClusterGroups(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "acl", Attributes::Acl::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "extension", Attributes::Extension::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "subjects-per-access-control-entry", 0, UINT16_MAX, + Attributes::SubjectsPerAccessControlEntry::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "targets-per-access-control-entry", 0, UINT16_MAX, + Attributes::TargetsPerAccessControlEntry::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "access-control-entries-per-fabric", 0, UINT16_MAX, + Attributes::AccessControlEntriesPerFabric::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11963,9 +14744,16 @@ void registerClusterGroups(Commands & commands, CredentialIssuerCommands * creds make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // + make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // + make_unique(Id, "subjects-per-access-control-entry", Attributes::SubjectsPerAccessControlEntry::Id, + credsIssuerConfig), // + make_unique(Id, "targets-per-access-control-entry", Attributes::TargetsPerAccessControlEntry::Id, + credsIssuerConfig), // + make_unique(Id, "access-control-entries-per-fabric", Attributes::AccessControlEntriesPerFabric::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11975,45 +14763,49 @@ void registerClusterGroups(Commands & commands, CredentialIssuerCommands * creds // // Events // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "access-control-entry-changed", Events::AccessControlEntryChanged::Id, credsIssuerConfig), // + make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "access-control-entry-changed", Events::AccessControlEntryChanged::Id, + credsIssuerConfig), // + make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, + credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterScenes(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterActions(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Scenes; + using namespace chip::app::Clusters::Actions; - const char * clusterName = "Scenes"; + const char * clusterName = "Actions"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(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), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // - make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // - make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // - make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // - make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // - make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "remaining-capacity", Attributes::RemainingCapacity::Id, credsIssuerConfig), // + make_unique(Id, "action-list", Attributes::ActionList::Id, credsIssuerConfig), // + make_unique(Id, "endpoint-lists", Attributes::EndpointLists::Id, credsIssuerConfig), // + make_unique(Id, "setup-url", Attributes::SetupURL::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12021,23 +14813,142 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "scene-count", 0, UINT8_MAX, Attributes::SceneCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-scene", 0, UINT8_MAX, Attributes::CurrentScene::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-group", 0, UINT16_MAX, Attributes::CurrentGroup::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "scene-valid", 0, 1, Attributes::SceneValid::Id, WriteCommandType::kForceWrite, + make_unique< + WriteAttributeAsComplex>>( + Id, "action-list", Attributes::ActionList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "endpoint-lists", Attributes::EndpointLists::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "setup-url", Attributes::SetupURL::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "action-list", Attributes::ActionList::Id, credsIssuerConfig), // + make_unique(Id, "endpoint-lists", Attributes::EndpointLists::Id, credsIssuerConfig), // + make_unique(Id, "setup-url", Attributes::SetupURL::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // + make_unique(Id, "action-failed", Events::ActionFailed::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // + make_unique(Id, "action-failed", Events::ActionFailed::Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::BasicInformation; + + const char * clusterName = "BasicInformation"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "specification-version", Attributes::SpecificationVersion::Id, credsIssuerConfig), // + make_unique(Id, "max-paths-per-invoke", Attributes::MaxPathsPerInvoke::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "data-model-revision", 0, UINT16_MAX, Attributes::DataModelRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-id", 0, UINT16_MAX, Attributes::ProductID::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "location", Attributes::Location::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-label", Attributes::ProductLabel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "local-config-disabled", 0, 1, Attributes::LocalConfigDisabled::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "last-configured-by", 0, UINT64_MAX, Attributes::LastConfiguredBy::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "scene-table-size", 0, UINT16_MAX, Attributes::SceneTableSize::Id, + make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "capability-minima", Attributes::CapabilityMinima::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "specification-version", 0, UINT32_MAX, Attributes::SpecificationVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-paths-per-invoke", 0, UINT16_MAX, Attributes::MaxPathsPerInvoke::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "remaining-capacity", 0, UINT8_MAX, Attributes::RemainingCapacity::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12050,57 +14961,72 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // - make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // - make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // - make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // - make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // - make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "remaining-capacity", Attributes::RemainingCapacity::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "specification-version", Attributes::SpecificationVersion::Id, credsIssuerConfig), // + make_unique(Id, "max-paths-per-invoke", Attributes::MaxPathsPerInvoke::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OnOff; + using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; - const char * clusterName = "OnOff"; + const char * clusterName = "OtaSoftwareUpdateProvider"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(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 // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // - make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // - make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // - make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // - make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12108,16 +15034,6 @@ void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsI make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "on-off", 0, 1, Attributes::OnOff::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "global-scene-control", 0, 1, Attributes::GlobalSceneControl::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "on-time", 0, UINT16_MAX, Attributes::OnTime::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "off-wait-time", 0, UINT16_MAX, Attributes::OffWaitTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-on-off", 0, UINT8_MAX, Attributes::StartUpOnOff::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12132,11 +15048,6 @@ void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsI make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // - make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // - make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // - make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // - make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12152,23 +15063,26 @@ void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsI commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OnOffSwitchConfiguration; + using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; - const char * clusterName = "OnOffSwitchConfiguration"; + const char * clusterName = "OtaSoftwareUpdateRequestor"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // - make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // + make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // + make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // + make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // + make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12176,10 +15090,16 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssu make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "switch-type", 0, UINT8_MAX, Attributes::SwitchType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "switch-actions", 0, UINT8_MAX, Attributes::SwitchActions::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "update-possible", 0, 1, Attributes::UpdatePossible::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "update-state", 0, UINT8_MAX, Attributes::UpdateState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "update-state-progress", 0, UINT8_MAX, + Attributes::UpdateStateProgress::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12194,8 +15114,10 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssu make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // - make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // + make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // + make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // + make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // + make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12205,88 +15127,46 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssu // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // + make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // + make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // + make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // + make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLocalizationConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::LevelControl; + using namespace chip::app::Clusters::LocalizationConfiguration; - const char * clusterName = "LevelControl"; + const char * clusterName = "LocalizationConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // - make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // - make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // - make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // - make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // - make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // - make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // - make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // - make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // - make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // - make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // + make_unique(Id, "supported-locales", Attributes::SupportedLocales::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "current-level", 0, UINT8_MAX, Attributes::CurrentLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "remaining-time", 0, UINT16_MAX, Attributes::RemainingTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "min-level", 0, UINT8_MAX, Attributes::MinLevel::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "max-level", 0, UINT8_MAX, Attributes::MaxLevel::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "current-frequency", 0, UINT16_MAX, Attributes::CurrentFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "min-frequency", 0, UINT16_MAX, Attributes::MinFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-frequency", 0, UINT16_MAX, Attributes::MaxFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "options", 0, UINT8_MAX, Attributes::Options::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "on-off-transition-time", 0, UINT16_MAX, Attributes::OnOffTransitionTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-level", 0, UINT8_MAX, Attributes::OnLevel::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-transition-time", 0, UINT16_MAX, - Attributes::OnTransitionTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "off-transition-time", 0, UINT16_MAX, - Attributes::OffTransitionTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "default-move-rate", 0, UINT8_MAX, Attributes::DefaultMoveRate::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "start-up-current-level", 0, UINT8_MAX, - Attributes::StartUpCurrentLevel::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "active-locale", Attributes::ActiveLocale::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-locales", Attributes::SupportedLocales::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12301,20 +15181,8 @@ void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // - make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // - make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // - make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // - make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // - make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // - make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // - make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // - make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // - make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // - make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // + make_unique(Id, "supported-locales", Attributes::SupportedLocales::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12330,11 +15198,78 @@ void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BinaryInputBasic; + using namespace chip::app::Clusters::TimeFormatLocalization; - const char * clusterName = "BinaryInputBasic"; + const char * clusterName = "TimeFormatLocalization"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "hour-format", 0, UINT8_MAX, Attributes::HourFormat::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "active-calendar-type", 0, UINT8_MAX, Attributes::ActiveCalendarType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterUnitLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::UnitLocalization; + + const char * clusterName = "UnitLocalization"; commands_list clusterCommands = { // @@ -12345,15 +15280,7 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // - make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // - make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // - make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // - make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // - make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // - make_unique(Id, "application-type", Attributes::ApplicationType::Id, credsIssuerConfig), // + make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12361,24 +15288,8 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "active-text", Attributes::ActiveText::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "inactive-text", Attributes::InactiveText::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "out-of-service", 0, 1, Attributes::OutOfService::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "polarity", 0, UINT8_MAX, Attributes::Polarity::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "present-value", 0, 1, Attributes::PresentValue::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "reliability", 0, UINT8_MAX, Attributes::Reliability::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "status-flags", 0, UINT8_MAX, Attributes::StatusFlags::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "application-type", 0, UINT32_MAX, Attributes::ApplicationType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12393,15 +15304,7 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // - make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // - make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // - make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // - make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // - make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // - make_unique(Id, "application-type", Attributes::ApplicationType::Id, credsIssuerConfig), // + make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12417,11 +15320,11 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PulseWidthModulation; + using namespace chip::app::Clusters::PowerSourceConfiguration; - const char * clusterName = "PulseWidthModulation"; + const char * clusterName = "PowerSourceConfiguration"; commands_list clusterCommands = { // @@ -12432,6 +15335,7 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "sources", Attributes::Sources::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12439,6 +15343,8 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "sources", Attributes::Sources::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12453,6 +15359,7 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "sources", Attributes::Sources::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12468,11 +15375,11 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Descriptor; + using namespace chip::app::Clusters::PowerSource; - const char * clusterName = "Descriptor"; + const char * clusterName = "PowerSource"; commands_list clusterCommands = { // @@ -12482,31 +15389,129 @@ void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * c // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // - make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // - make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // - make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // - make_unique(Id, "tag-list", Attributes::TagList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "device-type-list", Attributes::DeviceTypeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "server-list", Attributes::ServerList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "client-list", Attributes::ClientList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, + credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, + credsIssuerConfig), // + make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // + make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // + make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // + make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // + make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + credsIssuerConfig), // + make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // + make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // + make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // + make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, + credsIssuerConfig), // + make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // + make_unique(Id, "endpoint-list", Attributes::EndpointList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "status", 0, UINT8_MAX, Attributes::Status::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "order", 0, UINT8_MAX, Attributes::Order::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-input-voltage", 0, UINT32_MAX, + Attributes::WiredAssessedInputVoltage::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-input-frequency", 0, UINT16_MAX, + Attributes::WiredAssessedInputFrequency::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "wired-current-type", 0, UINT8_MAX, Attributes::WiredCurrentType::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "wired-assessed-current", 0, UINT32_MAX, + Attributes::WiredAssessedCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-nominal-voltage", 0, UINT32_MAX, Attributes::WiredNominalVoltage::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-maximum-current", 0, UINT32_MAX, Attributes::WiredMaximumCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "wired-present", 0, 1, Attributes::WiredPresent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "bat-voltage", 0, UINT32_MAX, Attributes::BatVoltage::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-percent-remaining", 0, UINT8_MAX, + Attributes::BatPercentRemaining::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-time-remaining", 0, UINT32_MAX, + Attributes::BatTimeRemaining::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-charge-level", 0, UINT8_MAX, Attributes::BatChargeLevel::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-replacement-needed", 0, 1, Attributes::BatReplacementNeeded::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-replaceability", 0, UINT8_MAX, Attributes::BatReplaceability::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-present", 0, 1, Attributes::BatPresent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-common-designation", 0, UINT16_MAX, Attributes::BatCommonDesignation::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-approved-chemistry", 0, UINT16_MAX, Attributes::BatApprovedChemistry::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "bat-capacity", 0, UINT32_MAX, Attributes::BatCapacity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-quantity", 0, UINT8_MAX, Attributes::BatQuantity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-charge-state", 0, UINT8_MAX, Attributes::BatChargeState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "bat-time-to-full-charge", 0, UINT32_MAX, + Attributes::BatTimeToFullCharge::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "bat-functional-while-charging", 0, 1, Attributes::BatFunctionalWhileCharging::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "bat-charging-current", 0, UINT32_MAX, + Attributes::BatChargingCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( - Id, "parts-list", Attributes::PartsList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "tag-list", Attributes::TagList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + Id, "endpoint-list", Attributes::EndpointList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12519,13 +15524,45 @@ void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // - make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // - make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // - make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // - make_unique(Id, "tag-list", Attributes::TagList::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, + credsIssuerConfig), // + make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, + credsIssuerConfig), // + make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // + make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // + make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // + make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // + make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // + make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // + make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // + make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, + credsIssuerConfig), // + make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // + make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // + make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // + make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // + make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // + make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, + credsIssuerConfig), // + make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // + make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, + credsIssuerConfig), // + make_unique(Id, "endpoint-list", Attributes::EndpointList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12535,28 +15572,42 @@ void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * c // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBinding(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Binding; + using namespace chip::app::Clusters::GeneralCommissioning; - const char * clusterName = "Binding"; + const char * clusterName = "GeneralCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // + make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, credsIssuerConfig), // + make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // + make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // + make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12564,9 +15615,19 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "binding", Attributes::Binding::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "breadcrumb", 0, UINT64_MAX, Attributes::Breadcrumb::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "regulatory-config", 0, UINT8_MAX, Attributes::RegulatoryConfig::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "location-capability", 0, UINT8_MAX, Attributes::LocationCapability::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "supports-concurrent-connection", 0, 1, Attributes::SupportsConcurrentConnection::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12579,9 +15640,15 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // + make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, + credsIssuerConfig), // + make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // + make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // + make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12597,51 +15664,74 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::AccessControl; + using namespace chip::app::Clusters::NetworkCommissioning; - const char * clusterName = "AccessControl"; + const char * clusterName = "NetworkCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // - make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // - make_unique(Id, "subjects-per-access-control-entry", Attributes::SubjectsPerAccessControlEntry::Id, - credsIssuerConfig), // - make_unique(Id, "targets-per-access-control-entry", Attributes::TargetsPerAccessControlEntry::Id, - credsIssuerConfig), // - make_unique(Id, "access-control-entries-per-fabric", Attributes::AccessControlEntriesPerFabric::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "acl", Attributes::Acl::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // + make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // + make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // + make_unique(Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, credsIssuerConfig), // + make_unique(Id, "supported-thread-features", Attributes::SupportedThreadFeatures::Id, credsIssuerConfig), // + make_unique(Id, "thread-version", Attributes::ThreadVersion::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "max-networks", 0, UINT8_MAX, Attributes::MaxNetworks::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "extension", Attributes::Extension::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "subjects-per-access-control-entry", 0, UINT16_MAX, - Attributes::SubjectsPerAccessControlEntry::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "targets-per-access-control-entry", 0, UINT16_MAX, - Attributes::TargetsPerAccessControlEntry::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "access-control-entries-per-fabric", 0, UINT16_MAX, - Attributes::AccessControlEntriesPerFabric::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "networks", Attributes::Networks::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "scan-max-time-seconds", 0, UINT8_MAX, Attributes::ScanMaxTimeSeconds::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "connect-max-time-seconds", 0, UINT8_MAX, Attributes::ConnectMaxTimeSeconds::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "interface-enabled", 0, 1, Attributes::InterfaceEnabled::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "last-networking-status", 0, UINT8_MAX, Attributes::LastNetworkingStatus::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "last-network-id", Attributes::LastNetworkID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "last-connect-error-value", INT32_MIN, INT32_MAX, + Attributes::LastConnectErrorValue::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-thread-features", 0, UINT16_MAX, Attributes::SupportedThreadFeatures::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "thread-version", 0, UINT16_MAX, Attributes::ThreadVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12654,16 +15744,22 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // - make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // - make_unique(Id, "subjects-per-access-control-entry", Attributes::SubjectsPerAccessControlEntry::Id, - credsIssuerConfig), // - make_unique(Id, "targets-per-access-control-entry", Attributes::TargetsPerAccessControlEntry::Id, - credsIssuerConfig), // - make_unique(Id, "access-control-entries-per-fabric", Attributes::AccessControlEntriesPerFabric::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, + credsIssuerConfig), // + make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // + make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // + make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, + credsIssuerConfig), // + make_unique(Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, credsIssuerConfig), // + make_unique(Id, "supported-thread-features", Attributes::SupportedThreadFeatures::Id, credsIssuerConfig), // + make_unique(Id, "thread-version", Attributes::ThreadVersion::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12673,49 +15769,28 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "access-control-entry-changed", Events::AccessControlEntryChanged::Id, credsIssuerConfig), // - make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "access-control-entry-changed", Events::AccessControlEntryChanged::Id, - credsIssuerConfig), // - make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, - credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterActions(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Actions; + using namespace chip::app::Clusters::DiagnosticLogs; - const char * clusterName = "Actions"; + const char * clusterName = "DiagnosticLogs"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "action-list", Attributes::ActionList::Id, credsIssuerConfig), // - make_unique(Id, "endpoint-lists", Attributes::EndpointLists::Id, credsIssuerConfig), // - make_unique(Id, "setup-url", Attributes::SetupURL::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12723,14 +15798,6 @@ void registerClusterActions(Commands & commands, CredentialIssuerCommands * cred make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "action-list", Attributes::ActionList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "endpoint-lists", Attributes::EndpointLists::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "setup-url", Attributes::SetupURL::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12745,9 +15812,6 @@ void registerClusterActions(Commands & commands, CredentialIssuerCommands * cred make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "action-list", Attributes::ActionList::Id, credsIssuerConfig), // - make_unique(Id, "endpoint-lists", Attributes::EndpointLists::Id, credsIssuerConfig), // - make_unique(Id, "setup-url", Attributes::SetupURL::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12757,102 +15821,69 @@ void registerClusterActions(Commands & commands, CredentialIssuerCommands * cred // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // - make_unique(Id, "action-failed", Events::ActionFailed::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // - make_unique(Id, "action-failed", Events::ActionFailed::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BasicInformation; + using namespace chip::app::Clusters::GeneralDiagnostics; - const char * clusterName = "BasicInformation"; + const char * clusterName = "GeneralDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "data-model-revision", 0, UINT16_MAX, Attributes::DataModelRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-id", 0, UINT16_MAX, Attributes::ProductID::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "location", Attributes::Location::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, + make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // + make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // + make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // + make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // + make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "network-interfaces", Attributes::NetworkInterfaces::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "reboot-count", 0, UINT16_MAX, Attributes::RebootCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, + make_unique>(Id, "up-time", 0, UINT64_MAX, Attributes::UpTime::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "total-operational-hours", 0, UINT32_MAX, Attributes::TotalOperationalHours::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-label", Attributes::ProductLabel::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "local-config-disabled", 0, 1, Attributes::LocalConfigDisabled::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "capability-minima", Attributes::CapabilityMinima::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "boot-reason", 0, UINT8_MAX, Attributes::BootReason::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "test-event-triggers-enabled", 0, 1, Attributes::TestEventTriggersEnabled::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12867,68 +15898,60 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // + make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // + make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // + make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // + make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; + using namespace chip::app::Clusters::SoftwareDiagnostics; - const char * clusterName = "OtaSoftwareUpdateProvider"; + const char * clusterName = "SoftwareDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12936,6 +15959,16 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "thread-metrics", Attributes::ThreadMetrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-heap-free", 0, UINT64_MAX, Attributes::CurrentHeapFree::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-heap-used", 0, UINT64_MAX, Attributes::CurrentHeapUsed::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-heap-high-watermark", 0, UINT64_MAX, + Attributes::CurrentHeapHighWatermark::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12948,8 +15981,13 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // + make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12959,180 +15997,252 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OtaSoftwareUpdateRequestor; + using namespace chip::app::Clusters::ThreadNetworkDiagnostics; - const char * clusterName = "OtaSoftwareUpdateRequestor"; + const char * clusterName = "ThreadNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // - make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // - make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // - make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // + make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // + make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // + make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // + make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // + make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // + make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // + make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // + make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // + make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // + make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // + make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // + make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "better-partition-attach-attempt-count", Attributes::BetterPartitionAttachAttemptCount::Id, + credsIssuerConfig), // + make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // + make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // + make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // + make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, + credsIssuerConfig), // + make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>(Id, "channel", 0, UINT16_MAX, Attributes::Channel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "routing-role", 0, UINT8_MAX, Attributes::RoutingRole::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "network-name", Attributes::NetworkName::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "pan-id", 0, UINT16_MAX, Attributes::PanId::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "extended-pan-id", 0, UINT64_MAX, + Attributes::ExtendedPanId::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "update-possible", 0, 1, Attributes::UpdatePossible::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "update-state", 0, UINT8_MAX, Attributes::UpdateState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "update-state-progress", 0, UINT8_MAX, - Attributes::UpdateStateProgress::Id, + chip::app::DataModel::List>>( + Id, "neighbor-table", Attributes::NeighborTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "route-table", Attributes::RouteTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "partition-id", 0, UINT32_MAX, Attributes::PartitionId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "weighting", 0, UINT16_MAX, Attributes::Weighting::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "data-version", 0, UINT16_MAX, Attributes::DataVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "stable-data-version", 0, UINT16_MAX, + Attributes::StableDataVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "leader-router-id", 0, UINT8_MAX, + Attributes::LeaderRouterId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + make_unique>(Id, "detached-role-count", 0, UINT16_MAX, Attributes::DetachedRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "child-role-count", 0, UINT16_MAX, Attributes::ChildRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "router-role-count", 0, UINT16_MAX, Attributes::RouterRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "leader-role-count", 0, UINT16_MAX, Attributes::LeaderRoleCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "attach-attempt-count", 0, UINT16_MAX, Attributes::AttachAttemptCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "partition-id-change-count", 0, UINT16_MAX, + Attributes::PartitionIdChangeCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "better-partition-attach-attempt-count", 0, UINT16_MAX, + Attributes::BetterPartitionAttachAttemptCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "parent-change-count", 0, UINT16_MAX, Attributes::ParentChangeCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-total-count", 0, UINT32_MAX, Attributes::TxTotalCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-unicast-count", 0, UINT32_MAX, Attributes::TxUnicastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-broadcast-count", 0, UINT32_MAX, Attributes::TxBroadcastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-ack-requested-count", 0, UINT32_MAX, Attributes::TxAckRequestedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-acked-count", 0, UINT32_MAX, Attributes::TxAckedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-no-ack-requested-count", 0, UINT32_MAX, Attributes::TxNoAckRequestedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-data-count", 0, UINT32_MAX, Attributes::TxDataCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-data-poll-count", 0, UINT32_MAX, Attributes::TxDataPollCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-beacon-count", 0, UINT32_MAX, Attributes::TxBeaconCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-beacon-request-count", 0, UINT32_MAX, Attributes::TxBeaconRequestCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-other-count", 0, UINT32_MAX, Attributes::TxOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-retry-count", 0, UINT32_MAX, Attributes::TxRetryCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-direct-max-retry-expiry-count", 0, UINT32_MAX, + Attributes::TxDirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "tx-indirect-max-retry-expiry-count", 0, UINT32_MAX, + Attributes::TxIndirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "tx-err-cca-count", 0, UINT32_MAX, Attributes::TxErrCcaCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-abort-count", 0, UINT32_MAX, Attributes::TxErrAbortCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-busy-channel-count", 0, UINT32_MAX, Attributes::TxErrBusyChannelCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-total-count", 0, UINT32_MAX, Attributes::RxTotalCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-unicast-count", 0, UINT32_MAX, Attributes::RxUnicastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-broadcast-count", 0, UINT32_MAX, Attributes::RxBroadcastCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-data-count", 0, UINT32_MAX, Attributes::RxDataCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-data-poll-count", 0, UINT32_MAX, Attributes::RxDataPollCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-beacon-count", 0, UINT32_MAX, Attributes::RxBeaconCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-beacon-request-count", 0, UINT32_MAX, Attributes::RxBeaconRequestCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-other-count", 0, UINT32_MAX, Attributes::RxOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-address-filtered-count", 0, UINT32_MAX, + Attributes::RxAddressFilteredCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-dest-addr-filtered-count", 0, UINT32_MAX, + Attributes::RxDestAddrFilteredCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-duplicated-count", 0, UINT32_MAX, Attributes::RxDuplicatedCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-no-frame-count", 0, UINT32_MAX, Attributes::RxErrNoFrameCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "rx-err-unknown-neighbor-count", 0, UINT32_MAX, + Attributes::RxErrUnknownNeighborCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-err-invalid-src-addr-count", 0, UINT32_MAX, + Attributes::RxErrInvalidSrcAddrCount::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "rx-err-sec-count", 0, UINT32_MAX, Attributes::RxErrSecCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-otaproviders", Attributes::DefaultOTAProviders::Id, credsIssuerConfig), // - make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // - make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // - make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // - make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // - make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-transition", Events::StateTransition::Id, credsIssuerConfig), // - make_unique(Id, "version-applied", Events::VersionApplied::Id, credsIssuerConfig), // - make_unique(Id, "download-error", Events::DownloadError::Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} -void registerClusterLocalizationConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::LocalizationConfiguration; - - const char * clusterName = "LocalizationConfiguration"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // - make_unique(Id, "supported-locales", Attributes::SupportedLocales::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "active-locale", Attributes::ActiveLocale::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>>( - Id, "supported-locales", Attributes::SupportedLocales::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + make_unique>(Id, "rx-err-fcs-count", 0, UINT32_MAX, Attributes::RxErrFcsCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // - make_unique(Id, "supported-locales", Attributes::SupportedLocales::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} -void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::TimeFormatLocalization; - - const char * clusterName = "TimeFormatLocalization"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // - make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // - make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "hour-format", 0, UINT8_MAX, Attributes::HourFormat::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( - Id, "active-calendar-type", 0, UINT8_MAX, Attributes::ActiveCalendarType::Id, WriteCommandType::kWrite, + make_unique>(Id, "rx-err-other-count", 0, UINT32_MAX, Attributes::RxErrOtherCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "active-timestamp", 0, UINT64_MAX, + Attributes::ActiveTimestamp::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "pending-timestamp", 0, UINT64_MAX, + Attributes::PendingTimestamp::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "delay", 0, UINT32_MAX, Attributes::Delay::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "security-policy", Attributes::SecurityPolicy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, WriteCommandType::kForceWrite, + chip::app::DataModel::List>>( + Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, @@ -13148,65 +16258,81 @@ void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuer make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // - make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // - make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} -void registerClusterUnitLocalization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::UnitLocalization; - - const char * clusterName = "UnitLocalization"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // + make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // + make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // + make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // + make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // + make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // + make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // + make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // + make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // + make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // + make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // + make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // + make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // + make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // + make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, + credsIssuerConfig), // + make_unique(Id, "better-partition-attach-attempt-count", + Attributes::BetterPartitionAttachAttemptCount::Id, credsIssuerConfig), // + make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, + credsIssuerConfig), // + make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, + credsIssuerConfig), // + make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // + make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // + make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // + make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // + make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // + make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // + make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, + credsIssuerConfig), // + make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13216,37 +16342,86 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PowerSourceConfiguration; + using namespace chip::app::Clusters::WiFiNetworkDiagnostics; - const char * clusterName = "PowerSourceConfiguration"; + const char * clusterName = "WiFiNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sources", Attributes::Sources::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "sources", Attributes::Sources::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // + make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // + make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // + make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // + make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // + make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // + make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "bssid", Attributes::Bssid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "security-type", 0, UINT8_MAX, Attributes::SecurityType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "wi-fi-version", 0, UINT8_MAX, Attributes::WiFiVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "channel-number", 0, UINT16_MAX, + Attributes::ChannelNumber::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "rssi", INT8_MIN, INT8_MAX, Attributes::Rssi::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "beacon-lost-count", 0, UINT32_MAX, + Attributes::BeaconLostCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "beacon-rx-count", 0, UINT32_MAX, + Attributes::BeaconRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-multicast-rx-count", 0, UINT32_MAX, + Attributes::PacketMulticastRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-multicast-tx-count", 0, UINT32_MAX, + Attributes::PacketMulticastTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-unicast-rx-count", 0, UINT32_MAX, + Attributes::PacketUnicastRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "packet-unicast-tx-count", 0, UINT32_MAX, + Attributes::PacketUnicastTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "current-max-rate", 0, UINT64_MAX, + Attributes::CurrentMaxRate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13259,161 +16434,94 @@ void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssu make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sources", Attributes::Sources::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // + make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // + make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // + make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // + make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // + make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // + make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, + credsIssuerConfig), // + make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, + credsIssuerConfig), // + make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // + make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // + make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // + make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // + make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PowerSource; + using namespace chip::app::Clusters::EthernetNetworkDiagnostics; - const char * clusterName = "PowerSource"; + const char * clusterName = "EthernetNetworkDiagnostics"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, - credsIssuerConfig), // - make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // - make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // - make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // - make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // - make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, - credsIssuerConfig), // - make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // - make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // - make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // - make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, - credsIssuerConfig), // - make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // - make_unique(Id, "endpoint-list", Attributes::EndpointList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "status", 0, UINT8_MAX, Attributes::Status::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "order", 0, UINT8_MAX, Attributes::Order::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-input-voltage", 0, UINT32_MAX, - Attributes::WiredAssessedInputVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-input-frequency", 0, UINT16_MAX, - Attributes::WiredAssessedInputFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "wired-current-type", 0, UINT8_MAX, Attributes::WiredCurrentType::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "wired-assessed-current", 0, UINT32_MAX, - Attributes::WiredAssessedCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-nominal-voltage", 0, UINT32_MAX, Attributes::WiredNominalVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-maximum-current", 0, UINT32_MAX, Attributes::WiredMaximumCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wired-present", 0, 1, Attributes::WiredPresent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "bat-voltage", 0, UINT32_MAX, Attributes::BatVoltage::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-percent-remaining", 0, UINT8_MAX, - Attributes::BatPercentRemaining::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-time-remaining", 0, UINT32_MAX, - Attributes::BatTimeRemaining::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-charge-level", 0, UINT8_MAX, Attributes::BatChargeLevel::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-replacement-needed", 0, 1, Attributes::BatReplacementNeeded::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-replaceability", 0, UINT8_MAX, Attributes::BatReplaceability::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-present", 0, 1, Attributes::BatPresent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-common-designation", 0, UINT16_MAX, Attributes::BatCommonDesignation::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-approved-chemistry", 0, UINT16_MAX, Attributes::BatApprovedChemistry::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "bat-capacity", 0, UINT32_MAX, Attributes::BatCapacity::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // + make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // + make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // + make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // + make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "phyrate", 0, UINT8_MAX, Attributes::PHYRate::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "full-duplex", 0, 1, Attributes::FullDuplex::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "packet-rx-count", 0, UINT64_MAX, Attributes::PacketRxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "packet-tx-count", 0, UINT64_MAX, Attributes::PacketTxCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "tx-err-count", 0, UINT64_MAX, Attributes::TxErrCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "collision-count", 0, UINT64_MAX, Attributes::CollisionCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "carrier-detect", 0, 1, Attributes::CarrierDetect::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "time-since-reset", 0, UINT64_MAX, Attributes::TimeSinceReset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-quantity", 0, UINT8_MAX, Attributes::BatQuantity::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "bat-charge-state", 0, UINT8_MAX, Attributes::BatChargeState::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "bat-time-to-full-charge", 0, UINT32_MAX, - Attributes::BatTimeToFullCharge::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-functional-while-charging", 0, 1, Attributes::BatFunctionalWhileCharging::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "bat-charging-current", 0, UINT32_MAX, - Attributes::BatChargingCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "endpoint-list", Attributes::EndpointList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13426,45 +16534,17 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-voltage", Attributes::WiredAssessedInputVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "wired-assessed-input-frequency", Attributes::WiredAssessedInputFrequency::Id, - credsIssuerConfig), // - make_unique(Id, "wired-current-type", Attributes::WiredCurrentType::Id, credsIssuerConfig), // - make_unique(Id, "wired-assessed-current", Attributes::WiredAssessedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-nominal-voltage", Attributes::WiredNominalVoltage::Id, credsIssuerConfig), // - make_unique(Id, "wired-maximum-current", Attributes::WiredMaximumCurrent::Id, credsIssuerConfig), // - make_unique(Id, "wired-present", Attributes::WiredPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-voltage", Attributes::BatVoltage::Id, credsIssuerConfig), // - make_unique(Id, "bat-percent-remaining", Attributes::BatPercentRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-remaining", Attributes::BatTimeRemaining::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-level", Attributes::BatChargeLevel::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-needed", Attributes::BatReplacementNeeded::Id, credsIssuerConfig), // - make_unique(Id, "bat-replaceability", Attributes::BatReplaceability::Id, credsIssuerConfig), // - make_unique(Id, "bat-present", Attributes::BatPresent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, credsIssuerConfig), // - make_unique(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, - credsIssuerConfig), // - make_unique(Id, "bat-common-designation", Attributes::BatCommonDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, credsIssuerConfig), // - make_unique(Id, "bat-approved-chemistry", Attributes::BatApprovedChemistry::Id, credsIssuerConfig), // - make_unique(Id, "bat-capacity", Attributes::BatCapacity::Id, credsIssuerConfig), // - make_unique(Id, "bat-quantity", Attributes::BatQuantity::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-state", Attributes::BatChargeState::Id, credsIssuerConfig), // - make_unique(Id, "bat-time-to-full-charge", Attributes::BatTimeToFullCharge::Id, credsIssuerConfig), // - make_unique(Id, "bat-functional-while-charging", Attributes::BatFunctionalWhileCharging::Id, - credsIssuerConfig), // - make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // - make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, - credsIssuerConfig), // - make_unique(Id, "endpoint-list", Attributes::EndpointList::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // + make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // + make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // + make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // + make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // + make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // + make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // + make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // + make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13474,61 +16554,81 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "wired-fault-change", Events::WiredFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-fault-change", Events::BatFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "bat-charge-fault-change", Events::BatChargeFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GeneralCommissioning; + using namespace chip::app::Clusters::TimeSynchronization; - const char * clusterName = "GeneralCommissioning"; + const char * clusterName = "TimeSynchronization"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // - make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, credsIssuerConfig), // - make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // - make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // - make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "breadcrumb", 0, UINT64_MAX, Attributes::Breadcrumb::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>( - Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "regulatory-config", 0, UINT8_MAX, Attributes::RegulatoryConfig::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "location-capability", 0, UINT8_MAX, Attributes::LocationCapability::Id, WriteCommandType::kForceWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>(Id, "utctime", 0, UINT64_MAX, Attributes::UTCTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "granularity", 0, UINT8_MAX, Attributes::Granularity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "time-source", 0, UINT8_MAX, Attributes::TimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "default-ntp", Attributes::DefaultNTP::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "time-zone", Attributes::TimeZone::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "dstoffset", Attributes::DSTOffset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "local-time", 0, UINT64_MAX, Attributes::LocalTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "time-zone-database", 0, UINT8_MAX, Attributes::TimeZoneDatabase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "supports-concurrent-connection", 0, 1, Attributes::SupportsConcurrentConnection::Id, + make_unique>(Id, "ntpserver-available", 0, 1, Attributes::NTPServerAvailable::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "time-zone-list-max-size", 0, UINT8_MAX, Attributes::TimeZoneListMaxSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "dstoffset-list-max-size", 0, UINT8_MAX, Attributes::DSTOffsetListMaxSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "supports-dnsresolve", 0, 1, Attributes::SupportsDNSResolve::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, @@ -13542,98 +16642,117 @@ void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCo make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // - make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, - credsIssuerConfig), // - make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // - make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // - make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // + make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // + make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // + make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // + make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // + make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // + make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // + make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // + make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // + make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterBridgedDeviceBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::NetworkCommissioning; + using namespace chip::app::Clusters::BridgedDeviceBasicInformation; - const char * clusterName = "NetworkCommissioning"; + const char * clusterName = "BridgedDeviceBasicInformation"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // - make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // - make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // - make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // - make_unique(Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, credsIssuerConfig), // - make_unique(Id, "supported-thread-features", Attributes::SupportedThreadFeatures::Id, credsIssuerConfig), // - make_unique(Id, "thread-version", Attributes::ThreadVersion::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "max-networks", 0, UINT8_MAX, Attributes::MaxNetworks::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "networks", Attributes::Networks::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "scan-max-time-seconds", 0, UINT8_MAX, Attributes::ScanMaxTimeSeconds::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "connect-max-time-seconds", 0, UINT8_MAX, Attributes::ConnectMaxTimeSeconds::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "interface-enabled", 0, 1, Attributes::InterfaceEnabled::Id, WriteCommandType::kWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "product-label", Attributes::ProductLabel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "last-networking-status", 0, UINT8_MAX, Attributes::LastNetworkingStatus::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "last-network-id", Attributes::LastNetworkID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "last-connect-error-value", INT32_MIN, INT32_MAX, - Attributes::LastConnectErrorValue::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique< - WriteAttributeAsComplex>>( - Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "supported-thread-features", 0, UINT16_MAX, Attributes::SupportedThreadFeatures::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "thread-version", 0, UINT16_MAX, Attributes::ThreadVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + WriteAttributeAsComplex>( + Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13646,53 +16765,65 @@ void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCo make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, - credsIssuerConfig), // - make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // - make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // - make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // - make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, - credsIssuerConfig), // - make_unique(Id, "supported-wi-fi-bands", Attributes::SupportedWiFiBands::Id, credsIssuerConfig), // - make_unique(Id, "supported-thread-features", Attributes::SupportedThreadFeatures::Id, - credsIssuerConfig), // - make_unique(Id, "thread-version", Attributes::ThreadVersion::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // + make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // + make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // + make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::DiagnosticLogs; + using namespace chip::app::Clusters::Switch; - const char * clusterName = "DiagnosticLogs"; + const char * clusterName = "Switch"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // + make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-max", Attributes::MultiPressMax::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13700,6 +16831,12 @@ void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "number-of-positions", 0, UINT8_MAX, Attributes::NumberOfPositions::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-position", 0, UINT8_MAX, Attributes::CurrentPosition::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "multi-press-max", 0, UINT8_MAX, Attributes::MultiPressMax::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13714,6 +16851,9 @@ void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // + make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-max", Attributes::MultiPressMax::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13723,69 +16863,62 @@ void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // + make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // + make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // + make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // + make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // + make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // + make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // + make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // + make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // + make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterAdministratorCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GeneralDiagnostics; + using namespace chip::app::Clusters::AdministratorCommissioning; - const char * clusterName = "GeneralDiagnostics"; + const char * clusterName = "AdministratorCommissioning"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // - make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // - make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // - make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // - make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // - make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "network-interfaces", Attributes::NetworkInterfaces::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "reboot-count", 0, UINT16_MAX, Attributes::RebootCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "up-time", 0, UINT64_MAX, Attributes::UpTime::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "total-operational-hours", 0, UINT32_MAX, Attributes::TotalOperationalHours::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "boot-reason", 0, UINT8_MAX, Attributes::BootReason::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, WriteCommandType::kForceWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // + make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // + make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "window-status", 0, UINT8_MAX, Attributes::WindowStatus::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "admin-fabric-index", 0, UINT8_MAX, Attributes::AdminFabricIndex::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "admin-vendor-id", 0, UINT16_MAX, Attributes::AdminVendorId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "test-event-triggers-enabled", 0, 1, Attributes::TestEventTriggersEnabled::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13798,18 +16931,11 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // - make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // - make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // - make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Attributes::BootReason::Id, credsIssuerConfig), // - make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // - make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // + make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // + make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13819,58 +16945,63 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-change", Events::HardwareFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "radio-fault-change", Events::RadioFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // - make_unique(Id, "boot-reason", Events::BootReason::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOperationalCredentials(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::SoftwareDiagnostics; + using namespace chip::app::Clusters::OperationalCredentials; - const char * clusterName = "SoftwareDiagnostics"; + const char * clusterName = "OperationalCredentials"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // + make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // + make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, credsIssuerConfig), // + make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( - Id, "thread-metrics", Attributes::ThreadMetrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-free", 0, UINT64_MAX, Attributes::CurrentHeapFree::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-used", 0, UINT64_MAX, Attributes::CurrentHeapUsed::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-heap-high-watermark", 0, UINT64_MAX, - Attributes::CurrentHeapHighWatermark::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "nocs", Attributes::NOCs::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "fabrics", Attributes::Fabrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "supported-fabrics", 0, UINT8_MAX, Attributes::SupportedFabrics::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "commissioned-fabrics", 0, UINT8_MAX, Attributes::CommissionedFabrics::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "current-fabric-index", 0, UINT8_MAX, Attributes::CurrentFabricIndex::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13883,13 +17014,15 @@ void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCom make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-used", Attributes::CurrentHeapUsed::Id, credsIssuerConfig), // - make_unique(Id, "current-heap-high-watermark", Attributes::CurrentHeapHighWatermark::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // + make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // + make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // + make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, credsIssuerConfig), // + make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13899,253 +17032,52 @@ void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCom // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "software-fault", Events::SoftwareFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ThreadNetworkDiagnostics; + using namespace chip::app::Clusters::GroupKeyManagement; - const char * clusterName = "ThreadNetworkDiagnostics"; + const char * clusterName = "GroupKeyManagement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // - make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // - make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // - make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // - make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // - make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // - make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // - make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // - make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // - make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // - make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // - make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // - make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "better-partition-attach-attempt-count", Attributes::BetterPartitionAttachAttemptCount::Id, - credsIssuerConfig), // - make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // - make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // - make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // - make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, - credsIssuerConfig), // - make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>(Id, "channel", 0, UINT16_MAX, Attributes::Channel::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "routing-role", 0, UINT8_MAX, Attributes::RoutingRole::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "network-name", Attributes::NetworkName::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "pan-id", 0, UINT16_MAX, Attributes::PanId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "extended-pan-id", 0, UINT64_MAX, - Attributes::ExtendedPanId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // + make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // + make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( - Id, "neighbor-table", Attributes::NeighborTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "group-key-map", Attributes::GroupKeyMap::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( - Id, "route-table", Attributes::RouteTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "partition-id", 0, UINT32_MAX, Attributes::PartitionId::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "weighting", 0, UINT16_MAX, Attributes::Weighting::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "data-version", 0, UINT16_MAX, Attributes::DataVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "stable-data-version", 0, UINT16_MAX, - Attributes::StableDataVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "leader-router-id", 0, UINT8_MAX, - Attributes::LeaderRouterId::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "detached-role-count", 0, UINT16_MAX, Attributes::DetachedRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "child-role-count", 0, UINT16_MAX, Attributes::ChildRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "router-role-count", 0, UINT16_MAX, Attributes::RouterRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "leader-role-count", 0, UINT16_MAX, Attributes::LeaderRoleCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "attach-attempt-count", 0, UINT16_MAX, Attributes::AttachAttemptCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "partition-id-change-count", 0, UINT16_MAX, - Attributes::PartitionIdChangeCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "better-partition-attach-attempt-count", 0, UINT16_MAX, - Attributes::BetterPartitionAttachAttemptCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "parent-change-count", 0, UINT16_MAX, Attributes::ParentChangeCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-total-count", 0, UINT32_MAX, Attributes::TxTotalCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-unicast-count", 0, UINT32_MAX, Attributes::TxUnicastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-broadcast-count", 0, UINT32_MAX, Attributes::TxBroadcastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-ack-requested-count", 0, UINT32_MAX, Attributes::TxAckRequestedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-acked-count", 0, UINT32_MAX, Attributes::TxAckedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-no-ack-requested-count", 0, UINT32_MAX, Attributes::TxNoAckRequestedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-data-count", 0, UINT32_MAX, Attributes::TxDataCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-data-poll-count", 0, UINT32_MAX, Attributes::TxDataPollCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-beacon-count", 0, UINT32_MAX, Attributes::TxBeaconCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-beacon-request-count", 0, UINT32_MAX, Attributes::TxBeaconRequestCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-other-count", 0, UINT32_MAX, Attributes::TxOtherCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-retry-count", 0, UINT32_MAX, Attributes::TxRetryCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-direct-max-retry-expiry-count", 0, UINT32_MAX, - Attributes::TxDirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "tx-indirect-max-retry-expiry-count", 0, UINT32_MAX, - Attributes::TxIndirectMaxRetryExpiryCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "tx-err-cca-count", 0, UINT32_MAX, Attributes::TxErrCcaCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-abort-count", 0, UINT32_MAX, Attributes::TxErrAbortCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-busy-channel-count", 0, UINT32_MAX, Attributes::TxErrBusyChannelCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-total-count", 0, UINT32_MAX, Attributes::RxTotalCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-unicast-count", 0, UINT32_MAX, Attributes::RxUnicastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-broadcast-count", 0, UINT32_MAX, Attributes::RxBroadcastCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-data-count", 0, UINT32_MAX, Attributes::RxDataCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-data-poll-count", 0, UINT32_MAX, Attributes::RxDataPollCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-beacon-count", 0, UINT32_MAX, Attributes::RxBeaconCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-beacon-request-count", 0, UINT32_MAX, Attributes::RxBeaconRequestCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-other-count", 0, UINT32_MAX, Attributes::RxOtherCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-address-filtered-count", 0, UINT32_MAX, - Attributes::RxAddressFilteredCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-dest-addr-filtered-count", 0, UINT32_MAX, - Attributes::RxDestAddrFilteredCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-duplicated-count", 0, UINT32_MAX, Attributes::RxDuplicatedCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-no-frame-count", 0, UINT32_MAX, Attributes::RxErrNoFrameCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-unknown-neighbor-count", 0, UINT32_MAX, - Attributes::RxErrUnknownNeighborCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-err-invalid-src-addr-count", 0, UINT32_MAX, - Attributes::RxErrInvalidSrcAddrCount::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rx-err-sec-count", 0, UINT32_MAX, Attributes::RxErrSecCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-fcs-count", 0, UINT32_MAX, Attributes::RxErrFcsCount::Id, + chip::app::DataModel::List>>( + Id, "group-table", Attributes::GroupTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-groups-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupsPerFabric::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rx-err-other-count", 0, UINT32_MAX, Attributes::RxErrOtherCount::Id, + make_unique>(Id, "max-group-keys-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupKeysPerFabric::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "active-timestamp", 0, UINT64_MAX, - Attributes::ActiveTimestamp::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "pending-timestamp", 0, UINT64_MAX, - Attributes::PendingTimestamp::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "delay", 0, UINT32_MAX, Attributes::Delay::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "security-policy", Attributes::SecurityPolicy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14158,82 +17090,12 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssu make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // - make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // - make_unique(Id, "network-name", Attributes::NetworkName::Id, credsIssuerConfig), // - make_unique(Id, "pan-id", Attributes::PanId::Id, credsIssuerConfig), // - make_unique(Id, "extended-pan-id", Attributes::ExtendedPanId::Id, credsIssuerConfig), // - make_unique(Id, "mesh-local-prefix", Attributes::MeshLocalPrefix::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "neighbor-table", Attributes::NeighborTable::Id, credsIssuerConfig), // - make_unique(Id, "route-table", Attributes::RouteTable::Id, credsIssuerConfig), // - make_unique(Id, "partition-id", Attributes::PartitionId::Id, credsIssuerConfig), // - make_unique(Id, "weighting", Attributes::Weighting::Id, credsIssuerConfig), // - make_unique(Id, "data-version", Attributes::DataVersion::Id, credsIssuerConfig), // - make_unique(Id, "stable-data-version", Attributes::StableDataVersion::Id, credsIssuerConfig), // - make_unique(Id, "leader-router-id", Attributes::LeaderRouterId::Id, credsIssuerConfig), // - make_unique(Id, "detached-role-count", Attributes::DetachedRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "child-role-count", Attributes::ChildRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "router-role-count", Attributes::RouterRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "leader-role-count", Attributes::LeaderRoleCount::Id, credsIssuerConfig), // - make_unique(Id, "attach-attempt-count", Attributes::AttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "partition-id-change-count", Attributes::PartitionIdChangeCount::Id, - credsIssuerConfig), // - make_unique(Id, "better-partition-attach-attempt-count", - Attributes::BetterPartitionAttachAttemptCount::Id, credsIssuerConfig), // - make_unique(Id, "parent-change-count", Attributes::ParentChangeCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-total-count", Attributes::TxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-unicast-count", Attributes::TxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-broadcast-count", Attributes::TxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-ack-requested-count", Attributes::TxAckRequestedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-acked-count", Attributes::TxAckedCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-no-ack-requested-count", Attributes::TxNoAckRequestedCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-data-count", Attributes::TxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-data-poll-count", Attributes::TxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-count", Attributes::TxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-beacon-request-count", Attributes::TxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-other-count", Attributes::TxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-retry-count", Attributes::TxRetryCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-direct-max-retry-expiry-count", Attributes::TxDirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-indirect-max-retry-expiry-count", Attributes::TxIndirectMaxRetryExpiryCount::Id, - credsIssuerConfig), // - make_unique(Id, "tx-err-cca-count", Attributes::TxErrCcaCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-abort-count", Attributes::TxErrAbortCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-busy-channel-count", Attributes::TxErrBusyChannelCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-total-count", Attributes::RxTotalCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-unicast-count", Attributes::RxUnicastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-broadcast-count", Attributes::RxBroadcastCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-count", Attributes::RxDataCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-data-poll-count", Attributes::RxDataPollCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-count", Attributes::RxBeaconCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-beacon-request-count", Attributes::RxBeaconRequestCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-other-count", Attributes::RxOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-address-filtered-count", Attributes::RxAddressFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-dest-addr-filtered-count", Attributes::RxDestAddrFilteredCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-duplicated-count", Attributes::RxDuplicatedCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-no-frame-count", Attributes::RxErrNoFrameCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-unknown-neighbor-count", Attributes::RxErrUnknownNeighborCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-invalid-src-addr-count", Attributes::RxErrInvalidSrcAddrCount::Id, - credsIssuerConfig), // - make_unique(Id, "rx-err-sec-count", Attributes::RxErrSecCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-fcs-count", Attributes::RxErrFcsCount::Id, credsIssuerConfig), // - make_unique(Id, "rx-err-other-count", Attributes::RxErrOtherCount::Id, credsIssuerConfig), // - make_unique(Id, "active-timestamp", Attributes::ActiveTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "pending-timestamp", Attributes::PendingTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "delay", Attributes::Delay::Id, credsIssuerConfig), // - make_unique(Id, "security-policy", Attributes::SecurityPolicy::Id, credsIssuerConfig), // - make_unique(Id, "channel-page0mask", Attributes::ChannelPage0Mask::Id, credsIssuerConfig), // - make_unique(Id, "operational-dataset-components", Attributes::OperationalDatasetComponents::Id, - credsIssuerConfig), // - make_unique(Id, "active-network-faults-list", Attributes::ActiveNetworkFaultsList::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // + make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // + make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -14244,86 +17106,94 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssu // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, "network-fault-change", Events::NetworkFaultChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::FixedLabel; + + const char * clusterName = "FixedLabel"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::WiFiNetworkDiagnostics; + using namespace chip::app::Clusters::UserLabel; - const char * clusterName = "WiFiNetworkDiagnostics"; + const char * clusterName = "UserLabel"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // - make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // - make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // - make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // - make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // - make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // - make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "bssid", Attributes::Bssid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "security-type", 0, UINT8_MAX, Attributes::SecurityType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "wi-fi-version", 0, UINT8_MAX, Attributes::WiFiVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "channel-number", 0, UINT16_MAX, - Attributes::ChannelNumber::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "rssi", INT8_MIN, INT8_MAX, Attributes::Rssi::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "beacon-lost-count", 0, UINT32_MAX, - Attributes::BeaconLostCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "beacon-rx-count", 0, UINT32_MAX, - Attributes::BeaconRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-multicast-rx-count", 0, UINT32_MAX, - Attributes::PacketMulticastRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-multicast-tx-count", 0, UINT32_MAX, - Attributes::PacketMulticastTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-unicast-rx-count", 0, UINT32_MAX, - Attributes::PacketUnicastRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "packet-unicast-tx-count", 0, UINT32_MAX, - Attributes::PacketUnicastTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "current-max-rate", 0, UINT64_MAX, - Attributes::CurrentMaxRate::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14336,69 +17206,39 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuer make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // - make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // - make_unique(Id, "wi-fi-version", Attributes::WiFiVersion::Id, credsIssuerConfig), // - make_unique(Id, "channel-number", Attributes::ChannelNumber::Id, credsIssuerConfig), // - make_unique(Id, "rssi", Attributes::Rssi::Id, credsIssuerConfig), // - make_unique(Id, "beacon-lost-count", Attributes::BeaconLostCount::Id, credsIssuerConfig), // - make_unique(Id, "beacon-rx-count", Attributes::BeaconRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-multicast-rx-count", Attributes::PacketMulticastRxCount::Id, - credsIssuerConfig), // - make_unique(Id, "packet-multicast-tx-count", Attributes::PacketMulticastTxCount::Id, - credsIssuerConfig), // - make_unique(Id, "packet-unicast-rx-count", Attributes::PacketUnicastRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-unicast-tx-count", Attributes::PacketUnicastTxCount::Id, credsIssuerConfig), // - make_unique(Id, "current-max-rate", Attributes::CurrentMaxRate::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // - make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "disconnection", Events::Disconnection::Id, credsIssuerConfig), // - make_unique(Id, "association-failure", Events::AssociationFailure::Id, credsIssuerConfig), // - make_unique(Id, "connection-status", Events::ConnectionStatus::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::EthernetNetworkDiagnostics; + using namespace chip::app::Clusters::ProxyConfiguration; - const char * clusterName = "EthernetNetworkDiagnostics"; + const char * clusterName = "ProxyConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // - make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // - make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // - make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // - make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14406,24 +17246,6 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "phyrate", 0, UINT8_MAX, Attributes::PHYRate::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "full-duplex", 0, 1, Attributes::FullDuplex::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "packet-rx-count", 0, UINT64_MAX, Attributes::PacketRxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "packet-tx-count", 0, UINT64_MAX, Attributes::PacketTxCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "tx-err-count", 0, UINT64_MAX, Attributes::TxErrCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "collision-count", 0, UINT64_MAX, Attributes::CollisionCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "overrun-count", 0, UINT64_MAX, Attributes::OverrunCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "carrier-detect", 0, 1, Attributes::CarrierDetect::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "time-since-reset", 0, UINT64_MAX, Attributes::TimeSinceReset::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14438,15 +17260,6 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // - make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // - make_unique(Id, "packet-rx-count", Attributes::PacketRxCount::Id, credsIssuerConfig), // - make_unique(Id, "packet-tx-count", Attributes::PacketTxCount::Id, credsIssuerConfig), // - make_unique(Id, "tx-err-count", Attributes::TxErrCount::Id, credsIssuerConfig), // - make_unique(Id, "collision-count", Attributes::CollisionCount::Id, credsIssuerConfig), // - make_unique(Id, "overrun-count", Attributes::OverrunCount::Id, credsIssuerConfig), // - make_unique(Id, "carrier-detect", Attributes::CarrierDetect::Id, credsIssuerConfig), // - make_unique(Id, "time-since-reset", Attributes::TimeSinceReset::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14462,76 +17275,28 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::TimeSynchronization; + using namespace chip::app::Clusters::ProxyDiscovery; - const char * clusterName = "TimeSynchronization"; + const char * clusterName = "ProxyDiscovery"; commands_list clusterCommands = { // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // - make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // - make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // - make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // - make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // - make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // - make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>(Id, "utctime", 0, UINT64_MAX, Attributes::UTCTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "granularity", 0, UINT8_MAX, Attributes::Granularity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "time-source", 0, UINT8_MAX, Attributes::TimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "default-ntp", Attributes::DefaultNTP::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "time-zone", Attributes::TimeZone::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "dstoffset", Attributes::DSTOffset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "local-time", 0, UINT64_MAX, Attributes::LocalTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "time-zone-database", 0, UINT8_MAX, Attributes::TimeZoneDatabase::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "ntpserver-available", 0, 1, Attributes::NTPServerAvailable::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "time-zone-list-max-size", 0, UINT8_MAX, Attributes::TimeZoneListMaxSize::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dstoffset-list-max-size", 0, UINT8_MAX, Attributes::DSTOffsetListMaxSize::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "supports-dnsresolve", 0, 1, Attributes::SupportsDNSResolve::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + // Commands + // + make_unique(Id, credsIssuerConfig), // + // + // Attributes + // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14544,51 +17309,28 @@ void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCom make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "utctime", Attributes::UTCTime::Id, credsIssuerConfig), // - make_unique(Id, "granularity", Attributes::Granularity::Id, credsIssuerConfig), // - make_unique(Id, "time-source", Attributes::TimeSource::Id, credsIssuerConfig), // - make_unique(Id, "trusted-time-source", Attributes::TrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, "default-ntp", Attributes::DefaultNTP::Id, credsIssuerConfig), // - make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset", Attributes::DSTOffset::Id, credsIssuerConfig), // - make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-database", Attributes::TimeZoneDatabase::Id, credsIssuerConfig), // - make_unique(Id, "ntpserver-available", Attributes::NTPServerAvailable::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-list-max-size", Attributes::TimeZoneListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "dstoffset-list-max-size", Attributes::DSTOffsetListMaxSize::Id, credsIssuerConfig), // - make_unique(Id, "supports-dnsresolve", Attributes::SupportsDNSResolve::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // - make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // - make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "dsttable-empty", Events::DSTTableEmpty::Id, credsIssuerConfig), // - make_unique(Id, "dststatus", Events::DSTStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-zone-status", Events::TimeZoneStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-failure", Events::TimeFailure::Id, credsIssuerConfig), // - make_unique(Id, "missing-trusted-time-source", Events::MissingTrustedTimeSource::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBridgedDeviceBasicInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BridgedDeviceBasicInformation; + using namespace chip::app::Clusters::ProxyValid; - const char * clusterName = "BridgedDeviceBasicInformation"; + const char * clusterName = "ProxyValid"; commands_list clusterCommands = { // @@ -14598,63 +17340,14 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "vendor-name", Attributes::VendorName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorID::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "product-name", Attributes::ProductName::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "node-label", Attributes::NodeLabel::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "hardware-version", 0, UINT16_MAX, Attributes::HardwareVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version", 0, UINT32_MAX, Attributes::SoftwareVersion::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "software-version-string", Attributes::SoftwareVersionString::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "part-number", Attributes::PartNumber::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-url", Attributes::ProductURL::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "product-label", Attributes::ProductLabel::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "serial-number", Attributes::SerialNumber::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "reachable", 0, 1, Attributes::Reachable::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>( - Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14667,52 +17360,28 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "product-appearance", Attributes::ProductAppearance::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "start-up", Events::StartUp::Id, credsIssuerConfig), // - make_unique(Id, "shut-down", Events::ShutDown::Id, credsIssuerConfig), // - make_unique(Id, "leave", Events::Leave::Id, credsIssuerConfig), // - make_unique(Id, "reachable-changed", Events::ReachableChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::Switch; + using namespace chip::app::Clusters::BooleanState; - const char * clusterName = "Switch"; + const char * clusterName = "BooleanState"; commands_list clusterCommands = { // @@ -14723,9 +17392,7 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // - make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // + make_unique(Id, "state-value", Attributes::StateValue::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14733,12 +17400,8 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "number-of-positions", 0, UINT8_MAX, Attributes::NumberOfPositions::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-position", 0, UINT8_MAX, Attributes::CurrentPosition::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "multi-press-max", 0, UINT8_MAX, Attributes::MultiPressMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "state-value", 0, 1, Attributes::StateValue::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14753,9 +17416,7 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // - make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-max", Attributes::MultiPressMax::Id, credsIssuerConfig), // + make_unique(Id, "state-value", Attributes::StateValue::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14765,47 +17426,43 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // - make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // - make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // - make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // - make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-latched", Events::SwitchLatched::Id, credsIssuerConfig), // - make_unique(Id, "initial-press", Events::InitialPress::Id, credsIssuerConfig), // - make_unique(Id, "long-press", Events::LongPress::Id, credsIssuerConfig), // - make_unique(Id, "short-release", Events::ShortRelease::Id, credsIssuerConfig), // - make_unique(Id, "long-release", Events::LongRelease::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-ongoing", Events::MultiPressOngoing::Id, credsIssuerConfig), // - make_unique(Id, "multi-press-complete", Events::MultiPressComplete::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterAdministratorCommissioning(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::AdministratorCommissioning; + using namespace chip::app::Clusters::IcdManagement; - const char * clusterName = "AdministratorCommissioning"; + const char * clusterName = "IcdManagement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // - make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // - make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-duration", Attributes::IdleModeDuration::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-duration", Attributes::ActiveModeDuration::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // + make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-instruction", Attributes::UserActiveModeTriggerInstruction::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14813,14 +17470,26 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "window-status", 0, UINT8_MAX, Attributes::WindowStatus::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "admin-fabric-index", 0, UINT8_MAX, Attributes::AdminFabricIndex::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "admin-vendor-id", 0, UINT16_MAX, Attributes::AdminVendorId::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique>(Id, "idle-mode-duration", 0, UINT32_MAX, Attributes::IdleModeDuration::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "active-mode-duration", 0, UINT32_MAX, Attributes::ActiveModeDuration::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "active-mode-threshold", 0, UINT16_MAX, Attributes::ActiveModeThreshold::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "registered-clients", Attributes::RegisteredClients::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "icdcounter", 0, UINT32_MAX, Attributes::ICDCounter::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "clients-supported-per-fabric", 0, UINT16_MAX, + Attributes::ClientsSupportedPerFabric::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "user-active-mode-trigger-hint", 0, UINT32_MAX, Attributes::UserActiveModeTriggerHint::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "user-active-mode-trigger-instruction", + Attributes::UserActiveModeTriggerInstruction::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14833,11 +17502,19 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // - make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // - make_unique(Id, "admin-vendor-id", Attributes::AdminVendorId::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-duration", Attributes::IdleModeDuration::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-duration", Attributes::ActiveModeDuration::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // + make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-instruction", + Attributes::UserActiveModeTriggerInstruction::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14853,57 +17530,41 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOperationalCredentials(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterTimer(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OperationalCredentials; + using namespace chip::app::Clusters::Timer; - const char * clusterName = "OperationalCredentials"; + const char * clusterName = "Timer"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(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), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // - make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // - make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "nocs", Attributes::NOCs::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "fabrics", Attributes::Fabrics::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "supported-fabrics", 0, UINT8_MAX, Attributes::SupportedFabrics::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "commissioned-fabrics", 0, UINT8_MAX, Attributes::CommissionedFabrics::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "current-fabric-index", 0, UINT8_MAX, Attributes::CurrentFabricIndex::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "set-time", Attributes::SetTime::Id, credsIssuerConfig), // + make_unique(Id, "time-remaining", Attributes::TimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "timer-state", Attributes::TimerState::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "set-time", 0, UINT32_MAX, Attributes::SetTime::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "time-remaining", 0, UINT32_MAX, Attributes::TimeRemaining::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "timer-state", 0, UINT8_MAX, Attributes::TimerState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14916,15 +17577,11 @@ void registerClusterOperationalCredentials(Commands & commands, CredentialIssuer make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // - make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // - make_unique(Id, "supported-fabrics", Attributes::SupportedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "commissioned-fabrics", Attributes::CommissionedFabrics::Id, credsIssuerConfig), // - make_unique(Id, "trusted-root-certificates", Attributes::TrustedRootCertificates::Id, - credsIssuerConfig), // - make_unique(Id, "current-fabric-index", Attributes::CurrentFabricIndex::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "set-time", Attributes::SetTime::Id, credsIssuerConfig), // + make_unique(Id, "time-remaining", Attributes::TimeRemaining::Id, credsIssuerConfig), // + make_unique(Id, "timer-state", Attributes::TimerState::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14940,46 +17597,54 @@ void registerClusterOperationalCredentials(Commands & commands, CredentialIssuer commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOvenCavityOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::GroupKeyManagement; + using namespace chip::app::Clusters::OvenCavityOperationalState; - const char * clusterName = "GroupKeyManagement"; + const char * clusterName = "OvenCavityOperationalState"; commands_list clusterCommands = { // // Commands // - make_unique(Id, 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), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // - make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // - make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // - make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "group-key-map", Attributes::GroupKeyMap::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "group-table", Attributes::GroupTable::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-groups-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupsPerFabric::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-group-keys-per-fabric", 0, UINT16_MAX, Attributes::MaxGroupKeysPerFabric::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>>( + Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "countdown-time", 0, UINT32_MAX, + Attributes::CountdownTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14992,13 +17657,14 @@ void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerComm make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // - make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // - make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // - make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15008,28 +17674,36 @@ void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerComm // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOvenMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::FixedLabel; + using namespace chip::app::Clusters::OvenMode; - const char * clusterName = "FixedLabel"; + const char * clusterName = "OvenMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15037,9 +17711,15 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15054,7 +17734,10 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15070,11 +17753,11 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryDryerControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::UserLabel; + using namespace chip::app::Clusters::LaundryDryerControls; - const char * clusterName = "UserLabel"; + const char * clusterName = "LaundryDryerControls"; commands_list clusterCommands = { // @@ -15084,18 +17767,23 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-dryness-levels", Attributes::SupportedDrynessLevels::Id, credsIssuerConfig), // + make_unique(Id, "selected-dryness-level", Attributes::SelectedDrynessLevel::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique< - WriteAttributeAsComplex>>( - Id, "label-list", Attributes::LabelList::Id, WriteCommandType::kWrite, credsIssuerConfig), // + WriteAttributeAsComplex>>( + Id, "supported-dryness-levels", Attributes::SupportedDrynessLevels::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "selected-dryness-level", 0, UINT8_MAX, Attributes::SelectedDrynessLevel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15108,9 +17796,11 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-dryness-levels", Attributes::SupportedDrynessLevels::Id, + credsIssuerConfig), // + make_unique(Id, "selected-dryness-level", Attributes::SelectedDrynessLevel::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15126,21 +17816,28 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyConfiguration; + using namespace chip::app::Clusters::ModeSelect; - const char * clusterName = "ProxyConfiguration"; + const char * clusterName = "ModeSelect"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15148,6 +17845,20 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>(Id, "standard-namespace", 0, UINT16_MAX, + Attributes::StandardNamespace::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15162,6 +17873,12 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15177,21 +17894,26 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyDiscovery; + using namespace chip::app::Clusters::LaundryWasherMode; - const char * clusterName = "ProxyDiscovery"; + const char * clusterName = "LaundryWasherMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15199,6 +17921,15 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15213,6 +17944,10 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15228,21 +17963,27 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & commands, + CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ProxyValid; + using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; - const char * clusterName = "ProxyValid"; + const char * clusterName = "RefrigeratorAndTemperatureControlledCabinetMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15250,6 +17991,15 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15264,6 +18014,10 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15279,11 +18033,11 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BooleanState; + using namespace chip::app::Clusters::LaundryWasherControls; - const char * clusterName = "BooleanState"; + const char * clusterName = "LaundryWasherControls"; commands_list clusterCommands = { // @@ -15294,7 +18048,10 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // + make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // + make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15302,8 +18059,16 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "state-value", 0, 1, Attributes::StateValue::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique>>( + Id, "spin-speeds", Attributes::SpinSpeeds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "spin-speed-current", 0, UINT8_MAX, + Attributes::SpinSpeedCurrent::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "number-of-rinses", 0, UINT8_MAX, Attributes::NumberOfRinses::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-rinses", Attributes::SupportedRinses::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15318,7 +18083,10 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // + make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // + make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15328,43 +18096,31 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "state-change", Events::StateChange::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::IcdManagement; + using namespace chip::app::Clusters::RvcRunMode; - const char * clusterName = "IcdManagement"; + const char * clusterName = "RvcRunMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-duration", Attributes::IdleModeDuration::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-duration", Attributes::ActiveModeDuration::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // - make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, - credsIssuerConfig), // - make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, - credsIssuerConfig), // - make_unique(Id, "user-active-mode-trigger-instruction", Attributes::UserActiveModeTriggerInstruction::Id, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15372,26 +18128,13 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "idle-mode-duration", 0, UINT32_MAX, Attributes::IdleModeDuration::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-mode-duration", 0, UINT32_MAX, Attributes::ActiveModeDuration::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-mode-threshold", 0, UINT16_MAX, Attributes::ActiveModeThreshold::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "registered-clients", Attributes::RegisteredClients::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "icdcounter", 0, UINT32_MAX, Attributes::ICDCounter::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "clients-supported-per-fabric", 0, UINT16_MAX, - Attributes::ClientsSupportedPerFabric::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "user-active-mode-trigger-hint", 0, UINT32_MAX, Attributes::UserActiveModeTriggerHint::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "user-active-mode-trigger-instruction", - Attributes::UserActiveModeTriggerInstruction::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::List>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15404,19 +18147,11 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-duration", Attributes::IdleModeDuration::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-duration", Attributes::ActiveModeDuration::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // - make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, - credsIssuerConfig), // - make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, - credsIssuerConfig), // - make_unique(Id, "user-active-mode-trigger-instruction", - Attributes::UserActiveModeTriggerInstruction::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15432,31 +18167,25 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOvenOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OvenOperationalState; + using namespace chip::app::Clusters::RvcCleanMode; - const char * clusterName = "OvenOperationalState"; + const char * clusterName = "RvcCleanMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15464,21 +18193,13 @@ void registerClusterOvenOperationalState(Commands & commands, CredentialIssuerCo make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>>( - Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "countdown-time", 0, UINT32_MAX, - Attributes::CountdownTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, + chip::app::DataModel::List>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15493,12 +18214,9 @@ void registerClusterOvenOperationalState(Commands & commands, CredentialIssuerCo make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15508,59 +18226,57 @@ void registerClusterOvenOperationalState(Commands & commands, CredentialIssuerCo // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterTemperatureControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ModeSelect; + using namespace chip::app::Clusters::TemperatureControl; - const char * clusterName = "ModeSelect"; + const char * clusterName = "TemperatureControl"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "temperature-setpoint", Attributes::TemperatureSetpoint::Id, credsIssuerConfig), // + make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // + make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // + make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, + credsIssuerConfig), // + make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>(Id, "standard-namespace", 0, UINT16_MAX, - Attributes::StandardNamespace::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "temperature-setpoint", INT16_MIN, INT16_MAX, Attributes::TemperatureSetpoint::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "min-temperature", INT16_MIN, INT16_MAX, Attributes::MinTemperature::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-temperature", INT16_MIN, INT16_MAX, Attributes::MaxTemperature::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "step", INT16_MIN, INT16_MAX, Attributes::Step::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "selected-temperature-level", 0, UINT8_MAX, + Attributes::SelectedTemperatureLevel::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15573,14 +18289,16 @@ void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "temperature-setpoint", Attributes::TemperatureSetpoint::Id, credsIssuerConfig), // + make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // + make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // + make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, + credsIssuerConfig), // + make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15596,26 +18314,24 @@ void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * c commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::LaundryWasherMode; + using namespace chip::app::Clusters::RefrigeratorAlarm; - const char * clusterName = "LaundryWasherMode"; + const char * clusterName = "RefrigeratorAlarm"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15623,15 +18339,12 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported", 0, UINT32_MAX, Attributes::Supported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15646,10 +18359,9 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15659,25 +18371,26 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & commands, - CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; + using namespace chip::app::Clusters::DishwasherMode; - const char * clusterName = "RefrigeratorAndTemperatureControlledCabinetMode"; + const char * clusterName = "DishwasherMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -15693,8 +18406,8 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15735,11 +18448,11 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::LaundryWasherControls; + using namespace chip::app::Clusters::AirQuality; - const char * clusterName = "LaundryWasherControls"; + const char * clusterName = "AirQuality"; commands_list clusterCommands = { // @@ -15750,10 +18463,7 @@ void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerC // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // - make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // + make_unique(Id, "air-quality", Attributes::AirQuality::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15761,16 +18471,8 @@ void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerC make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "spin-speeds", Attributes::SpinSpeeds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "spin-speed-current", 0, UINT8_MAX, - Attributes::SpinSpeedCurrent::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( - Id, "number-of-rinses", 0, UINT8_MAX, Attributes::NumberOfRinses::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "supported-rinses", Attributes::SupportedRinses::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "air-quality", 0, UINT8_MAX, Attributes::AirQuality::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15785,10 +18487,7 @@ void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerC make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // - make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // + make_unique(Id, "air-quality", Attributes::AirQuality::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15804,39 +18503,74 @@ void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerC commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterSmokeCoAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::RvcRunMode; + using namespace chip::app::Clusters::SmokeCoAlarm; - const char * clusterName = "RvcRunMode"; + const char * clusterName = "SmokeCoAlarm"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "expressed-state", Attributes::ExpressedState::Id, credsIssuerConfig), // + make_unique(Id, "smoke-state", Attributes::SmokeState::Id, credsIssuerConfig), // + make_unique(Id, "costate", Attributes::COState::Id, credsIssuerConfig), // + make_unique(Id, "battery-alert", Attributes::BatteryAlert::Id, credsIssuerConfig), // + make_unique(Id, "device-muted", Attributes::DeviceMuted::Id, credsIssuerConfig), // + make_unique(Id, "test-in-progress", Attributes::TestInProgress::Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-alert", Attributes::HardwareFaultAlert::Id, credsIssuerConfig), // + make_unique(Id, "end-of-service-alert", Attributes::EndOfServiceAlert::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-smoke-alarm", Attributes::InterconnectSmokeAlarm::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-coalarm", Attributes::InterconnectCOAlarm::Id, credsIssuerConfig), // + make_unique(Id, "contamination-state", Attributes::ContaminationState::Id, credsIssuerConfig), // + make_unique(Id, "smoke-sensitivity-level", Attributes::SmokeSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "expiry-date", Attributes::ExpiryDate::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "expressed-state", 0, UINT8_MAX, Attributes::ExpressedState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "smoke-state", 0, UINT8_MAX, Attributes::SmokeState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "costate", 0, UINT8_MAX, Attributes::COState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "battery-alert", 0, UINT8_MAX, Attributes::BatteryAlert::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "device-muted", 0, UINT8_MAX, Attributes::DeviceMuted::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "test-in-progress", 0, 1, Attributes::TestInProgress::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "hardware-fault-alert", 0, 1, Attributes::HardwareFaultAlert::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "end-of-service-alert", 0, UINT8_MAX, Attributes::EndOfServiceAlert::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "interconnect-smoke-alarm", 0, UINT8_MAX, Attributes::InterconnectSmokeAlarm::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "interconnect-coalarm", 0, UINT8_MAX, Attributes::InterconnectCOAlarm::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "contamination-state", 0, UINT8_MAX, Attributes::ContaminationState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "smoke-sensitivity-level", 0, UINT8_MAX, Attributes::SmokeSensitivityLevel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "expiry-date", 0, UINT32_MAX, Attributes::ExpiryDate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15849,45 +18583,80 @@ void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "expressed-state", Attributes::ExpressedState::Id, credsIssuerConfig), // + make_unique(Id, "smoke-state", Attributes::SmokeState::Id, credsIssuerConfig), // + make_unique(Id, "costate", Attributes::COState::Id, credsIssuerConfig), // + make_unique(Id, "battery-alert", Attributes::BatteryAlert::Id, credsIssuerConfig), // + make_unique(Id, "device-muted", Attributes::DeviceMuted::Id, credsIssuerConfig), // + make_unique(Id, "test-in-progress", Attributes::TestInProgress::Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault-alert", Attributes::HardwareFaultAlert::Id, credsIssuerConfig), // + make_unique(Id, "end-of-service-alert", Attributes::EndOfServiceAlert::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-smoke-alarm", Attributes::InterconnectSmokeAlarm::Id, + credsIssuerConfig), // + make_unique(Id, "interconnect-coalarm", Attributes::InterconnectCOAlarm::Id, credsIssuerConfig), // + make_unique(Id, "contamination-state", Attributes::ContaminationState::Id, credsIssuerConfig), // + make_unique(Id, "smoke-sensitivity-level", Attributes::SmokeSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "expiry-date", Attributes::ExpiryDate::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "smoke-alarm", Events::SmokeAlarm::Id, credsIssuerConfig), // + make_unique(Id, "coalarm", Events::COAlarm::Id, credsIssuerConfig), // + make_unique(Id, "low-battery", Events::LowBattery::Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault", Events::HardwareFault::Id, credsIssuerConfig), // + make_unique(Id, "end-of-service", Events::EndOfService::Id, credsIssuerConfig), // + make_unique(Id, "self-test-complete", Events::SelfTestComplete::Id, credsIssuerConfig), // + make_unique(Id, "alarm-muted", Events::AlarmMuted::Id, credsIssuerConfig), // + make_unique(Id, "mute-ended", Events::MuteEnded::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-smoke-alarm", Events::InterconnectSmokeAlarm::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-coalarm", Events::InterconnectCOAlarm::Id, credsIssuerConfig), // + make_unique(Id, "all-clear", Events::AllClear::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "smoke-alarm", Events::SmokeAlarm::Id, credsIssuerConfig), // + make_unique(Id, "coalarm", Events::COAlarm::Id, credsIssuerConfig), // + make_unique(Id, "low-battery", Events::LowBattery::Id, credsIssuerConfig), // + make_unique(Id, "hardware-fault", Events::HardwareFault::Id, credsIssuerConfig), // + make_unique(Id, "end-of-service", Events::EndOfService::Id, credsIssuerConfig), // + make_unique(Id, "self-test-complete", Events::SelfTestComplete::Id, credsIssuerConfig), // + make_unique(Id, "alarm-muted", Events::AlarmMuted::Id, credsIssuerConfig), // + make_unique(Id, "mute-ended", Events::MuteEnded::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-smoke-alarm", Events::InterconnectSmokeAlarm::Id, credsIssuerConfig), // + make_unique(Id, "interconnect-coalarm", Events::InterconnectCOAlarm::Id, credsIssuerConfig), // + make_unique(Id, "all-clear", Events::AllClear::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDishwasherAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::RvcCleanMode; + using namespace chip::app::Clusters::DishwasherAlarm; - const char * clusterName = "RvcCleanMode"; + const char * clusterName = "DishwasherAlarm"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15895,13 +18664,14 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "latch", 0, UINT32_MAX, Attributes::Latch::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported", 0, UINT32_MAX, Attributes::Supported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15916,9 +18686,10 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15928,36 +18699,31 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterTemperatureControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterMicrowaveOvenMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::TemperatureControl; + using namespace chip::app::Clusters::MicrowaveOvenMode; - const char * clusterName = "TemperatureControl"; + const char * clusterName = "MicrowaveOvenMode"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-setpoint", Attributes::TemperatureSetpoint::Id, credsIssuerConfig), // - make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // - make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // - make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, - credsIssuerConfig), // - make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15965,20 +18731,11 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "temperature-setpoint", INT16_MIN, INT16_MAX, Attributes::TemperatureSetpoint::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "min-temperature", INT16_MIN, INT16_MAX, Attributes::MinTemperature::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-temperature", INT16_MIN, INT16_MAX, Attributes::MaxTemperature::Id, + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "step", INT16_MIN, INT16_MAX, Attributes::Step::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "selected-temperature-level", 0, UINT8_MAX, - Attributes::SelectedTemperatureLevel::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15991,16 +18748,10 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-setpoint", Attributes::TemperatureSetpoint::Id, credsIssuerConfig), // - make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // - make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // - make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, - credsIssuerConfig), // - make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, - credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16016,24 +18767,28 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::RefrigeratorAlarm; + using namespace chip::app::Clusters::MicrowaveOvenControl; - const char * clusterName = "RefrigeratorAlarm"; + const char * clusterName = "MicrowaveOvenControl"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // - make_unique(Id, "supported", Attributes::Supported::Id, credsIssuerConfig), // + make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // + make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // + make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // + make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // + make_unique(Id, "power-step", Attributes::PowerStep::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16041,12 +18796,16 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "supported", 0, UINT32_MAX, Attributes::Supported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cook-time", 0, UINT32_MAX, Attributes::CookTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "power-setting", 0, UINT8_MAX, Attributes::PowerSetting::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "min-power", 0, UINT8_MAX, Attributes::MinPower::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "max-power", 0, UINT8_MAX, Attributes::MaxPower::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "power-step", 0, UINT8_MAX, Attributes::PowerStep::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16061,9 +18820,11 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // - make_unique(Id, "supported", Attributes::Supported::Id, credsIssuerConfig), // + make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // + make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // + make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // + make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // + make_unique(Id, "power-step", Attributes::PowerStep::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16073,34 +18834,37 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::DishwasherMode; + using namespace chip::app::Clusters::OperationalState; - const char * clusterName = "DishwasherMode"; + const char * clusterName = "OperationalState"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16108,15 +18872,22 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>>( + Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "countdown-time", 0, UINT32_MAX, + Attributes::CountdownTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16131,10 +18902,12 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16144,28 +18917,41 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::AirQuality; + using namespace chip::app::Clusters::RvcOperationalState; - const char * clusterName = "AirQuality"; + const char * clusterName = "RvcOperationalState"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "air-quality", Attributes::AirQuality::Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16173,8 +18959,21 @@ void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "air-quality", 0, UINT8_MAX, Attributes::AirQuality::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>>( + Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "countdown-time", 0, UINT32_MAX, + Attributes::CountdownTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16189,7 +18988,12 @@ void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * c make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "air-quality", Attributes::AirQuality::Id, credsIssuerConfig), // + make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // + make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // + make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // + make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // + make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16199,41 +19003,38 @@ void registerClusterAirQuality(Commands & commands, CredentialIssuerCommands * c // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // + make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterSmokeCoAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterHepaFilterMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::SmokeCoAlarm; + using namespace chip::app::Clusters::HepaFilterMonitoring; - const char * clusterName = "SmokeCoAlarm"; + const char * clusterName = "HepaFilterMonitoring"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "expressed-state", Attributes::ExpressedState::Id, credsIssuerConfig), // - make_unique(Id, "smoke-state", Attributes::SmokeState::Id, credsIssuerConfig), // - make_unique(Id, "costate", Attributes::COState::Id, credsIssuerConfig), // - make_unique(Id, "battery-alert", Attributes::BatteryAlert::Id, credsIssuerConfig), // - make_unique(Id, "device-muted", Attributes::DeviceMuted::Id, credsIssuerConfig), // - make_unique(Id, "test-in-progress", Attributes::TestInProgress::Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-alert", Attributes::HardwareFaultAlert::Id, credsIssuerConfig), // - make_unique(Id, "end-of-service-alert", Attributes::EndOfServiceAlert::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-smoke-alarm", Attributes::InterconnectSmokeAlarm::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-coalarm", Attributes::InterconnectCOAlarm::Id, credsIssuerConfig), // - make_unique(Id, "contamination-state", Attributes::ContaminationState::Id, credsIssuerConfig), // - make_unique(Id, "smoke-sensitivity-level", Attributes::SmokeSensitivityLevel::Id, credsIssuerConfig), // - make_unique(Id, "expiry-date", Attributes::ExpiryDate::Id, credsIssuerConfig), // + make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // + make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // + make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // + make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // + make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // + make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16241,38 +19042,23 @@ void registerClusterSmokeCoAlarm(Commands & commands, CredentialIssuerCommands * make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "expressed-state", 0, UINT8_MAX, Attributes::ExpressedState::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "smoke-state", 0, UINT8_MAX, Attributes::SmokeState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "costate", 0, UINT8_MAX, Attributes::COState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "battery-alert", 0, UINT8_MAX, Attributes::BatteryAlert::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "device-muted", 0, UINT8_MAX, Attributes::DeviceMuted::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "test-in-progress", 0, 1, Attributes::TestInProgress::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "hardware-fault-alert", 0, 1, Attributes::HardwareFaultAlert::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "end-of-service-alert", 0, UINT8_MAX, Attributes::EndOfServiceAlert::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "interconnect-smoke-alarm", 0, UINT8_MAX, Attributes::InterconnectSmokeAlarm::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "interconnect-coalarm", 0, UINT8_MAX, Attributes::InterconnectCOAlarm::Id, WriteCommandType::kForceWrite, + make_unique>(Id, "condition", 0, UINT8_MAX, Attributes::Condition::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "degradation-direction", 0, UINT8_MAX, Attributes::DegradationDirection::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "contamination-state", 0, UINT8_MAX, Attributes::ContaminationState::Id, WriteCommandType::kForceWrite, + make_unique>( + Id, "change-indication", 0, UINT8_MAX, Attributes::ChangeIndication::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "smoke-sensitivity-level", 0, UINT8_MAX, Attributes::SmokeSensitivityLevel::Id, WriteCommandType::kWrite, + make_unique>(Id, "in-place-indicator", 0, 1, Attributes::InPlaceIndicator::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "last-changed-time", 0, UINT32_MAX, + Attributes::LastChangedTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "replacement-product-list", Attributes::ReplacementProductList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "expiry-date", 0, UINT32_MAX, Attributes::ExpiryDate::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16285,95 +19071,76 @@ void registerClusterSmokeCoAlarm(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "expressed-state", Attributes::ExpressedState::Id, credsIssuerConfig), // - make_unique(Id, "smoke-state", Attributes::SmokeState::Id, credsIssuerConfig), // - make_unique(Id, "costate", Attributes::COState::Id, credsIssuerConfig), // - make_unique(Id, "battery-alert", Attributes::BatteryAlert::Id, credsIssuerConfig), // - make_unique(Id, "device-muted", Attributes::DeviceMuted::Id, credsIssuerConfig), // - make_unique(Id, "test-in-progress", Attributes::TestInProgress::Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault-alert", Attributes::HardwareFaultAlert::Id, credsIssuerConfig), // - make_unique(Id, "end-of-service-alert", Attributes::EndOfServiceAlert::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-smoke-alarm", Attributes::InterconnectSmokeAlarm::Id, - credsIssuerConfig), // - make_unique(Id, "interconnect-coalarm", Attributes::InterconnectCOAlarm::Id, credsIssuerConfig), // - make_unique(Id, "contamination-state", Attributes::ContaminationState::Id, credsIssuerConfig), // - make_unique(Id, "smoke-sensitivity-level", Attributes::SmokeSensitivityLevel::Id, credsIssuerConfig), // - make_unique(Id, "expiry-date", Attributes::ExpiryDate::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // + make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // + make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // + make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // + make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // + make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "smoke-alarm", Events::SmokeAlarm::Id, credsIssuerConfig), // - make_unique(Id, "coalarm", Events::COAlarm::Id, credsIssuerConfig), // - make_unique(Id, "low-battery", Events::LowBattery::Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault", Events::HardwareFault::Id, credsIssuerConfig), // - make_unique(Id, "end-of-service", Events::EndOfService::Id, credsIssuerConfig), // - make_unique(Id, "self-test-complete", Events::SelfTestComplete::Id, credsIssuerConfig), // - make_unique(Id, "alarm-muted", Events::AlarmMuted::Id, credsIssuerConfig), // - make_unique(Id, "mute-ended", Events::MuteEnded::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-smoke-alarm", Events::InterconnectSmokeAlarm::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-coalarm", Events::InterconnectCOAlarm::Id, credsIssuerConfig), // - make_unique(Id, "all-clear", Events::AllClear::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "smoke-alarm", Events::SmokeAlarm::Id, credsIssuerConfig), // - make_unique(Id, "coalarm", Events::COAlarm::Id, credsIssuerConfig), // - make_unique(Id, "low-battery", Events::LowBattery::Id, credsIssuerConfig), // - make_unique(Id, "hardware-fault", Events::HardwareFault::Id, credsIssuerConfig), // - make_unique(Id, "end-of-service", Events::EndOfService::Id, credsIssuerConfig), // - make_unique(Id, "self-test-complete", Events::SelfTestComplete::Id, credsIssuerConfig), // - make_unique(Id, "alarm-muted", Events::AlarmMuted::Id, credsIssuerConfig), // - make_unique(Id, "mute-ended", Events::MuteEnded::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-smoke-alarm", Events::InterconnectSmokeAlarm::Id, credsIssuerConfig), // - make_unique(Id, "interconnect-coalarm", Events::InterconnectCOAlarm::Id, credsIssuerConfig), // - make_unique(Id, "all-clear", Events::AllClear::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterDishwasherAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::DishwasherAlarm; + using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; - const char * clusterName = "DishwasherAlarm"; + const char * clusterName = "ActivatedCarbonFilterMonitoring"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // - make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // - make_unique(Id, "supported", Attributes::Supported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "latch", 0, UINT32_MAX, Attributes::Latch::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "supported", 0, UINT32_MAX, Attributes::Supported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // + make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // + make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // + make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // + make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // + make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "condition", 0, UINT8_MAX, Attributes::Condition::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "degradation-direction", 0, UINT8_MAX, Attributes::DegradationDirection::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "change-indication", 0, UINT8_MAX, Attributes::ChangeIndication::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "in-place-indicator", 0, 1, Attributes::InPlaceIndicator::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "last-changed-time", 0, UINT32_MAX, + Attributes::LastChangedTime::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "replacement-product-list", Attributes::ReplacementProductList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16386,12 +19153,15 @@ void registerClusterDishwasherAlarm(Commands & commands, CredentialIssuerCommand make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // - make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // - make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // - make_unique(Id, "supported", Attributes::Supported::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // + make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // + make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // + make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // + make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // + make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16401,43 +19171,64 @@ void registerClusterDishwasherAlarm(Commands & commands, CredentialIssuerCommand // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterMicrowaveOvenMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterBooleanStateConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::MicrowaveOvenMode; + using namespace chip::app::Clusters::BooleanStateConfiguration; - const char * clusterName = "MicrowaveOvenMode"; + const char * clusterName = "BooleanStateConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-sensitivity-level", Attributes::CurrentSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "supported-sensitivity-levels", Attributes::SupportedSensitivityLevels::Id, + credsIssuerConfig), // + make_unique(Id, "default-sensitivity-level", Attributes::DefaultSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // + make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // + make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "alarms-supported", Attributes::AlarmsSupported::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Attributes::SensorFault::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "current-sensitivity-level", 0, UINT8_MAX, Attributes::CurrentSensitivityLevel::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "supported-sensitivity-levels", 0, UINT8_MAX, + Attributes::SupportedSensitivityLevels::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "default-sensitivity-level", 0, UINT8_MAX, Attributes::DefaultSensitivityLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "alarms-active", 0, UINT8_MAX, Attributes::AlarmsActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "alarms-suppressed", 0, UINT8_MAX, Attributes::AlarmsSuppressed::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "alarms-enabled", 0, UINT8_MAX, Attributes::AlarmsEnabled::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "alarms-supported", 0, UINT8_MAX, Attributes::AlarmsSupported::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "sensor-fault", 0, UINT16_MAX, Attributes::SensorFault::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16450,10 +19241,19 @@ void registerClusterMicrowaveOvenMode(Commands & commands, CredentialIssuerComma make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-sensitivity-level", Attributes::CurrentSensitivityLevel::Id, + credsIssuerConfig), // + make_unique(Id, "supported-sensitivity-levels", Attributes::SupportedSensitivityLevels::Id, + credsIssuerConfig), // + make_unique(Id, "default-sensitivity-level", Attributes::DefaultSensitivityLevel::Id, + credsIssuerConfig), // + make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // + make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // + make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "alarms-supported", Attributes::AlarmsSupported::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Attributes::SensorFault::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16463,34 +19263,43 @@ void registerClusterMicrowaveOvenMode(Commands & commands, CredentialIssuerComma // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "alarms-state-changed", Events::AlarmsStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Events::SensorFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "alarms-state-changed", Events::AlarmsStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Events::SensorFault::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterValveConfigurationAndControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::MicrowaveOvenControl; + using namespace chip::app::Clusters::ValveConfigurationAndControl; - const char * clusterName = "MicrowaveOvenControl"; + const char * clusterName = "ValveConfigurationAndControl"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // - make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // - make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // - make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // - make_unique(Id, "power-step", Attributes::PowerStep::Id, credsIssuerConfig), // + make_unique(Id, "open-duration", Attributes::OpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "default-open-duration", Attributes::DefaultOpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "auto-close-time", Attributes::AutoCloseTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-duration", Attributes::RemainingDuration::Id, credsIssuerConfig), // + make_unique(Id, "current-state", Attributes::CurrentState::Id, credsIssuerConfig), // + make_unique(Id, "target-state", Attributes::TargetState::Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "target-level", Attributes::TargetLevel::Id, credsIssuerConfig), // + make_unique(Id, "default-open-level", Attributes::DefaultOpenLevel::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Attributes::ValveFault::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16498,16 +19307,31 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "cook-time", 0, UINT32_MAX, Attributes::CookTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-setting", 0, UINT8_MAX, Attributes::PowerSetting::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "min-power", 0, UINT8_MAX, Attributes::MinPower::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "max-power", 0, UINT8_MAX, Attributes::MaxPower::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "power-step", 0, UINT8_MAX, Attributes::PowerStep::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "open-duration", 0, UINT32_MAX, Attributes::OpenDuration::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "default-open-duration", 0, UINT32_MAX, + Attributes::DefaultOpenDuration::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "auto-close-time", 0, UINT64_MAX, + Attributes::AutoCloseTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "remaining-duration", 0, UINT32_MAX, + Attributes::RemainingDuration::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttribute>>( + Id, "current-state", 0, UINT8_MAX, Attributes::CurrentState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttribute>>( + Id, "target-state", 0, UINT8_MAX, Attributes::TargetState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "current-level", 0, UINT8_MAX, Attributes::CurrentLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "target-level", 0, UINT8_MAX, Attributes::TargetLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "default-open-level", 0, UINT8_MAX, Attributes::DefaultOpenLevel::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "valve-fault", 0, UINT16_MAX, Attributes::ValveFault::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16522,11 +19346,16 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // - make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // - make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // - make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // - make_unique(Id, "power-step", Attributes::PowerStep::Id, credsIssuerConfig), // + make_unique(Id, "open-duration", Attributes::OpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "default-open-duration", Attributes::DefaultOpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "auto-close-time", Attributes::AutoCloseTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-duration", Attributes::RemainingDuration::Id, credsIssuerConfig), // + make_unique(Id, "current-state", Attributes::CurrentState::Id, credsIssuerConfig), // + make_unique(Id, "target-state", Attributes::TargetState::Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "target-level", Attributes::TargetLevel::Id, credsIssuerConfig), // + make_unique(Id, "default-open-level", Attributes::DefaultOpenLevel::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Attributes::ValveFault::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16536,60 +19365,64 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "valve-state-changed", Events::ValveStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Events::ValveFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "valve-state-changed", Events::ValveStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Events::ValveFault::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterElectricalEnergyMeasurement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::OperationalState; + using namespace chip::app::Clusters::ElectricalEnergyMeasurement; - const char * clusterName = "OperationalState"; + const char * clusterName = "ElectricalEnergyMeasurement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>>( - Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "countdown-time", 0, UINT32_MAX, - Attributes::CountdownTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "accuracy", Attributes::Accuracy::Id, credsIssuerConfig), // + make_unique(Id, "cumulative-energy-imported", Attributes::CumulativeEnergyImported::Id, + credsIssuerConfig), // + make_unique(Id, "cumulative-energy-exported", Attributes::CumulativeEnergyExported::Id, + credsIssuerConfig), // + make_unique(Id, "periodic-energy-imported", Attributes::PeriodicEnergyImported::Id, credsIssuerConfig), // + make_unique(Id, "periodic-energy-exported", Attributes::PeriodicEnergyExported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>( + Id, "accuracy", Attributes::Accuracy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "cumulative-energy-imported", Attributes::CumulativeEnergyImported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, WriteCommandType::kForceWrite, + make_unique>>( + Id, "cumulative-energy-exported", Attributes::CumulativeEnergyExported::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "periodic-energy-imported", Attributes::PeriodicEnergyImported::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "periodic-energy-exported", Attributes::PeriodicEnergyExported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16602,14 +19435,17 @@ void registerClusterOperationalState(Commands & commands, CredentialIssuerComman make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "accuracy", Attributes::Accuracy::Id, credsIssuerConfig), // + make_unique(Id, "cumulative-energy-imported", Attributes::CumulativeEnergyImported::Id, + credsIssuerConfig), // + make_unique(Id, "cumulative-energy-exported", Attributes::CumulativeEnergyExported::Id, + credsIssuerConfig), // + make_unique(Id, "periodic-energy-imported", Attributes::PeriodicEnergyImported::Id, + credsIssuerConfig), // + make_unique(Id, "periodic-energy-exported", Attributes::PeriodicEnergyExported::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16619,63 +19455,74 @@ void registerClusterOperationalState(Commands & commands, CredentialIssuerComman // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "cumulative-energy-measured", Events::CumulativeEnergyMeasured::Id, credsIssuerConfig), // + make_unique(Id, "periodic-energy-measured", Events::PeriodicEnergyMeasured::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "cumulative-energy-measured", Events::CumulativeEnergyMeasured::Id, credsIssuerConfig), // + make_unique(Id, "periodic-energy-measured", Events::PeriodicEnergyMeasured::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::RvcOperationalState; + using namespace chip::app::Clusters::DemandResponseLoadControl; - const char * clusterName = "RvcOperationalState"; + const char * clusterName = "DemandResponseLoadControl"; commands_list clusterCommands = { // // Commands // - make_unique(Id, 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), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>>( - Id, "phase-list", Attributes::PhaseList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "current-phase", 0, UINT8_MAX, Attributes::CurrentPhase::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "countdown-time", 0, UINT32_MAX, - Attributes::CountdownTime::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "load-control-programs", Attributes::LoadControlPrograms::Id, credsIssuerConfig), // + make_unique(Id, "number-of-load-control-programs", Attributes::NumberOfLoadControlPrograms::Id, + credsIssuerConfig), // + make_unique(Id, "events", Attributes::Events::Id, credsIssuerConfig), // + make_unique(Id, "active-events", Attributes::ActiveEvents::Id, credsIssuerConfig), // + make_unique(Id, "number-of-events-per-program", Attributes::NumberOfEventsPerProgram::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-transitions", Attributes::NumberOfTransitions::Id, credsIssuerConfig), // + make_unique(Id, "default-random-start", Attributes::DefaultRandomStart::Id, credsIssuerConfig), // + make_unique(Id, "default-random-duration", Attributes::DefaultRandomDuration::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "load-control-programs", Attributes::LoadControlPrograms::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-load-control-programs", 0, UINT8_MAX, + Attributes::NumberOfLoadControlPrograms::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "events", Attributes::Events::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "active-events", Attributes::ActiveEvents::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-events-per-program", 0, UINT8_MAX, + Attributes::NumberOfEventsPerProgram::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "number-of-transitions", 0, UINT8_MAX, Attributes::NumberOfTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "default-random-start", 0, UINT8_MAX, Attributes::DefaultRandomStart::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "default-random-duration", 0, UINT8_MAX, Attributes::DefaultRandomDuration::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16688,79 +19535,91 @@ void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCom make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "phase-list", Attributes::PhaseList::Id, credsIssuerConfig), // - make_unique(Id, "current-phase", Attributes::CurrentPhase::Id, credsIssuerConfig), // - make_unique(Id, "countdown-time", Attributes::CountdownTime::Id, credsIssuerConfig), // - make_unique(Id, "operational-state-list", Attributes::OperationalStateList::Id, credsIssuerConfig), // - make_unique(Id, "operational-state", Attributes::OperationalState::Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Attributes::OperationalError::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "load-control-programs", Attributes::LoadControlPrograms::Id, credsIssuerConfig), // + make_unique(Id, "number-of-load-control-programs", Attributes::NumberOfLoadControlPrograms::Id, + credsIssuerConfig), // + make_unique(Id, "events", Attributes::Events::Id, credsIssuerConfig), // + make_unique(Id, "active-events", Attributes::ActiveEvents::Id, credsIssuerConfig), // + make_unique(Id, "number-of-events-per-program", Attributes::NumberOfEventsPerProgram::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-transitions", Attributes::NumberOfTransitions::Id, credsIssuerConfig), // + make_unique(Id, "default-random-start", Attributes::DefaultRandomStart::Id, credsIssuerConfig), // + make_unique(Id, "default-random-duration", Attributes::DefaultRandomDuration::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "operational-error", Events::OperationalError::Id, credsIssuerConfig), // - make_unique(Id, "operation-completion", Events::OperationCompletion::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "load-control-event-status-change", Events::LoadControlEventStatusChange::Id, + credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "load-control-event-status-change", Events::LoadControlEventStatusChange::Id, + credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterHepaFilterMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDeviceEnergyManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::HepaFilterMonitoring; + using namespace chip::app::Clusters::DeviceEnergyManagement; - const char * clusterName = "HepaFilterMonitoring"; + const char * clusterName = "DeviceEnergyManagement"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // - make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // - make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // - make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // - make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // - make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "condition", 0, UINT8_MAX, Attributes::Condition::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "degradation-direction", 0, UINT8_MAX, Attributes::DegradationDirection::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "change-indication", 0, UINT8_MAX, Attributes::ChangeIndication::Id, WriteCommandType::kForceWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "esatype", Attributes::ESAType::Id, credsIssuerConfig), // + make_unique(Id, "esacan-generate", Attributes::ESACanGenerate::Id, credsIssuerConfig), // + make_unique(Id, "esastate", Attributes::ESAState::Id, credsIssuerConfig), // + make_unique(Id, "abs-min-power", Attributes::AbsMinPower::Id, credsIssuerConfig), // + make_unique(Id, "abs-max-power", Attributes::AbsMaxPower::Id, credsIssuerConfig), // + make_unique(Id, "power-adjustment-capability", Attributes::PowerAdjustmentCapability::Id, + credsIssuerConfig), // + make_unique(Id, "forecast", Attributes::Forecast::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "esatype", 0, UINT8_MAX, Attributes::ESAType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "esacan-generate", 0, 1, Attributes::ESACanGenerate::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "esastate", 0, UINT8_MAX, Attributes::ESAState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "abs-min-power", INT64_MIN, INT64_MAX, Attributes::AbsMinPower::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "abs-max-power", INT64_MIN, INT64_MAX, Attributes::AbsMaxPower::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>>( + Id, "power-adjustment-capability", Attributes::PowerAdjustmentCapability::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "in-place-indicator", 0, 1, Attributes::InPlaceIndicator::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "last-changed-time", 0, UINT32_MAX, - Attributes::LastChangedTime::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( - Id, "replacement-product-list", Attributes::ReplacementProductList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + chip::app::DataModel::Nullable>>( + Id, "forecast", Attributes::Forecast::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16773,15 +19632,16 @@ void registerClusterHepaFilterMonitoring(Commands & commands, CredentialIssuerCo make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // - make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // - make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // - make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // - make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // - make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "esatype", Attributes::ESAType::Id, credsIssuerConfig), // + make_unique(Id, "esacan-generate", Attributes::ESACanGenerate::Id, credsIssuerConfig), // + make_unique(Id, "esastate", Attributes::ESAState::Id, credsIssuerConfig), // + make_unique(Id, "abs-min-power", Attributes::AbsMinPower::Id, credsIssuerConfig), // + make_unique(Id, "abs-max-power", Attributes::AbsMaxPower::Id, credsIssuerConfig), // + make_unique(Id, "power-adjustment-capability", Attributes::PowerAdjustmentCapability::Id, credsIssuerConfig), // + make_unique(Id, "forecast", Attributes::Forecast::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16791,58 +19651,144 @@ void registerClusterHepaFilterMonitoring(Commands & commands, CredentialIssuerCo // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "power-adjust-start", Events::PowerAdjustStart::Id, credsIssuerConfig), // + make_unique(Id, "power-adjust-end", Events::PowerAdjustEnd::Id, credsIssuerConfig), // + make_unique(Id, "paused", Events::Paused::Id, credsIssuerConfig), // + make_unique(Id, "resumed", Events::Resumed::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "power-adjust-start", Events::PowerAdjustStart::Id, credsIssuerConfig), // + make_unique(Id, "power-adjust-end", Events::PowerAdjustEnd::Id, credsIssuerConfig), // + make_unique(Id, "paused", Events::Paused::Id, credsIssuerConfig), // + make_unique(Id, "resumed", Events::Resumed::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterEnergyEvse(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; + using namespace chip::app::Clusters::EnergyEvse; - const char * clusterName = "ActivatedCarbonFilterMonitoring"; + const char * clusterName = "EnergyEvse"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // - make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // - make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // - make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // - make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // - make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "condition", 0, UINT8_MAX, Attributes::Condition::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "degradation-direction", 0, UINT8_MAX, Attributes::DegradationDirection::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>( - Id, "change-indication", 0, UINT8_MAX, Attributes::ChangeIndication::Id, WriteCommandType::kForceWrite, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supply-state", Attributes::SupplyState::Id, credsIssuerConfig), // + make_unique(Id, "fault-state", Attributes::FaultState::Id, credsIssuerConfig), // + make_unique(Id, "charging-enabled-until", Attributes::ChargingEnabledUntil::Id, credsIssuerConfig), // + make_unique(Id, "discharging-enabled-until", Attributes::DischargingEnabledUntil::Id, credsIssuerConfig), // + make_unique(Id, "circuit-capacity", Attributes::CircuitCapacity::Id, credsIssuerConfig), // + make_unique(Id, "minimum-charge-current", Attributes::MinimumChargeCurrent::Id, credsIssuerConfig), // + make_unique(Id, "maximum-charge-current", Attributes::MaximumChargeCurrent::Id, credsIssuerConfig), // + make_unique(Id, "maximum-discharge-current", Attributes::MaximumDischargeCurrent::Id, credsIssuerConfig), // + make_unique(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id, + credsIssuerConfig), // + make_unique(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id, credsIssuerConfig), // + make_unique(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id, + credsIssuerConfig), // + make_unique(Id, "next-charge-target-so-c", Attributes::NextChargeTargetSoC::Id, credsIssuerConfig), // + make_unique(Id, "approximate-evefficiency", Attributes::ApproximateEVEfficiency::Id, credsIssuerConfig), // + make_unique(Id, "state-of-charge", Attributes::StateOfCharge::Id, credsIssuerConfig), // + make_unique(Id, "battery-capacity", Attributes::BatteryCapacity::Id, credsIssuerConfig), // + make_unique(Id, "vehicle-id", Attributes::VehicleID::Id, credsIssuerConfig), // + make_unique(Id, "session-id", Attributes::SessionID::Id, credsIssuerConfig), // + make_unique(Id, "session-duration", Attributes::SessionDuration::Id, credsIssuerConfig), // + make_unique(Id, "session-energy-charged", Attributes::SessionEnergyCharged::Id, credsIssuerConfig), // + make_unique(Id, "session-energy-discharged", Attributes::SessionEnergyDischarged::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "state", 0, UINT8_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "supply-state", 0, UINT8_MAX, Attributes::SupplyState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "fault-state", 0, UINT8_MAX, Attributes::FaultState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "charging-enabled-until", 0, UINT32_MAX, + Attributes::ChargingEnabledUntil::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "discharging-enabled-until", 0, UINT32_MAX, + Attributes::DischargingEnabledUntil::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "circuit-capacity", INT64_MIN, INT64_MAX, Attributes::CircuitCapacity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "minimum-charge-current", INT64_MIN, INT64_MAX, + Attributes::MinimumChargeCurrent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "maximum-charge-current", INT64_MIN, INT64_MAX, + Attributes::MaximumChargeCurrent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "maximum-discharge-current", INT64_MIN, INT64_MAX, + Attributes::MaximumDischargeCurrent::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "user-maximum-charge-current", INT64_MIN, INT64_MAX, + Attributes::UserMaximumChargeCurrent::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "randomization-delay-window", 0, UINT32_MAX, + Attributes::RandomizationDelayWindow::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>(Id, "number-of-weekly-targets", 0, UINT8_MAX, Attributes::NumberOfWeeklyTargets::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-daily-targets", 0, UINT8_MAX, Attributes::NumberOfDailyTargets::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "next-charge-start-time", 0, UINT32_MAX, + Attributes::NextChargeStartTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "next-charge-target-time", 0, UINT32_MAX, + Attributes::NextChargeTargetTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "next-charge-required-energy", INT64_MIN, + INT64_MAX, Attributes::NextChargeRequiredEnergy::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "next-charge-target-so-c", 0, UINT8_MAX, Attributes::NextChargeTargetSoC::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "in-place-indicator", 0, 1, Attributes::InPlaceIndicator::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "last-changed-time", 0, UINT32_MAX, - Attributes::LastChangedTime::Id, + make_unique>>(Id, "approximate-evefficiency", 0, UINT16_MAX, + Attributes::ApproximateEVEfficiency::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "replacement-product-list", Attributes::ReplacementProductList::Id, WriteCommandType::kForceWrite, + make_unique>>( + Id, "state-of-charge", 0, UINT8_MAX, Attributes::StateOfCharge::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "battery-capacity", INT64_MIN, INT64_MAX, + Attributes::BatteryCapacity::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "vehicle-id", Attributes::VehicleID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "session-id", 0, UINT32_MAX, Attributes::SessionID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "session-duration", 0, UINT32_MAX, + Attributes::SessionDuration::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "session-energy-charged", INT64_MIN, INT64_MAX, + Attributes::SessionEnergyCharged::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "session-energy-discharged", INT64_MIN, INT64_MAX, + Attributes::SessionEnergyDischarged::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16855,14 +19801,40 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, Credent make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "condition", Attributes::Condition::Id, credsIssuerConfig), // - make_unique(Id, "degradation-direction", Attributes::DegradationDirection::Id, credsIssuerConfig), // - make_unique(Id, "change-indication", Attributes::ChangeIndication::Id, credsIssuerConfig), // - make_unique(Id, "in-place-indicator", Attributes::InPlaceIndicator::Id, credsIssuerConfig), // - make_unique(Id, "last-changed-time", Attributes::LastChangedTime::Id, credsIssuerConfig), // - make_unique(Id, "replacement-product-list", Attributes::ReplacementProductList::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supply-state", Attributes::SupplyState::Id, credsIssuerConfig), // + make_unique(Id, "fault-state", Attributes::FaultState::Id, credsIssuerConfig), // + make_unique(Id, "charging-enabled-until", Attributes::ChargingEnabledUntil::Id, credsIssuerConfig), // + make_unique(Id, "discharging-enabled-until", Attributes::DischargingEnabledUntil::Id, + credsIssuerConfig), // + make_unique(Id, "circuit-capacity", Attributes::CircuitCapacity::Id, credsIssuerConfig), // + make_unique(Id, "minimum-charge-current", Attributes::MinimumChargeCurrent::Id, credsIssuerConfig), // + make_unique(Id, "maximum-charge-current", Attributes::MaximumChargeCurrent::Id, credsIssuerConfig), // + make_unique(Id, "maximum-discharge-current", Attributes::MaximumDischargeCurrent::Id, + credsIssuerConfig), // + make_unique(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id, + credsIssuerConfig), // + make_unique(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), // + make_unique(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id, + credsIssuerConfig), // + make_unique(Id, "next-charge-target-so-c", Attributes::NextChargeTargetSoC::Id, credsIssuerConfig), // + make_unique(Id, "approximate-evefficiency", Attributes::ApproximateEVEfficiency::Id, + credsIssuerConfig), // + make_unique(Id, "state-of-charge", Attributes::StateOfCharge::Id, credsIssuerConfig), // + make_unique(Id, "battery-capacity", Attributes::BatteryCapacity::Id, credsIssuerConfig), // + make_unique(Id, "vehicle-id", Attributes::VehicleID::Id, credsIssuerConfig), // + make_unique(Id, "session-id", Attributes::SessionID::Id, credsIssuerConfig), // + make_unique(Id, "session-duration", Attributes::SessionDuration::Id, credsIssuerConfig), // + make_unique(Id, "session-energy-charged", Attributes::SessionEnergyCharged::Id, credsIssuerConfig), // + make_unique(Id, "session-energy-discharged", Attributes::SessionEnergyDischarged::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -16873,8 +19845,20 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, Credent // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "evconnected", Events::EVConnected::Id, credsIssuerConfig), // + make_unique(Id, "evnot-detected", Events::EVNotDetected::Id, credsIssuerConfig), // + make_unique(Id, "energy-transfer-started", Events::EnergyTransferStarted::Id, credsIssuerConfig), // + make_unique(Id, "energy-transfer-stopped", Events::EnergyTransferStopped::Id, credsIssuerConfig), // + make_unique(Id, "fault", Events::Fault::Id, credsIssuerConfig), // + make_unique(Id, "rfid", Events::Rfid::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "evconnected", Events::EVConnected::Id, credsIssuerConfig), // + make_unique(Id, "evnot-detected", Events::EVNotDetected::Id, credsIssuerConfig), // + make_unique(Id, "energy-transfer-started", Events::EnergyTransferStarted::Id, credsIssuerConfig), // + make_unique(Id, "energy-transfer-stopped", Events::EnergyTransferStopped::Id, credsIssuerConfig), // + make_unique(Id, "fault", Events::Fault::Id, credsIssuerConfig), // + make_unique(Id, "rfid", Events::Rfid::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -17762,35 +20746,39 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c Attributes::MaxCoolSetpointLimit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "min-setpoint-dead-band", INT8_MIN, INT8_MAX, Attributes::MinSetpointDeadBand::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( + make_unique>>( + Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( Id, "control-sequence-of-operation", 0, UINT8_MAX, Attributes::ControlSequenceOfOperation::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-weekly-transitions", 0, UINT8_MAX, Attributes::NumberOfWeeklyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-daily-transitions", 0, UINT8_MAX, Attributes::NumberOfDailyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>( Id, "temperature-setpoint-hold-duration", 0, UINT16_MAX, Attributes::TemperatureSetpointHoldDuration::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, - Attributes::ThermostatProgrammingOperationMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, Attributes::ThermostatProgrammingOperationMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>(Id, "setpoint-change-amount", INT16_MIN, INT16_MAX, Attributes::SetpointChangeAmount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -17816,23 +20804,26 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "emergency-heat-delta", 0, UINT8_MAX, Attributes::EmergencyHeatDelta::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "accapacity", 0, UINT16_MAX, Attributes::ACCapacity::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>(Id, "accoil-temperature", INT16_MIN, INT16_MAX, Attributes::ACCoilTemperature::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -18057,13 +21048,14 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands, Cr make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "temperature-display-mode", 0, UINT8_MAX, Attributes::TemperatureDisplayMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "keypad-lockout", 0, UINT8_MAX, Attributes::KeypadLockout::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "schedule-programming-visibility", 0, UINT8_MAX, - Attributes::ScheduleProgrammingVisibility::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique>( + Id, "temperature-display-mode", 0, UINT8_MAX, Attributes::TemperatureDisplayMode::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "keypad-lockout", 0, UINT8_MAX, Attributes::KeypadLockout::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "schedule-programming-visibility", 0, UINT8_MAX, Attributes::ScheduleProgrammingVisibility::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20183,6 +23175,9 @@ void registerClusterChannel(Commands & commands, CredentialIssuerCommands * cred make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -20293,8 +23288,10 @@ void registerClusterTargetNavigator(Commands & commands, CredentialIssuerCommand // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "target-updated", Events::TargetUpdated::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "target-updated", Events::TargetUpdated::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -20309,18 +23306,21 @@ void registerClusterMediaPlayback(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(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), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -20332,6 +23332,10 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique(Id, "playback-speed", Attributes::PlaybackSpeed::Id, credsIssuerConfig), // make_unique(Id, "seek-range-end", Attributes::SeekRangeEnd::Id, credsIssuerConfig), // make_unique(Id, "seek-range-start", Attributes::SeekRangeStart::Id, credsIssuerConfig), // + make_unique(Id, "active-audio-track", Attributes::ActiveAudioTrack::Id, credsIssuerConfig), // + make_unique(Id, "available-audio-tracks", Attributes::AvailableAudioTracks::Id, credsIssuerConfig), // + make_unique(Id, "active-text-track", Attributes::ActiveTextTrack::Id, credsIssuerConfig), // + make_unique(Id, "available-text-tracks", Attributes::AvailableTextTracks::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -20356,6 +23360,19 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique>>(Id, "seek-range-start", 0, UINT64_MAX, Attributes::SeekRangeStart::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "active-audio-track", Attributes::ActiveAudioTrack::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>>( + Id, "available-audio-tracks", Attributes::AvailableAudioTracks::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "active-text-track", Attributes::ActiveTextTrack::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>>( + Id, "available-text-tracks", Attributes::AvailableTextTracks::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20377,6 +23394,10 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique(Id, "playback-speed", Attributes::PlaybackSpeed::Id, credsIssuerConfig), // make_unique(Id, "seek-range-end", Attributes::SeekRangeEnd::Id, credsIssuerConfig), // make_unique(Id, "seek-range-start", Attributes::SeekRangeStart::Id, credsIssuerConfig), // + make_unique(Id, "active-audio-track", Attributes::ActiveAudioTrack::Id, credsIssuerConfig), // + make_unique(Id, "available-audio-tracks", Attributes::AvailableAudioTracks::Id, credsIssuerConfig), // + make_unique(Id, "active-text-track", Attributes::ActiveTextTrack::Id, credsIssuerConfig), // + make_unique(Id, "available-text-tracks", Attributes::AvailableTextTracks::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -20386,8 +23407,10 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "state-changed", Events::StateChanged::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -20880,6 +23903,164 @@ void registerClusterAccountLogin(Commands & commands, CredentialIssuerCommands * // // Events // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "logged-out", Events::LoggedOut::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "logged-out", Events::LoggedOut::Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterContentControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ContentControl; + + const char * clusterName = "ContentControl"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "enabled", Attributes::Enabled::Id, credsIssuerConfig), // + make_unique(Id, "on-demand-ratings", Attributes::OnDemandRatings::Id, credsIssuerConfig), // + make_unique(Id, "on-demand-rating-threshold", Attributes::OnDemandRatingThreshold::Id, credsIssuerConfig), // + make_unique(Id, "scheduled-content-ratings", Attributes::ScheduledContentRatings::Id, credsIssuerConfig), // + make_unique(Id, "scheduled-content-rating-threshold", Attributes::ScheduledContentRatingThreshold::Id, + credsIssuerConfig), // + make_unique(Id, "screen-daily-time", Attributes::ScreenDailyTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-screen-time", Attributes::RemainingScreenTime::Id, credsIssuerConfig), // + make_unique(Id, "block-unrated", Attributes::BlockUnrated::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "enabled", 0, 1, Attributes::Enabled::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "on-demand-ratings", Attributes::OnDemandRatings::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "on-demand-rating-threshold", Attributes::OnDemandRatingThreshold::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "scheduled-content-ratings", Attributes::ScheduledContentRatings::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "scheduled-content-rating-threshold", + Attributes::ScheduledContentRatingThreshold::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "screen-daily-time", 0, UINT32_MAX, Attributes::ScreenDailyTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "remaining-screen-time", 0, UINT32_MAX, Attributes::RemainingScreenTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "block-unrated", 0, 1, Attributes::BlockUnrated::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "enabled", Attributes::Enabled::Id, credsIssuerConfig), // + make_unique(Id, "on-demand-ratings", Attributes::OnDemandRatings::Id, credsIssuerConfig), // + make_unique(Id, "on-demand-rating-threshold", Attributes::OnDemandRatingThreshold::Id, + credsIssuerConfig), // + make_unique(Id, "scheduled-content-ratings", Attributes::ScheduledContentRatings::Id, + credsIssuerConfig), // + make_unique(Id, "scheduled-content-rating-threshold", Attributes::ScheduledContentRatingThreshold::Id, + credsIssuerConfig), // + make_unique(Id, "screen-daily-time", Attributes::ScreenDailyTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-screen-time", Attributes::RemainingScreenTime::Id, credsIssuerConfig), // + make_unique(Id, "block-unrated", Attributes::BlockUnrated::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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "remaining-screen-time-expired", Events::RemainingScreenTimeExpired::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "remaining-screen-time-expired", Events::RemainingScreenTimeExpired::Id, + credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterContentAppObserver(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ContentAppObserver; + + const char * clusterName = "ContentAppObserver"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(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, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // make_unique(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // }; @@ -22131,8 +25312,10 @@ void registerClusterSampleMei(Commands & commands, CredentialIssuerCommands * cr // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "ping-count-event", Events::PingCountEvent::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "ping-count-event", Events::PingCountEvent::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -22203,7 +25386,10 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterProxyValid(commands, credsIssuerConfig); registerClusterBooleanState(commands, credsIssuerConfig); registerClusterIcdManagement(commands, credsIssuerConfig); - registerClusterOvenOperationalState(commands, credsIssuerConfig); + registerClusterTimer(commands, credsIssuerConfig); + registerClusterOvenCavityOperationalState(commands, credsIssuerConfig); + registerClusterOvenMode(commands, credsIssuerConfig); + registerClusterLaundryDryerControls(commands, credsIssuerConfig); registerClusterModeSelect(commands, credsIssuerConfig); registerClusterLaundryWasherMode(commands, credsIssuerConfig); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands, credsIssuerConfig); @@ -22222,6 +25408,12 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterRvcOperationalState(commands, credsIssuerConfig); registerClusterHepaFilterMonitoring(commands, credsIssuerConfig); registerClusterActivatedCarbonFilterMonitoring(commands, credsIssuerConfig); + registerClusterBooleanStateConfiguration(commands, credsIssuerConfig); + registerClusterValveConfigurationAndControl(commands, credsIssuerConfig); + registerClusterElectricalEnergyMeasurement(commands, credsIssuerConfig); + registerClusterDemandResponseLoadControl(commands, credsIssuerConfig); + registerClusterDeviceEnergyManagement(commands, credsIssuerConfig); + registerClusterEnergyEvse(commands, credsIssuerConfig); registerClusterDoorLock(commands, credsIssuerConfig); registerClusterWindowCovering(commands, credsIssuerConfig); registerClusterBarrierControl(commands, credsIssuerConfig); @@ -22259,6 +25451,8 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterApplicationLauncher(commands, credsIssuerConfig); registerClusterApplicationBasic(commands, credsIssuerConfig); registerClusterAccountLogin(commands, credsIssuerConfig); + registerClusterContentControl(commands, credsIssuerConfig); + registerClusterContentAppObserver(commands, credsIssuerConfig); registerClusterElectricalMeasurement(commands, credsIssuerConfig); registerClusterUnitTesting(commands, credsIssuerConfig); registerClusterFaultInjection(commands, credsIssuerConfig); 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 580236addd6100..bea41c7e1d7fee 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -237,6 +237,63 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("SceneCount", indent + 1, value.sceneCount); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneCount'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentScene", indent + 1, value.currentScene); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentScene'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentGroup", indent + 1, value.currentGroup); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentGroup'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("SceneValid", indent + 1, value.sceneValid); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneValid'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("RemainingCapacity", indent + 1, value.remainingCapacity); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RemainingCapacity'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value) { @@ -1928,57 +1985,72 @@ CHIP_ERROR DataModelLogger::LogValue( return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyRangeStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("CredentialType", indent + 1, value.credentialType); + CHIP_ERROR err = LogValue("RangeMin", indent + 1, value.rangeMin); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RangeMin'"); return err; } } { - CHIP_ERROR err = LogValue("CredentialIndex", indent + 1, value.credentialIndex); + CHIP_ERROR err = LogValue("RangeMax", indent + 1, value.rangeMax); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RangeMax'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("TransitionTime", indent + 1, value.transitionTime); + CHIP_ERROR err = LogValue("PercentMax", indent + 1, value.percentMax); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TransitionTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PercentMax'"); return err; } } { - CHIP_ERROR err = LogValue("HeatSetpoint", indent + 1, value.heatSetpoint); + CHIP_ERROR err = LogValue("PercentMin", indent + 1, value.percentMin); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatSetpoint'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PercentMin'"); return err; } } { - CHIP_ERROR err = LogValue("CoolSetpoint", indent + 1, value.coolSetpoint); + CHIP_ERROR err = LogValue("PercentTypical", indent + 1, value.percentTypical); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolSetpoint'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PercentTypical'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FixedMax", indent + 1, value.fixedMax); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FixedMax'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FixedMin", indent + 1, value.fixedMin); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FixedMin'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FixedTypical", indent + 1, value.fixedTypical); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FixedTypical'"); return err; } } @@ -1987,47 +2059,48 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Channel::Structs::ChannelInfoStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("MajorNumber", indent + 1, value.majorNumber); + CHIP_ERROR err = LogValue("MeasurementType", indent + 1, value.measurementType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MajorNumber'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MeasurementType'"); return err; } } { - CHIP_ERROR err = LogValue("MinorNumber", indent + 1, value.minorNumber); + CHIP_ERROR err = LogValue("Measured", indent + 1, value.measured); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinorNumber'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Measured'"); return err; } } { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("MinMeasuredValue", indent + 1, value.minMeasuredValue); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinMeasuredValue'"); return err; } } { - CHIP_ERROR err = LogValue("CallSign", indent + 1, value.callSign); + CHIP_ERROR err = LogValue("MaxMeasuredValue", indent + 1, value.maxMeasuredValue); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CallSign'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxMeasuredValue'"); return err; } } { - CHIP_ERROR err = LogValue("AffiliateCallSign", indent + 1, value.affiliateCallSign); + CHIP_ERROR err = LogValue("AccuracyRanges", indent + 1, value.accuracyRanges); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AffiliateCallSign'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AccuracyRanges'"); return err; } } @@ -2036,39 +2109,48 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("OperatorName", indent + 1, value.operatorName); + CHIP_ERROR err = LogValue("Energy", indent + 1, value.energy); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OperatorName'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Energy'"); return err; } } { - CHIP_ERROR err = LogValue("LineupName", indent + 1, value.lineupName); + CHIP_ERROR err = LogValue("StartTimestamp", indent + 1, value.startTimestamp); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LineupName'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTimestamp'"); return err; } } { - CHIP_ERROR err = LogValue("PostalCode", indent + 1, value.postalCode); + CHIP_ERROR err = LogValue("EndTimestamp", indent + 1, value.endTimestamp); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PostalCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndTimestamp'"); return err; } } { - CHIP_ERROR err = LogValue("LineupInfoType", indent + 1, value.lineupInfoType); + CHIP_ERROR err = LogValue("StartSystime", indent + 1, value.startSystime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LineupInfoType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartSystime'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("EndSystime", indent + 1, value.endSystime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndSystime'"); return err; } } @@ -2077,23 +2159,34 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Identifier", indent + 1, value.identifier); + CHIP_ERROR err = LogValue("HeatingSource", indent + 1, value.heatingSource); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Identifier'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingSource'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::PowerSavingsControlStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("PowerSavings", indent + 1, value.powerSavings); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PowerSavings'"); return err; } } @@ -2102,24 +2195,34 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::DutyCycleControlStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("UpdatedAt", indent + 1, value.updatedAt); + CHIP_ERROR err = LogValue("DutyCycle", indent + 1, value.dutyCycle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'UpdatedAt'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DutyCycle'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::AverageLoadControlStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Position", indent + 1, value.position); + CHIP_ERROR err = LogValue("LoadAdjustment", indent + 1, value.loadAdjustment); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Position'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LoadAdjustment'"); return err; } } @@ -2128,39 +2231,40 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::MediaInput::Structs::InputInfoStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::TemperatureControlStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Index", indent + 1, value.index); + CHIP_ERROR err = LogValue("CoolingTempOffset", indent + 1, value.coolingTempOffset); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Index'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolingTempOffset'"); return err; } } { - CHIP_ERROR err = LogValue("InputType", indent + 1, value.inputType); + CHIP_ERROR err = LogValue("HeatingtTempOffset", indent + 1, value.heatingtTempOffset); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'InputType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingtTempOffset'"); return err; } } { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("CoolingTempSetpoint", indent + 1, value.coolingTempSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolingTempSetpoint'"); return err; } } { - CHIP_ERROR err = LogValue("Description", indent + 1, value.description); + CHIP_ERROR err = LogValue("HeatingTempSetpoint", indent + 1, value.heatingTempSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Description'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingTempSetpoint'"); return err; } } @@ -2169,90 +2273,64 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::DimensionStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventTransitionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Width", indent + 1, value.width); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Width'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Height", indent + 1, value.height); + CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Height'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); return err; } } { - CHIP_ERROR err = LogValue("Metric", indent + 1, value.metric); + CHIP_ERROR err = LogValue("Control", indent + 1, value.control); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Metric'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Control'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("TemperatureControl", indent + 1, value.temperatureControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TemperatureControl'"); return err; } } { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + CHIP_ERROR err = LogValue("AverageLoadControl", indent + 1, value.averageLoadControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AverageLoadControl'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ParameterStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Type", indent + 1, value.type); + CHIP_ERROR err = LogValue("DutyCycleControl", indent + 1, value.dutyCycleControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Type'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DutyCycleControl'"); return err; } } { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + CHIP_ERROR err = LogValue("PowerSavingsControl", indent + 1, value.powerSavingsControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PowerSavingsControl'"); return err; } } { - CHIP_ERROR err = LogValue("ExternalIDList", indent + 1, value.externalIDList); + CHIP_ERROR err = LogValue("HeatingSourceControl", indent + 1, value.heatingSourceControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ExternalIDList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingSourceControl'"); return err; } } @@ -2261,141 +2339,122 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::ContentSearchStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("ParameterList", indent + 1, value.parameterList); + CHIP_ERROR err = LogValue("EventID", indent + 1, value.eventID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ParameterList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EventID'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::StyleInformationStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("ImageURL", indent + 1, value.imageURL); + CHIP_ERROR err = LogValue("ProgramID", indent + 1, value.programID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ImageURL'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProgramID'"); return err; } } { - CHIP_ERROR err = LogValue("Color", indent + 1, value.color); + CHIP_ERROR err = LogValue("Control", indent + 1, value.control); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Color'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Control'"); return err; } } { - CHIP_ERROR err = LogValue("Size", indent + 1, value.size); + CHIP_ERROR err = LogValue("DeviceClass", indent + 1, value.deviceClass); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Size'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DeviceClass'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ContentLauncher::Structs::BrandingInformationStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("ProviderName", indent + 1, value.providerName); + CHIP_ERROR err = LogValue("EnrollmentGroup", indent + 1, value.enrollmentGroup); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProviderName'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EnrollmentGroup'"); return err; } } { - CHIP_ERROR err = LogValue("Background", indent + 1, value.background); + CHIP_ERROR err = LogValue("Criticality", indent + 1, value.criticality); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Background'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Criticality'"); return err; } } { - CHIP_ERROR err = LogValue("Logo", indent + 1, value.logo); + CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Logo'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); return err; } } { - CHIP_ERROR err = LogValue("ProgressBar", indent + 1, value.progressBar); + CHIP_ERROR err = LogValue("Transitions", indent + 1, value.transitions); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProgressBar'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Transitions'"); return err; } } - { - CHIP_ERROR err = LogValue("Splash", indent + 1, value.splash); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Splash'"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("ProgramID", indent + 1, value.programID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProgramID'"); return err; } } { - CHIP_ERROR err = LogValue("WaterMark", indent + 1, value.waterMark); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'WaterMark'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::AudioOutput::Structs::OutputInfoStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Index", indent + 1, value.index); + CHIP_ERROR err = LogValue("EnrollmentGroup", indent + 1, value.enrollmentGroup); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Index'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EnrollmentGroup'"); return err; } } { - CHIP_ERROR err = LogValue("OutputType", indent + 1, value.outputType); + CHIP_ERROR err = LogValue("RandomStartMinutes", indent + 1, value.randomStartMinutes); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OutputType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RandomStartMinutes'"); return err; } } { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("RandomDurationMinutes", indent + 1, value.randomDurationMinutes); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RandomDurationMinutes'"); return err; } } @@ -2404,24 +2463,39 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::CostStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Application", indent + 1, value.application); + CHIP_ERROR err = LogValue("CostType", indent + 1, value.costType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Application'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CostType'"); return err; } } { - CHIP_ERROR err = LogValue("Endpoint", indent + 1, value.endpoint); + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Endpoint'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("DecimalPoints", indent + 1, value.decimalPoints); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DecimalPoints'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Currency", indent + 1, value.currency); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Currency'"); return err; } } @@ -2431,283 +2505,274 @@ DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value) + const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("A", indent + 1, value.a); + CHIP_ERROR err = LogValue("MinDuration", indent + 1, value.minDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinDuration'"); return err; } } { - CHIP_ERROR err = LogValue("B", indent + 1, value.b); + CHIP_ERROR err = LogValue("MaxDuration", indent + 1, value.maxDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxDuration'"); return err; } } { - CHIP_ERROR err = LogValue("C", indent + 1, value.c); + CHIP_ERROR err = LogValue("DefaultDuration", indent + 1, value.defaultDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DefaultDuration'"); return err; } } { - CHIP_ERROR err = LogValue("D", indent + 1, value.d); + CHIP_ERROR err = LogValue("ElapsedSlotTime", indent + 1, value.elapsedSlotTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'D'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ElapsedSlotTime'"); return err; } } { - CHIP_ERROR err = LogValue("E", indent + 1, value.e); + CHIP_ERROR err = LogValue("RemainingSlotTime", indent + 1, value.remainingSlotTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'E'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RemainingSlotTime'"); return err; } } { - CHIP_ERROR err = LogValue("F", indent + 1, value.f); + CHIP_ERROR err = LogValue("SlotIsPauseable", indent + 1, value.slotIsPauseable); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'F'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SlotIsPauseable'"); return err; } } { - CHIP_ERROR err = LogValue("G", indent + 1, value.g); + CHIP_ERROR err = LogValue("MinPauseDuration", indent + 1, value.minPauseDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'G'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPauseDuration'"); return err; } } { - CHIP_ERROR err = LogValue("H", indent + 1, value.h); + CHIP_ERROR err = LogValue("MaxPauseDuration", indent + 1, value.maxPauseDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'H'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPauseDuration'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("FabricSensitiveInt8u", indent + 1, value.fabricSensitiveInt8u); + CHIP_ERROR err = LogValue("ManufacturerESAState", indent + 1, value.manufacturerESAState); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveInt8u'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ManufacturerESAState'"); return err; } } { - CHIP_ERROR err = LogValue("OptionalFabricSensitiveInt8u", indent + 1, value.optionalFabricSensitiveInt8u); + CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalFabricSensitiveInt8u'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); return err; } } { - CHIP_ERROR err = LogValue("NullableFabricSensitiveInt8u", indent + 1, value.nullableFabricSensitiveInt8u); + CHIP_ERROR err = LogValue("MinPower", indent + 1, value.minPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableFabricSensitiveInt8u'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPower'"); return err; } } { - CHIP_ERROR err = LogValue("NullableOptionalFabricSensitiveInt8u", indent + 1, value.nullableOptionalFabricSensitiveInt8u); + CHIP_ERROR err = LogValue("MaxPower", indent + 1, value.maxPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, - "Struct truncated due to invalid value for 'NullableOptionalFabricSensitiveInt8u'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPower'"); return err; } } { - CHIP_ERROR err = LogValue("FabricSensitiveCharString", indent + 1, value.fabricSensitiveCharString); + CHIP_ERROR err = LogValue("NominalEnergy", indent + 1, value.nominalEnergy); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveCharString'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalEnergy'"); return err; } } { - CHIP_ERROR err = LogValue("FabricSensitiveStruct", indent + 1, value.fabricSensitiveStruct); + CHIP_ERROR err = LogValue("Costs", indent + 1, value.costs); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveStruct'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Costs'"); return err; } } { - CHIP_ERROR err = LogValue("FabricSensitiveInt8uList", indent + 1, value.fabricSensitiveInt8uList); + CHIP_ERROR err = LogValue("MinPowerAdjustment", indent + 1, value.minPowerAdjustment); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveInt8uList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPowerAdjustment'"); return err; } } { - CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("MaxPowerAdjustment", indent + 1, value.maxPowerAdjustment); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPowerAdjustment'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("NullableInt", indent + 1, value.nullableInt); + CHIP_ERROR err = LogValue("MinDurationAdjustment", indent + 1, value.minDurationAdjustment); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableInt'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinDurationAdjustment'"); return err; } } { - CHIP_ERROR err = LogValue("OptionalInt", indent + 1, value.optionalInt); + CHIP_ERROR err = LogValue("MaxDurationAdjustment", indent + 1, value.maxDurationAdjustment); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalInt'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxDurationAdjustment'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::ForecastStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("NullableOptionalInt", indent + 1, value.nullableOptionalInt); + CHIP_ERROR err = LogValue("ForecastId", indent + 1, value.forecastId); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalInt'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ForecastId'"); return err; } } { - CHIP_ERROR err = LogValue("NullableString", indent + 1, value.nullableString); + CHIP_ERROR err = LogValue("ActiveSlotNumber", indent + 1, value.activeSlotNumber); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableString'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ActiveSlotNumber'"); return err; } } { - CHIP_ERROR err = LogValue("OptionalString", indent + 1, value.optionalString); + CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalString'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); return err; } } { - CHIP_ERROR err = LogValue("NullableOptionalString", indent + 1, value.nullableOptionalString); + CHIP_ERROR err = LogValue("EndTime", indent + 1, value.endTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalString'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndTime'"); return err; } } { - CHIP_ERROR err = LogValue("NullableStruct", indent + 1, value.nullableStruct); + CHIP_ERROR err = LogValue("EarliestStartTime", indent + 1, value.earliestStartTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableStruct'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EarliestStartTime'"); return err; } } { - CHIP_ERROR err = LogValue("OptionalStruct", indent + 1, value.optionalStruct); + CHIP_ERROR err = LogValue("LatestEndTime", indent + 1, value.latestEndTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalStruct'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LatestEndTime'"); return err; } } { - CHIP_ERROR err = LogValue("NullableOptionalStruct", indent + 1, value.nullableOptionalStruct); + CHIP_ERROR err = LogValue("IsPauseable", indent + 1, value.isPauseable); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalStruct'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IsPauseable'"); return err; } } { - CHIP_ERROR err = LogValue("NullableList", indent + 1, value.nullableList); + CHIP_ERROR err = LogValue("Slots", indent + 1, value.slots); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Slots'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::ConstraintsStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("OptionalList", indent + 1, value.optionalList); + CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); return err; } } { - CHIP_ERROR err = LogValue("NullableOptionalList", indent + 1, value.nullableOptionalList); + CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalList'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::NestedStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("A", indent + 1, value.a); + CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); return err; } } { - CHIP_ERROR err = LogValue("B", indent + 1, value.b); + CHIP_ERROR err = LogValue("MaximumEnergy", indent + 1, value.maximumEnergy); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaximumEnergy'"); return err; } } { - CHIP_ERROR err = LogValue("C", indent + 1, value.c); + CHIP_ERROR err = LogValue("LoadControl", indent + 1, value.loadControl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LoadControl'"); return err; } } @@ -2716,63 +2781,74 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::NestedStructList::DecodableType & value) +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("A", indent + 1, value.a); + CHIP_ERROR err = LogValue("MinPower", indent + 1, value.minPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPower'"); return err; } } { - CHIP_ERROR err = LogValue("B", indent + 1, value.b); + CHIP_ERROR err = LogValue("MaxPower", indent + 1, value.maxPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPower'"); return err; } } { - CHIP_ERROR err = LogValue("C", indent + 1, value.c); + CHIP_ERROR err = LogValue("MinDuration", indent + 1, value.minDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinDuration'"); return err; } } { - CHIP_ERROR err = LogValue("D", indent + 1, value.d); + CHIP_ERROR err = LogValue("MaxDuration", indent + 1, value.maxDuration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'D'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxDuration'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotAdjustmentStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("E", indent + 1, value.e); + CHIP_ERROR err = LogValue("SlotIndex", indent + 1, value.slotIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'E'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SlotIndex'"); return err; } } { - CHIP_ERROR err = LogValue("F", indent + 1, value.f); + CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'F'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); return err; } } { - CHIP_ERROR err = LogValue("G", indent + 1, value.g); + CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'G'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); return err; } } @@ -2782,39 +2858,30 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType & value) + const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("A", indent + 1, value.a); + CHIP_ERROR err = LogValue("TargetTimeMinutesPastMidnight", indent + 1, value.targetTimeMinutesPastMidnight); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetTimeMinutesPastMidnight'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Member1", indent + 1, value.member1); + CHIP_ERROR err = LogValue("TargetSoC", indent + 1, value.targetSoC); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Member1'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetSoC'"); return err; } } { - CHIP_ERROR err = LogValue("Member2", indent + 1, value.member2); + CHIP_ERROR err = LogValue("AddedEnergy", indent + 1, value.addedEnergy); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Member2'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AddedEnergy'"); return err; } } @@ -2824,46 +2891,56 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const AccessControl::Events::AccessControlEntryChanged::DecodableType & value) + const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AdminNodeID", indent + 1, value.adminNodeID); + CHIP_ERROR err = LogValue("CredentialType", indent + 1, value.credentialType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminNodeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialType'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + CHIP_ERROR err = LogValue("CredentialIndex", indent + 1, value.credentialIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminPasscodeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialIndex'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ChangeType", indent + 1, value.changeType); + CHIP_ERROR err = LogValue("TransitionTime", indent + 1, value.transitionTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ChangeType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TransitionTime'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("LatestValue", indent + 1, value.latestValue); + CHIP_ERROR err = LogValue("HeatSetpoint", indent + 1, value.heatSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LatestValue'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatSetpoint'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("CoolSetpoint", indent + 1, value.coolSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolSetpoint'"); return err; } } @@ -2871,47 +2948,74 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const AccessControl::Events::AccessControlExtensionChanged::DecodableType & value) + const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AdminNodeID", indent + 1, value.adminNodeID); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminNodeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + CHIP_ERROR err = LogValue("Role", indent + 1, value.role); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminPasscodeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Role'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ProgramCategoryStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ChangeType", indent + 1, value.changeType); + CHIP_ERROR err = LogValue("Category", indent + 1, value.category); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ChangeType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Category'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("LatestValue", indent + 1, value.latestValue); + CHIP_ERROR err = LogValue("SubCategory", indent + 1, value.subCategory); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LatestValue'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SubCategory'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::SeriesInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("Season", indent + 1, value.season); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Season'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Episode", indent + 1, value.episode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Episode'"); return err; } } @@ -2919,69 +3023,64 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Actions::Events::StateChanged::DecodableType & value) + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ChannelInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ActionID", indent + 1, value.actionID); + CHIP_ERROR err = LogValue("MajorNumber", indent + 1, value.majorNumber); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ActionID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MajorNumber'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("InvokeID", indent + 1, value.invokeID); + CHIP_ERROR err = LogValue("MinorNumber", indent + 1, value.minorNumber); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'InvokeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinorNumber'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Actions::Events::ActionFailed::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ActionID", indent + 1, value.actionID); + CHIP_ERROR err = LogValue("CallSign", indent + 1, value.callSign); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ActionID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CallSign'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("InvokeID", indent + 1, value.invokeID); + CHIP_ERROR err = LogValue("AffiliateCallSign", indent + 1, value.affiliateCallSign); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'InvokeID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AffiliateCallSign'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + CHIP_ERROR err = LogValue("Identifier", indent + 1, value.identifier); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Identifier'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Error", indent + 1, value.error); + CHIP_ERROR err = LogValue("Type", indent + 1, value.type); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Error'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Type'"); return err; } } @@ -2989,231 +3088,160 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Ac return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BasicInformation::Events::StartUp::DecodableType & value) + const chip::app::Clusters::Channel::Structs::ProgramStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + CHIP_ERROR err = LogValue("Identifier", indent + 1, value.identifier); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Identifier'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BasicInformation::Events::ShutDown::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BasicInformation::Events::Leave::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("Channel", indent + 1, value.channel); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Channel'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BasicInformation::Events::ReachableChanged::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ReachableNewValue", indent + 1, value.reachableNewValue); + CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReachableNewValue'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OtaSoftwareUpdateRequestor::Events::StateTransition::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("PreviousState", indent + 1, value.previousState); + CHIP_ERROR err = LogValue("EndTime", indent + 1, value.endTime); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndTime'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + CHIP_ERROR err = LogValue("Title", indent + 1, value.title); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Title'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Reason", indent + 1, value.reason); + CHIP_ERROR err = LogValue("Subtitle", indent + 1, value.subtitle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Reason'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Subtitle'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("TargetSoftwareVersion", indent + 1, value.targetSoftwareVersion); + CHIP_ERROR err = LogValue("Description", indent + 1, value.description); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TargetSoftwareVersion'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Description'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OtaSoftwareUpdateRequestor::Events::VersionApplied::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + CHIP_ERROR err = LogValue("AudioLanguages", indent + 1, value.audioLanguages); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AudioLanguages'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("ProductID", indent + 1, value.productID); + CHIP_ERROR err = LogValue("Ratings", indent + 1, value.ratings); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ProductID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Ratings'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OtaSoftwareUpdateRequestor::Events::DownloadError::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + CHIP_ERROR err = LogValue("ThumbnailUrl", indent + 1, value.thumbnailUrl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ThumbnailUrl'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("BytesDownloaded", indent + 1, value.bytesDownloaded); + CHIP_ERROR err = LogValue("PosterArtUrl", indent + 1, value.posterArtUrl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'BytesDownloaded'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PosterArtUrl'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("ProgressPercent", indent + 1, value.progressPercent); + CHIP_ERROR err = LogValue("DvbiUrl", indent + 1, value.dvbiUrl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ProgressPercent'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DvbiUrl'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("PlatformCode", indent + 1, value.platformCode); + CHIP_ERROR err = LogValue("ReleaseDate", indent + 1, value.releaseDate); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PlatformCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ReleaseDate'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PowerSource::Events::WiredFaultChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("ParentalGuidanceText", indent + 1, value.parentalGuidanceText); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ParentalGuidanceText'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("RecordingFlag", indent + 1, value.recordingFlag); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RecordingFlag'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PowerSource::Events::BatFaultChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("SeriesInfo", indent + 1, value.seriesInfo); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SeriesInfo'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("CategoryList", indent + 1, value.categoryList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CategoryList'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PowerSource::Events::BatChargeFaultChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("CastList", indent + 1, value.castList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CastList'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("ExternalIDList", indent + 1, value.externalIDList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ExternalIDList'"); return err; } } @@ -3221,23 +3249,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralDiagnostics::Events::HardwareFaultChange::DecodableType & value) + const chip::app::Clusters::Channel::Structs::PageTokenStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("Limit", indent + 1, value.limit); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Limit'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("After", indent + 1, value.after); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'After'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Before", indent + 1, value.before); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Before'"); return err; } } @@ -3245,23 +3282,24 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralDiagnostics::Events::RadioFaultChange::DecodableType & value) + const chip::app::Clusters::Channel::Structs::ChannelPagingStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("PreviousToken", indent + 1, value.previousToken); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PreviousToken'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("NextToken", indent + 1, value.nextToken); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NextToken'"); return err; } } @@ -3269,23 +3307,24 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralDiagnostics::Events::NetworkFaultChange::DecodableType & value) + const chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); return err; } } @@ -3293,47 +3332,40 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralDiagnostics::Events::BootReason::DecodableType & value) + const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("BootReason", indent + 1, value.bootReason); + CHIP_ERROR err = LogValue("OperatorName", indent + 1, value.operatorName); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'BootReason'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OperatorName'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SoftwareDiagnostics::Events::SoftwareFault::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Id", indent + 1, value.id); + CHIP_ERROR err = LogValue("LineupName", indent + 1, value.lineupName); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Id'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LineupName'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("PostalCode", indent + 1, value.postalCode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PostalCode'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("FaultRecording", indent + 1, value.faultRecording); + CHIP_ERROR err = LogValue("LineupInfoType", indent + 1, value.lineupInfoType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FaultRecording'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LineupInfoType'"); return err; } } @@ -3341,15 +3373,24 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ThreadNetworkDiagnostics::Events::ConnectionStatus::DecodableType & value) + const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ConnectionStatus", indent + 1, value.connectionStatus); + CHIP_ERROR err = LogValue("Identifier", indent + 1, value.identifier); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ConnectionStatus'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Identifier'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } @@ -3357,23 +3398,25 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ThreadNetworkDiagnostics::Events::NetworkFaultChange::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Structs::TrackAttributesStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + CHIP_ERROR err = LogValue("LanguageCode", indent + 1, value.languageCode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LanguageCode'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + CHIP_ERROR err = LogValue("DisplayName", indent + 1, value.displayName); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DisplayName'"); return err; } } @@ -3381,15 +3424,24 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const WiFiNetworkDiagnostics::Events::Disconnection::DecodableType & value) + const chip::app::Clusters::MediaPlayback::Structs::TrackStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ReasonCode", indent + 1, value.reasonCode); + CHIP_ERROR err = LogValue("Id", indent + 1, value.id); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReasonCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Id'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("TrackAttributes", indent + 1, value.trackAttributes); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TrackAttributes'"); return err; } } @@ -3397,23 +3449,25 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const WiFiNetworkDiagnostics::Events::AssociationFailure::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AssociationFailureCause", indent + 1, value.associationFailureCause); + CHIP_ERROR err = LogValue("UpdatedAt", indent + 1, value.updatedAt); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AssociationFailureCause'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'UpdatedAt'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Status", indent + 1, value.status); + CHIP_ERROR err = LogValue("Position", indent + 1, value.position); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Status'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Position'"); return err; } } @@ -3421,63 +3475,40 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const WiFiNetworkDiagnostics::Events::ConnectionStatus::DecodableType & value) + const chip::app::Clusters::MediaInput::Structs::InputInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ConnectionStatus", indent + 1, value.connectionStatus); + CHIP_ERROR err = LogValue("Index", indent + 1, value.index); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ConnectionStatus'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Index'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Events::DSTTableEmpty::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Events::DSTStatus::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("DSTOffsetActive", indent + 1, value.DSTOffsetActive); + CHIP_ERROR err = LogValue("InputType", indent + 1, value.inputType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DSTOffsetActive'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'InputType'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Events::TimeZoneStatus::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Offset", indent + 1, value.offset); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Offset'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Name", indent + 1, value.name); + CHIP_ERROR err = LogValue("Description", indent + 1, value.description); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Name'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Description'"); return err; } } @@ -3485,31 +3516,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Events::TimeFailure::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Events::MissingTrustedTimeSource::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BridgedDeviceBasicInformation::Events::StartUp::DecodableType & value) + const chip::app::Clusters::ContentLauncher::Structs::DimensionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + CHIP_ERROR err = LogValue("Width", indent + 1, value.width); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Width'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Height", indent + 1, value.height); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Height'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Metric", indent + 1, value.metric); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Metric'"); return err; } } @@ -3517,61 +3549,33 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BridgedDeviceBasicInformation::Events::ShutDown::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BridgedDeviceBasicInformation::Events::Leave::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BridgedDeviceBasicInformation::Events::ReachableChanged::DecodableType & value) +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::TrackPreferenceStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ReachableNewValue", indent + 1, value.reachableNewValue); + CHIP_ERROR err = LogValue("LanguageCode", indent + 1, value.languageCode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReachableNewValue'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LanguageCode'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::SwitchLatched::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + CHIP_ERROR err = LogValue("Characteristics", indent + 1, value.characteristics); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Characteristics'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::InitialPress::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + CHIP_ERROR err = LogValue("AudioOutputIndex", indent + 1, value.audioOutputIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AudioOutputIndex'"); return err; } } @@ -3579,44 +3583,33 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Sw return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::LongPress::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::PlaybackPreferencesStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + CHIP_ERROR err = LogValue("PlaybackPosition", indent + 1, value.playbackPosition); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PlaybackPosition'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::ShortRelease::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + CHIP_ERROR err = LogValue("TextTrack", indent + 1, value.textTrack); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TextTrack'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::LongRelease::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + CHIP_ERROR err = LogValue("AudioTracks", indent + 1, value.audioTracks); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AudioTracks'"); return err; } } @@ -3624,24 +3617,25 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Sw return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Switch::Events::MultiPressOngoing::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } { - CHIP_ERROR err = - DataModelLogger::LogValue("CurrentNumberOfPressesCounted", indent + 1, value.currentNumberOfPressesCounted); + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CurrentNumberOfPressesCounted'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); return err; } } @@ -3649,39 +3643,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Switch::Events::MultiPressComplete::DecodableType & value) + const chip::app::Clusters::ContentLauncher::Structs::ParameterStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + CHIP_ERROR err = LogValue("Type", indent + 1, value.type); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Type'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("TotalNumberOfPressesCounted", indent + 1, value.totalNumberOfPressesCounted); + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalNumberOfPressesCounted'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BooleanState::Events::StateChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("StateValue", indent + 1, value.stateValue); + CHIP_ERROR err = LogValue("ExternalIDList", indent + 1, value.externalIDList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StateValue'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ExternalIDList'"); return err; } } @@ -3689,15 +3676,17 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OvenOperationalState::Events::OperationalError::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::ContentSearchStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + CHIP_ERROR err = LogValue("ParameterList", indent + 1, value.parameterList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ParameterList'"); return err; } } @@ -3705,31 +3694,33 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OvenOperationalState::Events::OperationCompletion::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::StyleInformationStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + CHIP_ERROR err = LogValue("ImageURL", indent + 1, value.imageURL); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ImageURL'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + CHIP_ERROR err = LogValue("Color", indent + 1, value.color); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Color'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + CHIP_ERROR err = LogValue("Size", indent + 1, value.size); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Size'"); return err; } } @@ -3737,70 +3728,57 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RefrigeratorAlarm::Events::Notify::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::BrandingInformationStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Active", indent + 1, value.active); + CHIP_ERROR err = LogValue("ProviderName", indent + 1, value.providerName); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Active'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProviderName'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Inactive", indent + 1, value.inactive); + CHIP_ERROR err = LogValue("Background", indent + 1, value.background); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Inactive'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Background'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + CHIP_ERROR err = LogValue("Logo", indent + 1, value.logo); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Logo'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Mask", indent + 1, value.mask); + CHIP_ERROR err = LogValue("ProgressBar", indent + 1, value.progressBar); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Mask'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProgressBar'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::SmokeAlarm::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + CHIP_ERROR err = LogValue("Splash", indent + 1, value.splash); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Splash'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::COAlarm::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + CHIP_ERROR err = LogValue("WaterMark", indent + 1, value.waterMark); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'WaterMark'"); return err; } } @@ -3808,87 +3786,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Sm return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::LowBattery::DecodableType & value) + const chip::app::Clusters::AudioOutput::Structs::OutputInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + CHIP_ERROR err = LogValue("Index", indent + 1, value.index); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Index'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::HardwareFault::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::EndOfService::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::SelfTestComplete::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::AlarmMuted::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::MuteEnded::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::InterconnectSmokeAlarm::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + CHIP_ERROR err = LogValue("OutputType", indent + 1, value.outputType); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OutputType'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SmokeCoAlarm::Events::InterconnectCOAlarm::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } @@ -3896,46 +3819,50 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::AllClear::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DishwasherAlarm::Events::Notify::DecodableType & value) +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Active", indent + 1, value.active); + CHIP_ERROR err = LogValue("Application", indent + 1, value.application); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Active'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Application'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Inactive", indent + 1, value.inactive); + CHIP_ERROR err = LogValue("Endpoint", indent + 1, value.endpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Inactive'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Endpoint'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::RatingNameStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + CHIP_ERROR err = LogValue("RatingName", indent + 1, value.ratingName); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RatingName'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Mask", indent + 1, value.mask); + CHIP_ERROR err = LogValue("RatingNameDesc", indent + 1, value.ratingNameDesc); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Mask'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RatingNameDesc'"); return err; } } @@ -3943,95 +3870,72 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalState::Events::OperationalError::DecodableType & value) + const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + CHIP_ERROR err = LogValue("A", indent + 1, value.a); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalState::Events::OperationCompletion::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + CHIP_ERROR err = LogValue("B", indent + 1, value.b); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + CHIP_ERROR err = LogValue("C", indent + 1, value.c); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + CHIP_ERROR err = LogValue("D", indent + 1, value.d); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'D'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcOperationalState::Events::OperationalError::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + CHIP_ERROR err = LogValue("E", indent + 1, value.e); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'E'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcOperationalState::Events::OperationCompletion::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + CHIP_ERROR err = LogValue("F", indent + 1, value.f); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'F'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + CHIP_ERROR err = LogValue("G", indent + 1, value.g); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'G'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + CHIP_ERROR err = LogValue("H", indent + 1, value.h); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'H'"); return err; } } @@ -4039,87 +3943,73 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Events::DoorLockAlarm::DecodableType & value) + const chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AlarmCode", indent + 1, value.alarmCode); + CHIP_ERROR err = LogValue("FabricSensitiveInt8u", indent + 1, value.fabricSensitiveInt8u); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmCode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveInt8u'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Events::DoorStateChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("DoorState", indent + 1, value.doorState); + CHIP_ERROR err = LogValue("OptionalFabricSensitiveInt8u", indent + 1, value.optionalFabricSensitiveInt8u); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DoorState'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalFabricSensitiveInt8u'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Events::LockOperation::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("LockOperationType", indent + 1, value.lockOperationType); + CHIP_ERROR err = LogValue("NullableFabricSensitiveInt8u", indent + 1, value.nullableFabricSensitiveInt8u); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockOperationType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableFabricSensitiveInt8u'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + CHIP_ERROR err = LogValue("NullableOptionalFabricSensitiveInt8u", indent + 1, value.nullableOptionalFabricSensitiveInt8u); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + DataModelLogger::LogString(indent + 1, + "Struct truncated due to invalid value for 'NullableOptionalFabricSensitiveInt8u'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + CHIP_ERROR err = LogValue("FabricSensitiveCharString", indent + 1, value.fabricSensitiveCharString); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveCharString'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("FabricSensitiveStruct", indent + 1, value.fabricSensitiveStruct); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveStruct'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + CHIP_ERROR err = LogValue("FabricSensitiveInt8uList", indent + 1, value.fabricSensitiveInt8uList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricSensitiveInt8uList'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Credentials", indent + 1, value.credentials); + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Credentials'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -4127,127 +4017,138 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Events::LockOperationError::DecodableType & value) + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("LockOperationType", indent + 1, value.lockOperationType); + CHIP_ERROR err = LogValue("NullableInt", indent + 1, value.nullableInt); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockOperationType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableInt'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + CHIP_ERROR err = LogValue("OptionalInt", indent + 1, value.optionalInt); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalInt'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("OperationError", indent + 1, value.operationError); + CHIP_ERROR err = LogValue("NullableOptionalInt", indent + 1, value.nullableOptionalInt); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationError'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalInt'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + CHIP_ERROR err = LogValue("NullableString", indent + 1, value.nullableString); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableString'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("OptionalString", indent + 1, value.optionalString); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalString'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + CHIP_ERROR err = LogValue("NullableOptionalString", indent + 1, value.nullableOptionalString); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalString'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Credentials", indent + 1, value.credentials); + CHIP_ERROR err = LogValue("NullableStruct", indent + 1, value.nullableStruct); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Credentials'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableStruct'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Events::LockUserChange::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("LockDataType", indent + 1, value.lockDataType); + CHIP_ERROR err = LogValue("OptionalStruct", indent + 1, value.optionalStruct); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockDataType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalStruct'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("DataOperationType", indent + 1, value.dataOperationType); + CHIP_ERROR err = LogValue("NullableOptionalStruct", indent + 1, value.nullableOptionalStruct); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DataOperationType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalStruct'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + CHIP_ERROR err = LogValue("NullableList", indent + 1, value.nullableList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableList'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + CHIP_ERROR err = LogValue("OptionalList", indent + 1, value.optionalList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'OptionalList'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("NullableOptionalList", indent + 1, value.nullableOptionalList); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NullableOptionalList'"); return err; } } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::UnitTesting::Structs::NestedStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + CHIP_ERROR err = LogValue("A", indent + 1, value.a); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("DataIndex", indent + 1, value.dataIndex); + CHIP_ERROR err = LogValue("B", indent + 1, value.b); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DataIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("C", indent + 1, value.c); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); return err; } } @@ -4255,190 +4156,64 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::SupplyVoltageLow::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::SupplyVoltageHigh::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::PowerMissingPhase::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::SystemPressureLow::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::SystemPressureHigh::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::DryRunning::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::MotorTemperatureHigh::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::PumpMotorFatalFailure::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::ElectronicTemperatureHigh::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::PumpBlocked::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::SensorFailure::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::ElectronicNonFatalFailure::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::ElectronicFatalFailure::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::GeneralFault::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::Leakage::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::AirDetection::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Events::TestEvent::DecodableType & value) + const chip::app::Clusters::UnitTesting::Structs::NestedStructList::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Arg1", indent + 1, value.arg1); + CHIP_ERROR err = LogValue("A", indent + 1, value.a); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg1'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Arg2", indent + 1, value.arg2); + CHIP_ERROR err = LogValue("B", indent + 1, value.b); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg2'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'B'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Arg3", indent + 1, value.arg3); + CHIP_ERROR err = LogValue("C", indent + 1, value.c); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg3'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'C'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Arg4", indent + 1, value.arg4); + CHIP_ERROR err = LogValue("D", indent + 1, value.d); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg4'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'D'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Arg5", indent + 1, value.arg5); + CHIP_ERROR err = LogValue("E", indent + 1, value.e); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg5'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'E'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("Arg6", indent + 1, value.arg6); + CHIP_ERROR err = LogValue("F", indent + 1, value.f); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg6'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'F'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("G", indent + 1, value.g); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'G'"); return err; } } @@ -4446,15 +4221,16 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Un return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Events::TestFabricScopedEvent::DecodableType & value) + const chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + CHIP_ERROR err = LogValue("A", indent + 1, value.a); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'A'"); return err; } } @@ -4464,759 +4240,3510 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Groups::Commands::AddGroupResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Groups::Commands::ViewGroupResponse::DecodableType & value) + const chip::app::Clusters::UnitTesting::Structs::TestListStructOctet::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupName", indent + 1, value.groupName)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Groups::Commands::GetGroupMembershipResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupList", indent + 1, value.groupList)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Groups::Commands::RemoveGroupResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + { + CHIP_ERROR err = LogValue("Member1", indent + 1, value.member1); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Member1'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Member2", indent + 1, value.member2); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Member2'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::AddSceneResponse::DecodableType & value) + const AccessControl::Events::AccessControlEntryChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AdminNodeID", indent + 1, value.adminNodeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminNodeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminPasscodeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("ChangeType", indent + 1, value.changeType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ChangeType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("LatestValue", indent + 1, value.latestValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LatestValue'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::ViewSceneResponse::DecodableType & value) + const AccessControl::Events::AccessControlExtensionChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); - ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AdminNodeID", indent + 1, value.adminNodeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminNodeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AdminPasscodeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("ChangeType", indent + 1, value.changeType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ChangeType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("LatestValue", indent + 1, value.latestValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LatestValue'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::RemoveSceneResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Actions::Events::StateChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ActionID", indent + 1, value.actionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ActionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("InvokeID", indent + 1, value.invokeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'InvokeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::RemoveAllScenesResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Actions::Events::ActionFailed::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ActionID", indent + 1, value.actionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ActionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("InvokeID", indent + 1, value.invokeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'InvokeID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Error", indent + 1, value.error); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Error'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::StoreSceneResponse::DecodableType & value) + const BasicInformation::Events::StartUp::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + { + CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::GetSceneMembershipResponse::DecodableType & value) + const BasicInformation::Events::ShutDown::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneList", indent + 1, value.sceneList)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::EnhancedAddSceneResponse::DecodableType & value) + const BasicInformation::Events::Leave::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::EnhancedViewSceneResponse::DecodableType & value) + const BasicInformation::Events::ReachableChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); - ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ReachableNewValue", indent + 1, value.reachableNewValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReachableNewValue'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::CopySceneResponse::DecodableType & value) + const OtaSoftwareUpdateRequestor::Events::StateTransition::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupIdentifierFrom", indent + 1, value.groupIdentifierFrom)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdentifierFrom", indent + 1, value.sceneIdentifierFrom)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("delayedActionTime", indent + 1, value.delayedActionTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("imageURI", indent + 1, value.imageURI)); - ReturnErrorOnFailure(DataModelLogger::LogValue("softwareVersion", indent + 1, value.softwareVersion)); - ReturnErrorOnFailure(DataModelLogger::LogValue("softwareVersionString", indent + 1, value.softwareVersionString)); - ReturnErrorOnFailure(DataModelLogger::LogValue("updateToken", indent + 1, value.updateToken)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userConsentNeeded", indent + 1, value.userConsentNeeded)); - ReturnErrorOnFailure(DataModelLogger::LogValue("metadataForRequestor", indent + 1, value.metadataForRequestor)); + { + CHIP_ERROR err = DataModelLogger::LogValue("PreviousState", indent + 1, value.previousState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("NewState", indent + 1, value.newState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Reason", indent + 1, value.reason); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Reason'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TargetSoftwareVersion", indent + 1, value.targetSoftwareVersion); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TargetSoftwareVersion'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & value) + const OtaSoftwareUpdateRequestor::Events::VersionApplied::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("action", indent + 1, value.action)); - ReturnErrorOnFailure(DataModelLogger::LogValue("delayedActionTime", indent + 1, value.delayedActionTime)); + { + CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("ProductID", indent + 1, value.productID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ProductID'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & value) + const OtaSoftwareUpdateRequestor::Events::DownloadError::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("BytesDownloaded", indent + 1, value.bytesDownloaded); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'BytesDownloaded'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("ProgressPercent", indent + 1, value.progressPercent); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ProgressPercent'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PlatformCode", indent + 1, value.platformCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PlatformCode'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & value) + const PowerSource::Events::WiredFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & value) + const PowerSource::Events::BatFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & value) + const PowerSource::Events::BatChargeFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); - ReturnErrorOnFailure(DataModelLogger::LogValue("wiFiScanResults", indent + 1, value.wiFiScanResults)); - ReturnErrorOnFailure(DataModelLogger::LogValue("threadScanResults", indent + 1, value.threadScanResults)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & value) + const GeneralDiagnostics::Events::HardwareFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); - ReturnErrorOnFailure(DataModelLogger::LogValue("networkIndex", indent + 1, value.networkIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("clientIdentity", indent + 1, value.clientIdentity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & value) + const GeneralDiagnostics::Events::RadioFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); - ReturnErrorOnFailure(DataModelLogger::LogValue("errorValue", indent + 1, value.errorValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & value) + const GeneralDiagnostics::Events::NetworkFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("identity", indent + 1, value.identity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & value) + const GeneralDiagnostics::Events::BootReason::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("logContent", indent + 1, value.logContent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("UTCTimeStamp", indent + 1, value.UTCTimeStamp)); - ReturnErrorOnFailure(DataModelLogger::LogValue("timeSinceBoot", indent + 1, value.timeSinceBoot)); + { + CHIP_ERROR err = DataModelLogger::LogValue("BootReason", indent + 1, value.bootReason); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'BootReason'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & value) + const SoftwareDiagnostics::Events::SoftwareFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("systemTimeUs", indent + 1, value.systemTimeUs)); - ReturnErrorOnFailure(DataModelLogger::LogValue("UTCTimeUs", indent + 1, value.UTCTimeUs)); - DataModelLogger::LogString(indent, "}"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Id", indent + 1, value.id); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Id'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Name'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FaultRecording", indent + 1, value.faultRecording); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FaultRecording'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & value) + const ThreadNetworkDiagnostics::Events::ConnectionStatus::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("DSTOffsetRequired", indent + 1, value.DSTOffsetRequired)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ConnectionStatus", indent + 1, value.connectionStatus); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ConnectionStatus'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalCredentials::Commands::AttestationResponse::DecodableType & value) + const ThreadNetworkDiagnostics::Events::NetworkFaultChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("attestationElements", indent + 1, value.attestationElements)); - ReturnErrorOnFailure(DataModelLogger::LogValue("attestationSignature", indent + 1, value.attestationSignature)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Current", indent + 1, value.current); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Current'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Previous", indent + 1, value.previous); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Previous'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalCredentials::Commands::CertificateChainResponse::DecodableType & value) + const WiFiNetworkDiagnostics::Events::Disconnection::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("certificate", indent + 1, value.certificate)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ReasonCode", indent + 1, value.reasonCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReasonCode'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalCredentials::Commands::CSRResponse::DecodableType & value) + const WiFiNetworkDiagnostics::Events::AssociationFailure::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("NOCSRElements", indent + 1, value.NOCSRElements)); - ReturnErrorOnFailure(DataModelLogger::LogValue("attestationSignature", indent + 1, value.attestationSignature)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AssociationFailureCause", indent + 1, value.associationFailureCause); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AssociationFailureCause'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Status", indent + 1, value.status); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Status'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalCredentials::Commands::NOCResponse::DecodableType & value) + const WiFiNetworkDiagnostics::Events::ConnectionStatus::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusCode", indent + 1, value.statusCode)); - ReturnErrorOnFailure(DataModelLogger::LogValue("fabricIndex", indent + 1, value.fabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ConnectionStatus", indent + 1, value.connectionStatus); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ConnectionStatus'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & value) + const TimeSynchronization::Events::DSTTableEmpty::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySet", indent + 1, value.groupKeySet)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value) + const TimeSynchronization::Events::DSTStatus::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySetIDs", indent + 1, value.groupKeySetIDs)); + { + CHIP_ERROR err = DataModelLogger::LogValue("DSTOffsetActive", indent + 1, value.DSTOffsetActive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DSTOffsetActive'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const IcdManagement::Commands::RegisterClientResponse::DecodableType & value) + const TimeSynchronization::Events::TimeZoneStatus::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("ICDCounter", indent + 1, value.ICDCounter)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Offset", indent + 1, value.offset); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Offset'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Name'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OvenOperationalState::Commands::OperationalCommandResponse::DecodableType & value) + const TimeSynchronization::Events::TimeFailure::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value) + const TimeSynchronization::Events::MissingTrustedTimeSource::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue( - const char * label, size_t indent, - const RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const BridgedDeviceBasicInformation::Events::StartUp::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("SoftwareVersion", indent + 1, value.softwareVersion); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SoftwareVersion'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcRunMode::Commands::ChangeToModeResponse::DecodableType & value) + const BridgedDeviceBasicInformation::Events::ShutDown::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & value) + const BridgedDeviceBasicInformation::Events::Leave::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DishwasherMode::Commands::ChangeToModeResponse::DecodableType & value) + const BridgedDeviceBasicInformation::Events::ReachableChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ReachableNewValue", indent + 1, value.reachableNewValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ReachableNewValue'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalState::Commands::OperationalCommandResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::SwitchLatched::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + { + CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::InitialPress::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + { + CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::LongPress::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("weekDayIndex", indent + 1, value.weekDayIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("daysMask", indent + 1, value.daysMask)); - ReturnErrorOnFailure(DataModelLogger::LogValue("startHour", indent + 1, value.startHour)); - ReturnErrorOnFailure(DataModelLogger::LogValue("startMinute", indent + 1, value.startMinute)); - ReturnErrorOnFailure(DataModelLogger::LogValue("endHour", indent + 1, value.endHour)); - ReturnErrorOnFailure(DataModelLogger::LogValue("endMinute", indent + 1, value.endMinute)); + { + CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::ShortRelease::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("yearDayIndex", indent + 1, value.yearDayIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("localStartTime", indent + 1, value.localStartTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("localEndTime", indent + 1, value.localEndTime)); + { + CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Switch::Events::LongRelease::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("holidayIndex", indent + 1, value.holidayIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("localStartTime", indent + 1, value.localStartTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("localEndTime", indent + 1, value.localEndTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("operatingMode", indent + 1, value.operatingMode)); + { + CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::GetUserResponse::DecodableType & value) + const Switch::Events::MultiPressOngoing::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userName", indent + 1, value.userName)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userUniqueID", indent + 1, value.userUniqueID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userStatus", indent + 1, value.userStatus)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userType", indent + 1, value.userType)); - ReturnErrorOnFailure(DataModelLogger::LogValue("credentialRule", indent + 1, value.credentialRule)); - ReturnErrorOnFailure(DataModelLogger::LogValue("credentials", indent + 1, value.credentials)); - ReturnErrorOnFailure(DataModelLogger::LogValue("creatorFabricIndex", indent + 1, value.creatorFabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("lastModifiedFabricIndex", indent + 1, value.lastModifiedFabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nextUserIndex", indent + 1, value.nextUserIndex)); + { + CHIP_ERROR err = DataModelLogger::LogValue("NewPosition", indent + 1, value.newPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'NewPosition'"); + return err; + } + } + { + CHIP_ERROR err = + DataModelLogger::LogValue("CurrentNumberOfPressesCounted", indent + 1, value.currentNumberOfPressesCounted); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CurrentNumberOfPressesCounted'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::SetCredentialResponse::DecodableType & value) + const Switch::Events::MultiPressComplete::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nextCredentialIndex", indent + 1, value.nextCredentialIndex)); + { + CHIP_ERROR err = DataModelLogger::LogValue("PreviousPosition", indent + 1, value.previousPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PreviousPosition'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TotalNumberOfPressesCounted", indent + 1, value.totalNumberOfPressesCounted); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalNumberOfPressesCounted'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DoorLock::Commands::GetCredentialStatusResponse::DecodableType & value) + const BooleanState::Events::StateChange::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("credentialExists", indent + 1, value.credentialExists)); - ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("creatorFabricIndex", indent + 1, value.creatorFabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("lastModifiedFabricIndex", indent + 1, value.lastModifiedFabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nextCredentialIndex", indent + 1, value.nextCredentialIndex)); + { + CHIP_ERROR err = DataModelLogger::LogValue("StateValue", indent + 1, value.stateValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StateValue'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value) + const OvenCavityOperationalState::Events::OperationalError::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure( - DataModelLogger::LogValue("numberOfTransitionsForSequence", indent + 1, value.numberOfTransitionsForSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("modeForSequence", indent + 1, value.modeForSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("transitions", indent + 1, value.transitions)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Channel::Commands::ChangeChannelResponse::DecodableType & value) + const OvenCavityOperationalState::Events::OperationCompletion::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + { + CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const TargetNavigator::Commands::NavigateTargetResponse::DecodableType & value) + const RefrigeratorAlarm::Events::Notify::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Active", indent + 1, value.active); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Active'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Inactive", indent + 1, value.inactive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Inactive'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Mask", indent + 1, value.mask); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Mask'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const MediaPlayback::Commands::PlaybackResponse::DecodableType & value) + const SmokeCoAlarm::Events::SmokeAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const KeypadInput::Commands::SendKeyResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::COAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ContentLauncher::Commands::LauncherResponse::DecodableType & value) + const SmokeCoAlarm::Events::LowBattery::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ApplicationLauncher::Commands::LauncherResponse::DecodableType & value) + const SmokeCoAlarm::Events::HardwareFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const AccountLogin::Commands::GetSetupPINResponse::DecodableType & value) + const SmokeCoAlarm::Events::EndOfService::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("setupPIN", indent + 1, value.setupPIN)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & value) + const SmokeCoAlarm::Events::SelfTestComplete::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileCount", indent + 1, value.profileCount)); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); - ReturnErrorOnFailure(DataModelLogger::LogValue("maxNumberOfIntervals", indent + 1, value.maxNumberOfIntervals)); - ReturnErrorOnFailure(DataModelLogger::LogValue("listOfAttributes", indent + 1, value.listOfAttributes)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const SmokeCoAlarm::Events::AlarmMuted::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("startTime", indent + 1, value.startTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); - ReturnErrorOnFailure(DataModelLogger::LogValue("numberOfIntervalsDelivered", indent + 1, value.numberOfIntervalsDelivered)); - ReturnErrorOnFailure(DataModelLogger::LogValue("attributeId", indent + 1, value.attributeId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("intervals", indent + 1, value.intervals)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestSpecificResponse::DecodableType & value) + const SmokeCoAlarm::Events::MuteEnded::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & value) + const SmokeCoAlarm::Events::InterconnectSmokeAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & value) + const SmokeCoAlarm::Events::InterconnectCOAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::AllClear::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg2", indent + 1, value.arg2)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg3", indent + 1, value.arg3)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg4", indent + 1, value.arg4)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg5", indent + 1, value.arg5)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg6", indent + 1, value.arg6)); DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & value) + const DishwasherAlarm::Events::Notify::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + { + CHIP_ERROR err = DataModelLogger::LogValue("Active", indent + 1, value.active); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Active'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Inactive", indent + 1, value.inactive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Inactive'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Mask", indent + 1, value.mask); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Mask'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestEnumsResponse::DecodableType & value) + const OperationalState::Events::OperationalError::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg2", indent + 1, value.arg2)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & value) + const OperationalState::Events::OperationCompletion::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("wasPresent", indent + 1, value.wasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("wasNull", indent + 1, value.wasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); - ReturnErrorOnFailure(DataModelLogger::LogValue("originalValue", indent + 1, value.originalValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & value) + const RvcOperationalState::Events::OperationalError::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableIntWasNull", indent + 1, value.nullableIntWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableIntValue", indent + 1, value.nullableIntValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalIntWasPresent", indent + 1, value.optionalIntWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalIntValue", indent + 1, value.optionalIntValue)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalIntWasPresent", indent + 1, value.nullableOptionalIntWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalIntWasNull", indent + 1, value.nullableOptionalIntWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalIntValue", indent + 1, value.nullableOptionalIntValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStringWasNull", indent + 1, value.nullableStringWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStringValue", indent + 1, value.nullableStringValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStringWasPresent", indent + 1, value.optionalStringWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStringValue", indent + 1, value.optionalStringValue)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalStringWasPresent", indent + 1, value.nullableOptionalStringWasPresent)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalStringWasNull", indent + 1, value.nullableOptionalStringWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalStringValue", indent + 1, value.nullableOptionalStringValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStructWasNull", indent + 1, value.nullableStructWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStructValue", indent + 1, value.nullableStructValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStructWasPresent", indent + 1, value.optionalStructWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStructValue", indent + 1, value.optionalStructValue)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalStructWasPresent", indent + 1, value.nullableOptionalStructWasPresent)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalStructWasNull", indent + 1, value.nullableOptionalStructWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalStructValue", indent + 1, value.nullableOptionalStructValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableListWasNull", indent + 1, value.nullableListWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableListValue", indent + 1, value.nullableListValue)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalListWasPresent", indent + 1, value.optionalListWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("optionalListValue", indent + 1, value.optionalListValue)); - ReturnErrorOnFailure( - DataModelLogger::LogValue("nullableOptionalListWasPresent", indent + 1, value.nullableOptionalListWasPresent)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalListWasNull", indent + 1, value.nullableOptionalListWasNull)); - ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalListValue", indent + 1, value.nullableOptionalListValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ErrorState", indent + 1, value.errorState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ErrorState'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::BooleanResponse::DecodableType & value) + const RvcOperationalState::Events::OperationCompletion::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + { + CHIP_ERROR err = DataModelLogger::LogValue("CompletionErrorCode", indent + 1, value.completionErrorCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CompletionErrorCode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TotalOperationalTime", indent + 1, value.totalOperationalTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TotalOperationalTime'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PausedTime", indent + 1, value.pausedTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PausedTime'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::SimpleStructResponse::DecodableType & value) + const BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmsActive", indent + 1, value.alarmsActive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmsActive'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmsSuppressed", indent + 1, value.alarmsSuppressed); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmsSuppressed'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & value) + const BooleanStateConfiguration::Events::SensorFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + { + CHIP_ERROR err = DataModelLogger::LogValue("SensorFault", indent + 1, value.sensorFault); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SensorFault'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value) + const ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ValveState", indent + 1, value.valveState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ValveState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("ValveLevel", indent + 1, value.valveLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ValveLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const SampleMei::Commands::AddArgumentsResponse::DecodableType & value) + const ValveConfigurationAndControl::Events::ValveFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + { + CHIP_ERROR err = DataModelLogger::LogValue("ValveFault", indent + 1, value.valveFault); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ValveFault'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; } - -CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ElectricalEnergyMeasurement::Events::CumulativeEnergyMeasured::DecodableType & value) { - ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI " DataVersion: %" PRIu32, - path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId), - path.mDataVersion.ValueOr(0)); - - switch (path.mClusterId) + DataModelLogger::LogString(label, indent, "{"); { - case Identify::Id: { - switch (path.mAttributeId) + CHIP_ERROR err = DataModelLogger::LogValue("EnergyImported", indent + 1, value.energyImported); + if (err != CHIP_NO_ERROR) { - case Identify::Attributes::IdentifyTime::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("IdentifyTime", 1, value); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyImported'"); + return err; } - case Identify::Attributes::IdentifyType::Id: { - chip::app::Clusters::Identify::IdentifyTypeEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("IdentifyType", 1, value); + } + { + CHIP_ERROR err = DataModelLogger::LogValue("EnergyExported", indent + 1, value.energyExported); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyExported'"); + return err; } - case Identify::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ElectricalEnergyMeasurement::Events::PeriodicEnergyMeasured::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("EnergyImported", indent + 1, value.energyImported); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyImported'"); + return err; } - case Identify::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + } + { + CHIP_ERROR err = DataModelLogger::LogValue("EnergyExported", indent + 1, value.energyExported); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyExported'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("EventID", indent + 1, value.eventID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EventID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TransitionIndex", indent + 1, value.transitionIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TransitionIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Status", indent + 1, value.status); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Status'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Criticality", indent + 1, value.criticality); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Criticality'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Control", indent + 1, value.control); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Control'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("TemperatureControl", indent + 1, value.temperatureControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TemperatureControl'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AverageLoadControl", indent + 1, value.averageLoadControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AverageLoadControl'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("DutyCycleControl", indent + 1, value.dutyCycleControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DutyCycleControl'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PowerSavingsControl", indent + 1, value.powerSavingsControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PowerSavingsControl'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("HeatingSourceControl", indent + 1, value.heatingSourceControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'HeatingSourceControl'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DeviceEnergyManagement::Events::PowerAdjustStart::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DeviceEnergyManagement::Events::PowerAdjustEnd::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Cause", indent + 1, value.cause); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Cause'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Duration", indent + 1, value.duration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Duration'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("EnergyUse", indent + 1, value.energyUse); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyUse'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DeviceEnergyManagement::Events::Paused::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DeviceEnergyManagement::Events::Resumed::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const EnergyEvse::Events::EVConnected::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionID", indent + 1, value.sessionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionID'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const EnergyEvse::Events::EVNotDetected::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionID", indent + 1, value.sessionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionDuration", indent + 1, value.sessionDuration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionDuration'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionEnergyCharged", indent + 1, value.sessionEnergyCharged); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionEnergyCharged'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionEnergyDischarged", indent + 1, value.sessionEnergyDischarged); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionEnergyDischarged'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const EnergyEvse::Events::EnergyTransferStarted::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionID", indent + 1, value.sessionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("MaximumCurrent", indent + 1, value.maximumCurrent); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'MaximumCurrent'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const EnergyEvse::Events::EnergyTransferStopped::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionID", indent + 1, value.sessionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Reason", indent + 1, value.reason); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Reason'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("EnergyTransferred", indent + 1, value.energyTransferred); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'EnergyTransferred'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const EnergyEvse::Events::Fault::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SessionID", indent + 1, value.sessionID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SessionID'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FaultStatePreviousState", indent + 1, value.faultStatePreviousState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FaultStatePreviousState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FaultStateCurrentState", indent + 1, value.faultStateCurrentState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FaultStateCurrentState'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const EnergyEvse::Events::Rfid::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Uid", indent + 1, value.uid); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Uid'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Events::DoorLockAlarm::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmCode", indent + 1, value.alarmCode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmCode'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Events::DoorStateChange::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("DoorState", indent + 1, value.doorState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DoorState'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Events::LockOperation::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("LockOperationType", indent + 1, value.lockOperationType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockOperationType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Credentials", indent + 1, value.credentials); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Credentials'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Events::LockOperationError::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("LockOperationType", indent + 1, value.lockOperationType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockOperationType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("OperationError", indent + 1, value.operationError); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationError'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Credentials", indent + 1, value.credentials); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Credentials'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Events::LockUserChange::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("LockDataType", indent + 1, value.lockDataType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'LockDataType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("DataOperationType", indent + 1, value.dataOperationType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DataOperationType'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("OperationSource", indent + 1, value.operationSource); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'OperationSource'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("UserIndex", indent + 1, value.userIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'UserIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SourceNode", indent + 1, value.sourceNode); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SourceNode'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("DataIndex", indent + 1, value.dataIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'DataIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::SupplyVoltageLow::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::SupplyVoltageHigh::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::PowerMissingPhase::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::SystemPressureLow::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::SystemPressureHigh::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::DryRunning::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::MotorTemperatureHigh::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::PumpMotorFatalFailure::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::ElectronicTemperatureHigh::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::PumpBlocked::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::SensorFailure::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::ElectronicNonFatalFailure::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::ElectronicFatalFailure::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::GeneralFault::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::Leakage::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::AirDetection::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const TargetNavigator::Events::TargetUpdated::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("TargetList", indent + 1, value.targetList); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'TargetList'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("CurrentTarget", indent + 1, value.currentTarget); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CurrentTarget'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Data", indent + 1, value.data); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Data'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const MediaPlayback::Events::StateChanged::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("CurrentState", indent + 1, value.currentState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CurrentState'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("StartTime", indent + 1, value.startTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StartTime'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Duration", indent + 1, value.duration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Duration'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SampledPosition", indent + 1, value.sampledPosition); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SampledPosition'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("PlaybackSpeed", indent + 1, value.playbackSpeed); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PlaybackSpeed'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SeekRangeEnd", indent + 1, value.seekRangeEnd); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SeekRangeEnd'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("SeekRangeStart", indent + 1, value.seekRangeStart); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SeekRangeStart'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Data", indent + 1, value.data); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Data'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AudioAdvanceUnmuted", indent + 1, value.audioAdvanceUnmuted); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AudioAdvanceUnmuted'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const AccountLogin::Events::LoggedOut::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Node", indent + 1, value.node); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Node'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ContentControl::Events::RemainingScreenTimeExpired::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Events::TestEvent::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg1", indent + 1, value.arg1); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg1'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg2", indent + 1, value.arg2); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg2'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg3", indent + 1, value.arg3); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg3'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg4", indent + 1, value.arg4); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg4'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg5", indent + 1, value.arg5); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg5'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Arg6", indent + 1, value.arg6); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Arg6'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Events::TestFabricScopedEvent::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const SampleMei::Events::PingCountEvent::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Count", indent + 1, value.count); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Count'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Groups::Commands::AddGroupResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Groups::Commands::ViewGroupResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupName", indent + 1, value.groupName)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Groups::Commands::GetGroupMembershipResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupList", indent + 1, value.groupList)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Groups::Commands::RemoveGroupResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::AddSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::ViewSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); + ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::RemoveSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::RemoveAllScenesResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::StoreSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::GetSceneMembershipResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneList", indent + 1, value.sceneList)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::EnhancedAddSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::EnhancedViewSceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); + ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Scenes::Commands::CopySceneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupIdentifierFrom", indent + 1, value.groupIdentifierFrom)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdentifierFrom", indent + 1, value.sceneIdentifierFrom)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("delayedActionTime", indent + 1, value.delayedActionTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("imageURI", indent + 1, value.imageURI)); + ReturnErrorOnFailure(DataModelLogger::LogValue("softwareVersion", indent + 1, value.softwareVersion)); + ReturnErrorOnFailure(DataModelLogger::LogValue("softwareVersionString", indent + 1, value.softwareVersionString)); + ReturnErrorOnFailure(DataModelLogger::LogValue("updateToken", indent + 1, value.updateToken)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userConsentNeeded", indent + 1, value.userConsentNeeded)); + ReturnErrorOnFailure(DataModelLogger::LogValue("metadataForRequestor", indent + 1, value.metadataForRequestor)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("action", indent + 1, value.action)); + ReturnErrorOnFailure(DataModelLogger::LogValue("delayedActionTime", indent + 1, value.delayedActionTime)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("errorCode", indent + 1, value.errorCode)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("wiFiScanResults", indent + 1, value.wiFiScanResults)); + ReturnErrorOnFailure(DataModelLogger::LogValue("threadScanResults", indent + 1, value.threadScanResults)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("networkIndex", indent + 1, value.networkIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("clientIdentity", indent + 1, value.clientIdentity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("networkingStatus", indent + 1, value.networkingStatus)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("errorValue", indent + 1, value.errorValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("identity", indent + 1, value.identity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("possessionSignature", indent + 1, value.possessionSignature)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("logContent", indent + 1, value.logContent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("UTCTimeStamp", indent + 1, value.UTCTimeStamp)); + ReturnErrorOnFailure(DataModelLogger::LogValue("timeSinceBoot", indent + 1, value.timeSinceBoot)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("systemTimeMs", indent + 1, value.systemTimeMs)); + ReturnErrorOnFailure(DataModelLogger::LogValue("posixTimeMs", indent + 1, value.posixTimeMs)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("DSTOffsetRequired", indent + 1, value.DSTOffsetRequired)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OperationalCredentials::Commands::AttestationResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("attestationElements", indent + 1, value.attestationElements)); + ReturnErrorOnFailure(DataModelLogger::LogValue("attestationSignature", indent + 1, value.attestationSignature)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OperationalCredentials::Commands::CertificateChainResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("certificate", indent + 1, value.certificate)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OperationalCredentials::Commands::CSRResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("NOCSRElements", indent + 1, value.NOCSRElements)); + ReturnErrorOnFailure(DataModelLogger::LogValue("attestationSignature", indent + 1, value.attestationSignature)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OperationalCredentials::Commands::NOCResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusCode", indent + 1, value.statusCode)); + ReturnErrorOnFailure(DataModelLogger::LogValue("fabricIndex", indent + 1, value.fabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySet", indent + 1, value.groupKeySet)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySetIDs", indent + 1, value.groupKeySetIDs)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Commands::RegisterClientResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("ICDCounter", indent + 1, value.ICDCounter)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Commands::StayActiveResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("promisedActiveDuration", indent + 1, value.promisedActiveDuration)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OvenMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcRunMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DishwasherMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OperationalState::Commands::OperationalCommandResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const EnergyEvse::Commands::GetTargetsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekforSequence", indent + 1, value.dayOfWeekforSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("chargingTargets", indent + 1, value.chargingTargets)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("weekDayIndex", indent + 1, value.weekDayIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("daysMask", indent + 1, value.daysMask)); + ReturnErrorOnFailure(DataModelLogger::LogValue("startHour", indent + 1, value.startHour)); + ReturnErrorOnFailure(DataModelLogger::LogValue("startMinute", indent + 1, value.startMinute)); + ReturnErrorOnFailure(DataModelLogger::LogValue("endHour", indent + 1, value.endHour)); + ReturnErrorOnFailure(DataModelLogger::LogValue("endMinute", indent + 1, value.endMinute)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("yearDayIndex", indent + 1, value.yearDayIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("localStartTime", indent + 1, value.localStartTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("localEndTime", indent + 1, value.localEndTime)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("holidayIndex", indent + 1, value.holidayIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("localStartTime", indent + 1, value.localStartTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("localEndTime", indent + 1, value.localEndTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("operatingMode", indent + 1, value.operatingMode)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::GetUserResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userName", indent + 1, value.userName)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userUniqueID", indent + 1, value.userUniqueID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userStatus", indent + 1, value.userStatus)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userType", indent + 1, value.userType)); + ReturnErrorOnFailure(DataModelLogger::LogValue("credentialRule", indent + 1, value.credentialRule)); + ReturnErrorOnFailure(DataModelLogger::LogValue("credentials", indent + 1, value.credentials)); + ReturnErrorOnFailure(DataModelLogger::LogValue("creatorFabricIndex", indent + 1, value.creatorFabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("lastModifiedFabricIndex", indent + 1, value.lastModifiedFabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nextUserIndex", indent + 1, value.nextUserIndex)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::SetCredentialResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nextCredentialIndex", indent + 1, value.nextCredentialIndex)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DoorLock::Commands::GetCredentialStatusResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("credentialExists", indent + 1, value.credentialExists)); + ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("creatorFabricIndex", indent + 1, value.creatorFabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("lastModifiedFabricIndex", indent + 1, value.lastModifiedFabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nextCredentialIndex", indent + 1, value.nextCredentialIndex)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure( + DataModelLogger::LogValue("numberOfTransitionsForSequence", indent + 1, value.numberOfTransitionsForSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("modeForSequence", indent + 1, value.modeForSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("transitions", indent + 1, value.transitions)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Channel::Commands::ChangeChannelResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Channel::Commands::ProgramGuideResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("channelPagingStruct", indent + 1, value.channelPagingStruct)); + ReturnErrorOnFailure(DataModelLogger::LogValue("programList", indent + 1, value.programList)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const TargetNavigator::Commands::NavigateTargetResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const MediaPlayback::Commands::PlaybackResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const KeypadInput::Commands::SendKeyResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ContentLauncher::Commands::LauncherResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ApplicationLauncher::Commands::LauncherResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const AccountLogin::Commands::GetSetupPINResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("setupPIN", indent + 1, value.setupPIN)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ContentControl::Commands::ResetPINResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("PINCode", indent + 1, value.PINCode)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("data", indent + 1, value.data)); + ReturnErrorOnFailure(DataModelLogger::LogValue("encodingHint", indent + 1, value.encodingHint)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("profileCount", indent + 1, value.profileCount)); + ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); + ReturnErrorOnFailure(DataModelLogger::LogValue("maxNumberOfIntervals", indent + 1, value.maxNumberOfIntervals)); + ReturnErrorOnFailure(DataModelLogger::LogValue("listOfAttributes", indent + 1, value.listOfAttributes)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("startTime", indent + 1, value.startTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); + ReturnErrorOnFailure(DataModelLogger::LogValue("numberOfIntervalsDelivered", indent + 1, value.numberOfIntervalsDelivered)); + ReturnErrorOnFailure(DataModelLogger::LogValue("attributeId", indent + 1, value.attributeId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("intervals", indent + 1, value.intervals)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestSpecificResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg2", indent + 1, value.arg2)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg3", indent + 1, value.arg3)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg4", indent + 1, value.arg4)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg5", indent + 1, value.arg5)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg6", indent + 1, value.arg6)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestEnumsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg2", indent + 1, value.arg2)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("wasPresent", indent + 1, value.wasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("wasNull", indent + 1, value.wasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + ReturnErrorOnFailure(DataModelLogger::LogValue("originalValue", indent + 1, value.originalValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableIntWasNull", indent + 1, value.nullableIntWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableIntValue", indent + 1, value.nullableIntValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalIntWasPresent", indent + 1, value.optionalIntWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalIntValue", indent + 1, value.optionalIntValue)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalIntWasPresent", indent + 1, value.nullableOptionalIntWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalIntWasNull", indent + 1, value.nullableOptionalIntWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalIntValue", indent + 1, value.nullableOptionalIntValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStringWasNull", indent + 1, value.nullableStringWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStringValue", indent + 1, value.nullableStringValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStringWasPresent", indent + 1, value.optionalStringWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStringValue", indent + 1, value.optionalStringValue)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalStringWasPresent", indent + 1, value.nullableOptionalStringWasPresent)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalStringWasNull", indent + 1, value.nullableOptionalStringWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalStringValue", indent + 1, value.nullableOptionalStringValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStructWasNull", indent + 1, value.nullableStructWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableStructValue", indent + 1, value.nullableStructValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStructWasPresent", indent + 1, value.optionalStructWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalStructValue", indent + 1, value.optionalStructValue)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalStructWasPresent", indent + 1, value.nullableOptionalStructWasPresent)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalStructWasNull", indent + 1, value.nullableOptionalStructWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalStructValue", indent + 1, value.nullableOptionalStructValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableListWasNull", indent + 1, value.nullableListWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableListValue", indent + 1, value.nullableListValue)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalListWasPresent", indent + 1, value.optionalListWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("optionalListValue", indent + 1, value.optionalListValue)); + ReturnErrorOnFailure( + DataModelLogger::LogValue("nullableOptionalListWasPresent", indent + 1, value.nullableOptionalListWasPresent)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalListWasNull", indent + 1, value.nullableOptionalListWasNull)); + ReturnErrorOnFailure(DataModelLogger::LogValue("nullableOptionalListValue", indent + 1, value.nullableOptionalListValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::BooleanResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::SimpleStructResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("arg1", indent + 1, value.arg1)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("value", indent + 1, value.value)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const SampleMei::Commands::AddArgumentsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data) +{ + ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI " DataVersion: %" PRIu32, + path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId), + path.mDataVersion.ValueOr(0)); + + switch (path.mClusterId) + { + case Identify::Id: { + switch (path.mAttributeId) + { + case Identify::Attributes::IdentifyTime::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("IdentifyTime", 1, value); + } + case Identify::Attributes::IdentifyType::Id: { + chip::app::Clusters::Identify::IdentifyTypeEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("IdentifyType", 1, value); + } + case Identify::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case Identify::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case Identify::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case Identify::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case Identify::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case Identify::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case Groups::Id: { + switch (path.mAttributeId) + { + case Groups::Attributes::NameSupport::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NameSupport", 1, value); + } + case Groups::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case Groups::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case Groups::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case Groups::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case Groups::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case Groups::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case Scenes::Id: { + switch (path.mAttributeId) + { + case Scenes::Attributes::SceneCount::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneCount", 1, value); + } + case Scenes::Attributes::CurrentScene::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentScene", 1, value); + } + case Scenes::Attributes::CurrentGroup::Id: { + chip::GroupId value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentGroup", 1, value); + } + case Scenes::Attributes::SceneValid::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneValid", 1, value); + } + case Scenes::Attributes::NameSupport::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NameSupport", 1, value); + } + case Scenes::Attributes::LastConfiguredBy::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LastConfiguredBy", 1, value); + } + case Scenes::Attributes::SceneTableSize::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneTableSize", 1, value); + } + case Scenes::Attributes::FabricSceneInfo::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FabricSceneInfo", 1, value); + } + case Scenes::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case Scenes::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case Scenes::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case Scenes::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case Scenes::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case Scenes::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case OnOff::Id: { + switch (path.mAttributeId) + { + case OnOff::Attributes::OnOff::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnOff", 1, value); + } + case OnOff::Attributes::GlobalSceneControl::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GlobalSceneControl", 1, value); + } + case OnOff::Attributes::OnTime::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnTime", 1, value); + } + case OnOff::Attributes::OffWaitTime::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OffWaitTime", 1, value); + } + case OnOff::Attributes::StartUpOnOff::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpOnOff", 1, value); + } + case OnOff::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case OnOff::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Identify::Attributes::EventList::Id: { + case OnOff::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Identify::Attributes::AttributeList::Id: { + case OnOff::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case OnOff::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case OnOff::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case OnOffSwitchConfiguration::Id: { + switch (path.mAttributeId) + { + case OnOffSwitchConfiguration::Attributes::SwitchType::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("switch type", 1, value); + } + case OnOffSwitchConfiguration::Attributes::SwitchActions::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("switch actions", 1, value); + } + case OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case OnOffSwitchConfiguration::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case OnOffSwitchConfiguration::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case OnOffSwitchConfiguration::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case OnOffSwitchConfiguration::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case LevelControl::Id: { + switch (path.mAttributeId) + { + case LevelControl::Attributes::CurrentLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentLevel", 1, value); + } + case LevelControl::Attributes::RemainingTime::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemainingTime", 1, value); + } + case LevelControl::Attributes::MinLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MinLevel", 1, value); + } + case LevelControl::Attributes::MaxLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxLevel", 1, value); + } + case LevelControl::Attributes::CurrentFrequency::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentFrequency", 1, value); + } + case LevelControl::Attributes::MinFrequency::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MinFrequency", 1, value); + } + case LevelControl::Attributes::MaxFrequency::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxFrequency", 1, value); + } + case LevelControl::Attributes::Options::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Options", 1, value); + } + case LevelControl::Attributes::OnOffTransitionTime::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnOffTransitionTime", 1, value); + } + case LevelControl::Attributes::OnLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnLevel", 1, value); + } + case LevelControl::Attributes::OnTransitionTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnTransitionTime", 1, value); + } + case LevelControl::Attributes::OffTransitionTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OffTransitionTime", 1, value); + } + case LevelControl::Attributes::DefaultMoveRate::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultMoveRate", 1, value); + } + case LevelControl::Attributes::StartUpCurrentLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpCurrentLevel", 1, value); + } + case LevelControl::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case LevelControl::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case LevelControl::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case LevelControl::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case LevelControl::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case LevelControl::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case BinaryInputBasic::Id: { + switch (path.mAttributeId) + { + case BinaryInputBasic::Attributes::ActiveText::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("active text", 1, value); + } + case BinaryInputBasic::Attributes::Description::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("description", 1, value); + } + case BinaryInputBasic::Attributes::InactiveText::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("inactive text", 1, value); + } + case BinaryInputBasic::Attributes::OutOfService::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("out of service", 1, value); + } + case BinaryInputBasic::Attributes::Polarity::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("polarity", 1, value); + } + case BinaryInputBasic::Attributes::PresentValue::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("present value", 1, value); + } + case BinaryInputBasic::Attributes::Reliability::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("reliability", 1, value); + } + case BinaryInputBasic::Attributes::StatusFlags::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("status flags", 1, value); + } + case BinaryInputBasic::Attributes::ApplicationType::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("application type", 1, value); + } + case BinaryInputBasic::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case BinaryInputBasic::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case BinaryInputBasic::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case BinaryInputBasic::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Identify::Attributes::FeatureMap::Id: { + case BinaryInputBasic::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Identify::Attributes::ClusterRevision::Id: { + case BinaryInputBasic::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5224,40 +7751,35 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Groups::Id: { + case PulseWidthModulation::Id: { switch (path.mAttributeId) { - case Groups::Attributes::NameSupport::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NameSupport", 1, value); - } - case Groups::Attributes::GeneratedCommandList::Id: { + case PulseWidthModulation::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Groups::Attributes::AcceptedCommandList::Id: { + case PulseWidthModulation::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Groups::Attributes::EventList::Id: { + case PulseWidthModulation::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Groups::Attributes::AttributeList::Id: { + case PulseWidthModulation::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Groups::Attributes::FeatureMap::Id: { + case PulseWidthModulation::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Groups::Attributes::ClusterRevision::Id: { + case PulseWidthModulation::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5265,75 +7787,101 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Scenes::Id: { + case Descriptor::Id: { switch (path.mAttributeId) { - case Scenes::Attributes::SceneCount::Id: { - uint8_t value; + case Descriptor::Attributes::DeviceTypeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneCount", 1, value); + return DataModelLogger::LogValue("DeviceTypeList", 1, value); } - case Scenes::Attributes::CurrentScene::Id: { - uint8_t value; + case Descriptor::Attributes::ServerList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentScene", 1, value); + return DataModelLogger::LogValue("ServerList", 1, value); } - case Scenes::Attributes::CurrentGroup::Id: { - chip::GroupId value; + case Descriptor::Attributes::ClientList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentGroup", 1, value); + return DataModelLogger::LogValue("ClientList", 1, value); } - case Scenes::Attributes::SceneValid::Id: { - bool value; + case Descriptor::Attributes::PartsList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneValid", 1, value); + return DataModelLogger::LogValue("PartsList", 1, value); } - case Scenes::Attributes::NameSupport::Id: { - chip::BitMask value; + case Descriptor::Attributes::TagList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NameSupport", 1, value); + return DataModelLogger::LogValue("TagList", 1, value); } - case Scenes::Attributes::LastConfiguredBy::Id: { - chip::app::DataModel::Nullable value; + case Descriptor::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastConfiguredBy", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Scenes::Attributes::SceneTableSize::Id: { + case Descriptor::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case Descriptor::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case Descriptor::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case Descriptor::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case Descriptor::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneTableSize", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case Scenes::Attributes::RemainingCapacity::Id: { - uint8_t value; + } + break; + } + case Binding::Id: { + switch (path.mAttributeId) + { + case Binding::Attributes::Binding::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemainingCapacity", 1, value); + return DataModelLogger::LogValue("Binding", 1, value); } - case Scenes::Attributes::GeneratedCommandList::Id: { + case Binding::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Scenes::Attributes::AcceptedCommandList::Id: { + case Binding::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Scenes::Attributes::EventList::Id: { + case Binding::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Scenes::Attributes::AttributeList::Id: { + case Binding::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Scenes::Attributes::FeatureMap::Id: { + case Binding::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Scenes::Attributes::ClusterRevision::Id: { + case Binding::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5341,60 +7889,64 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OnOff::Id: { + case AccessControl::Id: { switch (path.mAttributeId) { - case OnOff::Attributes::OnOff::Id: { - bool value; + case AccessControl::Attributes::Acl::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnOff", 1, value); + return DataModelLogger::LogValue("ACL", 1, value); } - case OnOff::Attributes::GlobalSceneControl::Id: { - bool value; + case AccessControl::Attributes::Extension::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GlobalSceneControl", 1, value); + return DataModelLogger::LogValue("Extension", 1, value); } - case OnOff::Attributes::OnTime::Id: { + case AccessControl::Attributes::SubjectsPerAccessControlEntry::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnTime", 1, value); + return DataModelLogger::LogValue("SubjectsPerAccessControlEntry", 1, value); } - case OnOff::Attributes::OffWaitTime::Id: { + case AccessControl::Attributes::TargetsPerAccessControlEntry::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OffWaitTime", 1, value); + return DataModelLogger::LogValue("TargetsPerAccessControlEntry", 1, value); } - case OnOff::Attributes::StartUpOnOff::Id: { - chip::app::DataModel::Nullable value; + case AccessControl::Attributes::AccessControlEntriesPerFabric::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpOnOff", 1, value); + return DataModelLogger::LogValue("AccessControlEntriesPerFabric", 1, value); } - case OnOff::Attributes::GeneratedCommandList::Id: { + case AccessControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OnOff::Attributes::AcceptedCommandList::Id: { + case AccessControl::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OnOff::Attributes::EventList::Id: { + case AccessControl::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OnOff::Attributes::AttributeList::Id: { + case AccessControl::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OnOff::Attributes::FeatureMap::Id: { + case AccessControl::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OnOff::Attributes::ClusterRevision::Id: { + case AccessControl::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5402,45 +7954,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OnOffSwitchConfiguration::Id: { + case Actions::Id: { switch (path.mAttributeId) { - case OnOffSwitchConfiguration::Attributes::SwitchType::Id: { - uint8_t value; + case Actions::Attributes::ActionList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("switch type", 1, value); + return DataModelLogger::LogValue("ActionList", 1, value); } - case OnOffSwitchConfiguration::Attributes::SwitchActions::Id: { - uint8_t value; + case Actions::Attributes::EndpointLists::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("switch actions", 1, value); + return DataModelLogger::LogValue("EndpointLists", 1, value); } - case OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id: { + case Actions::Attributes::SetupURL::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SetupURL", 1, value); + } + case Actions::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id: { + case Actions::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OnOffSwitchConfiguration::Attributes::EventList::Id: { + case Actions::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OnOffSwitchConfiguration::Attributes::AttributeList::Id: { + case Actions::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OnOffSwitchConfiguration::Attributes::FeatureMap::Id: { + case Actions::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OnOffSwitchConfiguration::Attributes::ClusterRevision::Id: { + case Actions::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5448,105 +8005,150 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case LevelControl::Id: { + case BasicInformation::Id: { switch (path.mAttributeId) { - case LevelControl::Attributes::CurrentLevel::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::DataModelRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentLevel", 1, value); + return DataModelLogger::LogValue("DataModelRevision", 1, value); } - case LevelControl::Attributes::RemainingTime::Id: { - uint16_t value; + case BasicInformation::Attributes::VendorName::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemainingTime", 1, value); + return DataModelLogger::LogValue("VendorName", 1, value); } - case LevelControl::Attributes::MinLevel::Id: { - uint8_t value; + case BasicInformation::Attributes::VendorID::Id: { + chip::VendorId value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MinLevel", 1, value); + return DataModelLogger::LogValue("VendorID", 1, value); } - case LevelControl::Attributes::MaxLevel::Id: { - uint8_t value; + case BasicInformation::Attributes::ProductName::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxLevel", 1, value); + return DataModelLogger::LogValue("ProductName", 1, value); } - case LevelControl::Attributes::CurrentFrequency::Id: { + case BasicInformation::Attributes::ProductID::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentFrequency", 1, value); + return DataModelLogger::LogValue("ProductID", 1, value); } - case LevelControl::Attributes::MinFrequency::Id: { + case BasicInformation::Attributes::NodeLabel::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NodeLabel", 1, value); + } + case BasicInformation::Attributes::Location::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Location", 1, value); + } + case BasicInformation::Attributes::HardwareVersion::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MinFrequency", 1, value); + return DataModelLogger::LogValue("HardwareVersion", 1, value); + } + case BasicInformation::Attributes::HardwareVersionString::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("HardwareVersionString", 1, value); + } + case BasicInformation::Attributes::SoftwareVersion::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SoftwareVersion", 1, value); + } + case BasicInformation::Attributes::SoftwareVersionString::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SoftwareVersionString", 1, value); + } + case BasicInformation::Attributes::ManufacturingDate::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ManufacturingDate", 1, value); + } + case BasicInformation::Attributes::PartNumber::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PartNumber", 1, value); + } + case BasicInformation::Attributes::ProductURL::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ProductURL", 1, value); + } + case BasicInformation::Attributes::ProductLabel::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ProductLabel", 1, value); } - case LevelControl::Attributes::MaxFrequency::Id: { - uint16_t value; + case BasicInformation::Attributes::SerialNumber::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxFrequency", 1, value); + return DataModelLogger::LogValue("SerialNumber", 1, value); } - case LevelControl::Attributes::Options::Id: { - chip::BitMask value; + case BasicInformation::Attributes::LocalConfigDisabled::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Options", 1, value); + return DataModelLogger::LogValue("LocalConfigDisabled", 1, value); } - case LevelControl::Attributes::OnOffTransitionTime::Id: { - uint16_t value; + case BasicInformation::Attributes::Reachable::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnOffTransitionTime", 1, value); + return DataModelLogger::LogValue("Reachable", 1, value); } - case LevelControl::Attributes::OnLevel::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::UniqueID::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnLevel", 1, value); + return DataModelLogger::LogValue("UniqueID", 1, value); } - case LevelControl::Attributes::OnTransitionTime::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::CapabilityMinima::Id: { + chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnTransitionTime", 1, value); + return DataModelLogger::LogValue("CapabilityMinima", 1, value); } - case LevelControl::Attributes::OffTransitionTime::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::ProductAppearance::Id: { + chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OffTransitionTime", 1, value); + return DataModelLogger::LogValue("ProductAppearance", 1, value); } - case LevelControl::Attributes::DefaultMoveRate::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::SpecificationVersion::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DefaultMoveRate", 1, value); + return DataModelLogger::LogValue("SpecificationVersion", 1, value); } - case LevelControl::Attributes::StartUpCurrentLevel::Id: { - chip::app::DataModel::Nullable value; + case BasicInformation::Attributes::MaxPathsPerInvoke::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpCurrentLevel", 1, value); + return DataModelLogger::LogValue("MaxPathsPerInvoke", 1, value); } - case LevelControl::Attributes::GeneratedCommandList::Id: { + case BasicInformation::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case LevelControl::Attributes::AcceptedCommandList::Id: { + case BasicInformation::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case LevelControl::Attributes::EventList::Id: { + case BasicInformation::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case LevelControl::Attributes::AttributeList::Id: { + case BasicInformation::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case LevelControl::Attributes::FeatureMap::Id: { + case BasicInformation::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case LevelControl::Attributes::ClusterRevision::Id: { + case BasicInformation::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5554,80 +8156,93 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BinaryInputBasic::Id: { + case OtaSoftwareUpdateProvider::Id: { switch (path.mAttributeId) { - case BinaryInputBasic::Attributes::ActiveText::Id: { - chip::CharSpan value; + case OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active text", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BinaryInputBasic::Attributes::Description::Id: { - chip::CharSpan value; + case OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("description", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BinaryInputBasic::Attributes::InactiveText::Id: { - chip::CharSpan value; + case OtaSoftwareUpdateProvider::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("inactive text", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case BinaryInputBasic::Attributes::OutOfService::Id: { - bool value; + case OtaSoftwareUpdateProvider::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("out of service", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case BinaryInputBasic::Attributes::Polarity::Id: { - uint8_t value; + case OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("polarity", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BinaryInputBasic::Attributes::PresentValue::Id: { - bool value; + case OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("present value", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case BinaryInputBasic::Attributes::Reliability::Id: { - uint8_t value; + } + break; + } + case OtaSoftwareUpdateRequestor::Id: { + switch (path.mAttributeId) + { + case OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reliability", 1, value); + return DataModelLogger::LogValue("DefaultOTAProviders", 1, value); } - case BinaryInputBasic::Attributes::StatusFlags::Id: { - uint8_t value; + case OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("status flags", 1, value); + return DataModelLogger::LogValue("UpdatePossible", 1, value); } - case BinaryInputBasic::Attributes::ApplicationType::Id: { - uint32_t value; + case OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id: { + chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("application type", 1, value); + return DataModelLogger::LogValue("UpdateState", 1, value); } - case BinaryInputBasic::Attributes::GeneratedCommandList::Id: { + case OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UpdateStateProgress", 1, value); + } + case OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BinaryInputBasic::Attributes::AcceptedCommandList::Id: { + case OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BinaryInputBasic::Attributes::EventList::Id: { + case OtaSoftwareUpdateRequestor::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BinaryInputBasic::Attributes::AttributeList::Id: { + case OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BinaryInputBasic::Attributes::FeatureMap::Id: { + case OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BinaryInputBasic::Attributes::ClusterRevision::Id: { + case OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5635,35 +8250,45 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case PulseWidthModulation::Id: { + case LocalizationConfiguration::Id: { switch (path.mAttributeId) { - case PulseWidthModulation::Attributes::GeneratedCommandList::Id: { + case LocalizationConfiguration::Attributes::ActiveLocale::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveLocale", 1, value); + } + case LocalizationConfiguration::Attributes::SupportedLocales::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedLocales", 1, value); + } + case LocalizationConfiguration::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case PulseWidthModulation::Attributes::AcceptedCommandList::Id: { + case LocalizationConfiguration::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case PulseWidthModulation::Attributes::EventList::Id: { + case LocalizationConfiguration::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case PulseWidthModulation::Attributes::AttributeList::Id: { + case LocalizationConfiguration::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case PulseWidthModulation::Attributes::FeatureMap::Id: { + case LocalizationConfiguration::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case PulseWidthModulation::Attributes::ClusterRevision::Id: { + case LocalizationConfiguration::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5671,60 +8296,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Descriptor::Id: { + case TimeFormatLocalization::Id: { switch (path.mAttributeId) { - case Descriptor::Attributes::DeviceTypeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DeviceTypeList", 1, value); - } - case Descriptor::Attributes::ServerList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ServerList", 1, value); - } - case Descriptor::Attributes::ClientList::Id: { - chip::app::DataModel::DecodableList value; + case TimeFormatLocalization::Attributes::HourFormat::Id: { + chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClientList", 1, value); + return DataModelLogger::LogValue("HourFormat", 1, value); } - case Descriptor::Attributes::PartsList::Id: { - chip::app::DataModel::DecodableList value; + case TimeFormatLocalization::Attributes::ActiveCalendarType::Id: { + chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PartsList", 1, value); + return DataModelLogger::LogValue("ActiveCalendarType", 1, value); } - case Descriptor::Attributes::TagList::Id: { - chip::app::DataModel::DecodableList value; + case TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TagList", 1, value); + return DataModelLogger::LogValue("SupportedCalendarTypes", 1, value); } - case Descriptor::Attributes::GeneratedCommandList::Id: { + case TimeFormatLocalization::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Descriptor::Attributes::AcceptedCommandList::Id: { + case TimeFormatLocalization::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Descriptor::Attributes::EventList::Id: { + case TimeFormatLocalization::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Descriptor::Attributes::AttributeList::Id: { + case TimeFormatLocalization::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Descriptor::Attributes::FeatureMap::Id: { + case TimeFormatLocalization::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Descriptor::Attributes::ClusterRevision::Id: { + case TimeFormatLocalization::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5732,105 +8347,81 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Binding::Id: { + case UnitLocalization::Id: { switch (path.mAttributeId) { - case Binding::Attributes::Binding::Id: { - chip::app::DataModel::DecodableList value; + case UnitLocalization::Attributes::TemperatureUnit::Id: { + chip::app::Clusters::UnitLocalization::TempUnitEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Binding", 1, value); + return DataModelLogger::LogValue("TemperatureUnit", 1, value); } - case Binding::Attributes::GeneratedCommandList::Id: { + case UnitLocalization::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Binding::Attributes::AcceptedCommandList::Id: { + case UnitLocalization::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Binding::Attributes::EventList::Id: { + case UnitLocalization::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Binding::Attributes::AttributeList::Id: { + case UnitLocalization::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Binding::Attributes::FeatureMap::Id: { + case UnitLocalization::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Binding::Attributes::ClusterRevision::Id: { + case UnitLocalization::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); } } - break; - } - case AccessControl::Id: { - switch (path.mAttributeId) - { - case AccessControl::Attributes::Acl::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ACL", 1, value); - } - case AccessControl::Attributes::Extension::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Extension", 1, value); - } - case AccessControl::Attributes::SubjectsPerAccessControlEntry::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SubjectsPerAccessControlEntry", 1, value); - } - case AccessControl::Attributes::TargetsPerAccessControlEntry::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TargetsPerAccessControlEntry", 1, value); - } - case AccessControl::Attributes::AccessControlEntriesPerFabric::Id: { - uint16_t value; + break; + } + case PowerSourceConfiguration::Id: { + switch (path.mAttributeId) + { + case PowerSourceConfiguration::Attributes::Sources::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AccessControlEntriesPerFabric", 1, value); + return DataModelLogger::LogValue("Sources", 1, value); } - case AccessControl::Attributes::GeneratedCommandList::Id: { + case PowerSourceConfiguration::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case AccessControl::Attributes::AcceptedCommandList::Id: { + case PowerSourceConfiguration::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case AccessControl::Attributes::EventList::Id: { + case PowerSourceConfiguration::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case AccessControl::Attributes::AttributeList::Id: { + case PowerSourceConfiguration::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case AccessControl::Attributes::FeatureMap::Id: { + case PowerSourceConfiguration::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case AccessControl::Attributes::ClusterRevision::Id: { + case PowerSourceConfiguration::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -5838,191 +8429,195 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Actions::Id: { + case PowerSource::Id: { switch (path.mAttributeId) { - case Actions::Attributes::ActionList::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::Status::Id: { + chip::app::Clusters::PowerSource::PowerSourceStatusEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActionList", 1, value); + return DataModelLogger::LogValue("Status", 1, value); } - case Actions::Attributes::EndpointLists::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::Order::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EndpointLists", 1, value); + return DataModelLogger::LogValue("Order", 1, value); } - case Actions::Attributes::SetupURL::Id: { + case PowerSource::Attributes::Description::Id: { chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SetupURL", 1, value); + return DataModelLogger::LogValue("Description", 1, value); } - case Actions::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::WiredAssessedInputVoltage::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + return DataModelLogger::LogValue("WiredAssessedInputVoltage", 1, value); } - case Actions::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::WiredAssessedInputFrequency::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("WiredAssessedInputFrequency", 1, value); } - case Actions::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::WiredCurrentType::Id: { + chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("WiredCurrentType", 1, value); } - case Actions::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case PowerSource::Attributes::WiredAssessedCurrent::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("WiredAssessedCurrent", 1, value); } - case Actions::Attributes::FeatureMap::Id: { + case PowerSource::Attributes::WiredNominalVoltage::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("WiredNominalVoltage", 1, value); } - case Actions::Attributes::ClusterRevision::Id: { - uint16_t value; + case PowerSource::Attributes::WiredMaximumCurrent::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); + return DataModelLogger::LogValue("WiredMaximumCurrent", 1, value); } + case PowerSource::Attributes::WiredPresent::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("WiredPresent", 1, value); } - break; - } - case BasicInformation::Id: { - switch (path.mAttributeId) - { - case BasicInformation::Attributes::DataModelRevision::Id: { - uint16_t value; + case PowerSource::Attributes::ActiveWiredFaults::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DataModelRevision", 1, value); + return DataModelLogger::LogValue("ActiveWiredFaults", 1, value); } - case BasicInformation::Attributes::VendorName::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatVoltage::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("VendorName", 1, value); + return DataModelLogger::LogValue("BatVoltage", 1, value); } - case BasicInformation::Attributes::VendorID::Id: { - chip::VendorId value; + case PowerSource::Attributes::BatPercentRemaining::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("VendorID", 1, value); + return DataModelLogger::LogValue("BatPercentRemaining", 1, value); } - case BasicInformation::Attributes::ProductName::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatTimeRemaining::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductName", 1, value); + return DataModelLogger::LogValue("BatTimeRemaining", 1, value); } - case BasicInformation::Attributes::ProductID::Id: { - uint16_t value; + case PowerSource::Attributes::BatChargeLevel::Id: { + chip::app::Clusters::PowerSource::BatChargeLevelEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductID", 1, value); + return DataModelLogger::LogValue("BatChargeLevel", 1, value); } - case BasicInformation::Attributes::NodeLabel::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatReplacementNeeded::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NodeLabel", 1, value); + return DataModelLogger::LogValue("BatReplacementNeeded", 1, value); } - case BasicInformation::Attributes::Location::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatReplaceability::Id: { + chip::app::Clusters::PowerSource::BatReplaceabilityEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Location", 1, value); + return DataModelLogger::LogValue("BatReplaceability", 1, value); } - case BasicInformation::Attributes::HardwareVersion::Id: { - uint16_t value; + case PowerSource::Attributes::BatPresent::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HardwareVersion", 1, value); + return DataModelLogger::LogValue("BatPresent", 1, value); } - case BasicInformation::Attributes::HardwareVersionString::Id: { + case PowerSource::Attributes::ActiveBatFaults::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveBatFaults", 1, value); + } + case PowerSource::Attributes::BatReplacementDescription::Id: { chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HardwareVersionString", 1, value); + return DataModelLogger::LogValue("BatReplacementDescription", 1, value); } - case BasicInformation::Attributes::SoftwareVersion::Id: { - uint32_t value; + case PowerSource::Attributes::BatCommonDesignation::Id: { + chip::app::Clusters::PowerSource::BatCommonDesignationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SoftwareVersion", 1, value); + return DataModelLogger::LogValue("BatCommonDesignation", 1, value); } - case BasicInformation::Attributes::SoftwareVersionString::Id: { + case PowerSource::Attributes::BatANSIDesignation::Id: { chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SoftwareVersionString", 1, value); + return DataModelLogger::LogValue("BatANSIDesignation", 1, value); } - case BasicInformation::Attributes::ManufacturingDate::Id: { + case PowerSource::Attributes::BatIECDesignation::Id: { chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ManufacturingDate", 1, value); + return DataModelLogger::LogValue("BatIECDesignation", 1, value); } - case BasicInformation::Attributes::PartNumber::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatApprovedChemistry::Id: { + chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PartNumber", 1, value); + return DataModelLogger::LogValue("BatApprovedChemistry", 1, value); } - case BasicInformation::Attributes::ProductURL::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatCapacity::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductURL", 1, value); + return DataModelLogger::LogValue("BatCapacity", 1, value); } - case BasicInformation::Attributes::ProductLabel::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatQuantity::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductLabel", 1, value); + return DataModelLogger::LogValue("BatQuantity", 1, value); } - case BasicInformation::Attributes::SerialNumber::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatChargeState::Id: { + chip::app::Clusters::PowerSource::BatChargeStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SerialNumber", 1, value); + return DataModelLogger::LogValue("BatChargeState", 1, value); } - case BasicInformation::Attributes::LocalConfigDisabled::Id: { - bool value; + case PowerSource::Attributes::BatTimeToFullCharge::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LocalConfigDisabled", 1, value); + return DataModelLogger::LogValue("BatTimeToFullCharge", 1, value); } - case BasicInformation::Attributes::Reachable::Id: { + case PowerSource::Attributes::BatFunctionalWhileCharging::Id: { bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Reachable", 1, value); + return DataModelLogger::LogValue("BatFunctionalWhileCharging", 1, value); } - case BasicInformation::Attributes::UniqueID::Id: { - chip::CharSpan value; + case PowerSource::Attributes::BatChargingCurrent::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UniqueID", 1, value); + return DataModelLogger::LogValue("BatChargingCurrent", 1, value); } - case BasicInformation::Attributes::CapabilityMinima::Id: { - chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType value; + case PowerSource::Attributes::ActiveBatChargeFaults::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CapabilityMinima", 1, value); + return DataModelLogger::LogValue("ActiveBatChargeFaults", 1, value); } - case BasicInformation::Attributes::ProductAppearance::Id: { - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; + case PowerSource::Attributes::EndpointList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductAppearance", 1, value); + return DataModelLogger::LogValue("EndpointList", 1, value); } - case BasicInformation::Attributes::GeneratedCommandList::Id: { + case PowerSource::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BasicInformation::Attributes::AcceptedCommandList::Id: { + case PowerSource::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BasicInformation::Attributes::EventList::Id: { + case PowerSource::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BasicInformation::Attributes::AttributeList::Id: { + case PowerSource::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BasicInformation::Attributes::FeatureMap::Id: { + case PowerSource::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BasicInformation::Attributes::ClusterRevision::Id: { + case PowerSource::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6030,35 +8625,60 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OtaSoftwareUpdateProvider::Id: { + case GeneralCommissioning::Id: { switch (path.mAttributeId) { - case OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id: { + case GeneralCommissioning::Attributes::Breadcrumb::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Breadcrumb", 1, value); + } + case GeneralCommissioning::Attributes::BasicCommissioningInfo::Id: { + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BasicCommissioningInfo", 1, value); + } + case GeneralCommissioning::Attributes::RegulatoryConfig::Id: { + chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RegulatoryConfig", 1, value); + } + case GeneralCommissioning::Attributes::LocationCapability::Id: { + chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LocationCapability", 1, value); + } + case GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportsConcurrentConnection", 1, value); + } + case GeneralCommissioning::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id: { + case GeneralCommissioning::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OtaSoftwareUpdateProvider::Attributes::EventList::Id: { + case GeneralCommissioning::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OtaSoftwareUpdateProvider::Attributes::AttributeList::Id: { + case GeneralCommissioning::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id: { + case GeneralCommissioning::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id: { + case GeneralCommissioning::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6066,57 +8686,92 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OtaSoftwareUpdateRequestor::Id: { + case NetworkCommissioning::Id: { switch (path.mAttributeId) { - case OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id: { + case NetworkCommissioning::Attributes::MaxNetworks::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxNetworks", 1, value); + } + case NetworkCommissioning::Attributes::Networks::Id: { chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> + chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DefaultOTAProviders", 1, value); + return DataModelLogger::LogValue("Networks", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id: { + case NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ScanMaxTimeSeconds", 1, value); + } + case NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ConnectMaxTimeSeconds", 1, value); + } + case NetworkCommissioning::Attributes::InterfaceEnabled::Id: { bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UpdatePossible", 1, value); + return DataModelLogger::LogValue("InterfaceEnabled", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id: { - chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value; + case NetworkCommissioning::Attributes::LastNetworkingStatus::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UpdateState", 1, value); + return DataModelLogger::LogValue("LastNetworkingStatus", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id: { - chip::app::DataModel::Nullable value; + case NetworkCommissioning::Attributes::LastNetworkID::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UpdateStateProgress", 1, value); + return DataModelLogger::LogValue("LastNetworkID", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id: { + case NetworkCommissioning::Attributes::LastConnectErrorValue::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LastConnectErrorValue", 1, value); + } + case NetworkCommissioning::Attributes::SupportedWiFiBands::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedWiFiBands", 1, value); + } + case NetworkCommissioning::Attributes::SupportedThreadFeatures::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedThreadFeatures", 1, value); + } + case NetworkCommissioning::Attributes::ThreadVersion::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ThreadVersion", 1, value); + } + case NetworkCommissioning::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id: { + case NetworkCommissioning::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::EventList::Id: { + case NetworkCommissioning::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id: { + case NetworkCommissioning::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id: { + case NetworkCommissioning::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id: { + case NetworkCommissioning::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6124,45 +8779,35 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case LocalizationConfiguration::Id: { + case DiagnosticLogs::Id: { switch (path.mAttributeId) { - case LocalizationConfiguration::Attributes::ActiveLocale::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveLocale", 1, value); - } - case LocalizationConfiguration::Attributes::SupportedLocales::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedLocales", 1, value); - } - case LocalizationConfiguration::Attributes::GeneratedCommandList::Id: { + case DiagnosticLogs::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case LocalizationConfiguration::Attributes::AcceptedCommandList::Id: { + case DiagnosticLogs::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case LocalizationConfiguration::Attributes::EventList::Id: { + case DiagnosticLogs::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case LocalizationConfiguration::Attributes::AttributeList::Id: { + case DiagnosticLogs::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case LocalizationConfiguration::Attributes::FeatureMap::Id: { + case DiagnosticLogs::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case LocalizationConfiguration::Attributes::ClusterRevision::Id: { + case DiagnosticLogs::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6170,91 +8815,81 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case TimeFormatLocalization::Id: { + case GeneralDiagnostics::Id: { switch (path.mAttributeId) { - case TimeFormatLocalization::Attributes::HourFormat::Id: { - chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HourFormat", 1, value); - } - case TimeFormatLocalization::Attributes::ActiveCalendarType::Id: { - chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value; + case GeneralDiagnostics::Attributes::NetworkInterfaces::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveCalendarType", 1, value); + return DataModelLogger::LogValue("NetworkInterfaces", 1, value); } - case TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id: { - chip::app::DataModel::DecodableList value; + case GeneralDiagnostics::Attributes::RebootCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedCalendarTypes", 1, value); + return DataModelLogger::LogValue("RebootCount", 1, value); } - case TimeFormatLocalization::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case GeneralDiagnostics::Attributes::UpTime::Id: { + uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + return DataModelLogger::LogValue("UpTime", 1, value); } - case TimeFormatLocalization::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case GeneralDiagnostics::Attributes::TotalOperationalHours::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("TotalOperationalHours", 1, value); } - case TimeFormatLocalization::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case GeneralDiagnostics::Attributes::BootReason::Id: { + chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("BootReason", 1, value); } - case TimeFormatLocalization::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("ActiveHardwareFaults", 1, value); } - case TimeFormatLocalization::Attributes::FeatureMap::Id: { - uint32_t value; + case GeneralDiagnostics::Attributes::ActiveRadioFaults::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("ActiveRadioFaults", 1, value); } - case TimeFormatLocalization::Attributes::ClusterRevision::Id: { - uint16_t value; + case GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } + return DataModelLogger::LogValue("ActiveNetworkFaults", 1, value); } - break; - } - case UnitLocalization::Id: { - switch (path.mAttributeId) - { - case UnitLocalization::Attributes::TemperatureUnit::Id: { - chip::app::Clusters::UnitLocalization::TempUnitEnum value; + case GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TemperatureUnit", 1, value); + return DataModelLogger::LogValue("TestEventTriggersEnabled", 1, value); } - case UnitLocalization::Attributes::GeneratedCommandList::Id: { + case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case UnitLocalization::Attributes::AcceptedCommandList::Id: { + case GeneralDiagnostics::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case UnitLocalization::Attributes::EventList::Id: { + case GeneralDiagnostics::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case UnitLocalization::Attributes::AttributeList::Id: { + case GeneralDiagnostics::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case UnitLocalization::Attributes::FeatureMap::Id: { + case GeneralDiagnostics::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case UnitLocalization::Attributes::ClusterRevision::Id: { + case GeneralDiagnostics::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6262,40 +8897,57 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case PowerSourceConfiguration::Id: { + case SoftwareDiagnostics::Id: { switch (path.mAttributeId) { - case PowerSourceConfiguration::Attributes::Sources::Id: { - chip::app::DataModel::DecodableList value; + case SoftwareDiagnostics::Attributes::ThreadMetrics::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Sources", 1, value); + return DataModelLogger::LogValue("ThreadMetrics", 1, value); } - case PowerSourceConfiguration::Attributes::GeneratedCommandList::Id: { + case SoftwareDiagnostics::Attributes::CurrentHeapFree::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentHeapFree", 1, value); + } + case SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentHeapUsed", 1, value); + } + case SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentHeapHighWatermark", 1, value); + } + case SoftwareDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case PowerSourceConfiguration::Attributes::AcceptedCommandList::Id: { + case SoftwareDiagnostics::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case PowerSourceConfiguration::Attributes::EventList::Id: { + case SoftwareDiagnostics::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case PowerSourceConfiguration::Attributes::AttributeList::Id: { + case SoftwareDiagnostics::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case PowerSourceConfiguration::Attributes::FeatureMap::Id: { + case SoftwareDiagnostics::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case PowerSourceConfiguration::Attributes::ClusterRevision::Id: { + case SoftwareDiagnostics::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6303,349 +8955,357 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case PowerSource::Id: { + case ThreadNetworkDiagnostics::Id: { switch (path.mAttributeId) { - case PowerSource::Attributes::Status::Id: { - chip::app::Clusters::PowerSource::PowerSourceStatusEnum value; + case ThreadNetworkDiagnostics::Attributes::Channel::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Status", 1, value); + return DataModelLogger::LogValue("Channel", 1, value); } - case PowerSource::Attributes::Order::Id: { - uint8_t value; + case ThreadNetworkDiagnostics::Attributes::RoutingRole::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Order", 1, value); + return DataModelLogger::LogValue("RoutingRole", 1, value); } - case PowerSource::Attributes::Description::Id: { - chip::CharSpan value; + case ThreadNetworkDiagnostics::Attributes::NetworkName::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Description", 1, value); + return DataModelLogger::LogValue("NetworkName", 1, value); } - case PowerSource::Attributes::WiredAssessedInputVoltage::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::PanId::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredAssessedInputVoltage", 1, value); + return DataModelLogger::LogValue("PanId", 1, value); } - case PowerSource::Attributes::WiredAssessedInputFrequency::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredAssessedInputFrequency", 1, value); + return DataModelLogger::LogValue("ExtendedPanId", 1, value); } - case PowerSource::Attributes::WiredCurrentType::Id: { - chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value; + case ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredCurrentType", 1, value); + return DataModelLogger::LogValue("MeshLocalPrefix", 1, value); + } + case ThreadNetworkDiagnostics::Attributes::OverrunCount::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OverrunCount", 1, value); } - case PowerSource::Attributes::WiredAssessedCurrent::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::NeighborTable::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredAssessedCurrent", 1, value); + return DataModelLogger::LogValue("NeighborTable", 1, value); } - case PowerSource::Attributes::WiredNominalVoltage::Id: { - uint32_t value; + case ThreadNetworkDiagnostics::Attributes::RouteTable::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredNominalVoltage", 1, value); + return DataModelLogger::LogValue("RouteTable", 1, value); } - case PowerSource::Attributes::WiredMaximumCurrent::Id: { - uint32_t value; + case ThreadNetworkDiagnostics::Attributes::PartitionId::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredMaximumCurrent", 1, value); + return DataModelLogger::LogValue("PartitionId", 1, value); } - case PowerSource::Attributes::WiredPresent::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::Weighting::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiredPresent", 1, value); + return DataModelLogger::LogValue("Weighting", 1, value); } - case PowerSource::Attributes::ActiveWiredFaults::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::DataVersion::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveWiredFaults", 1, value); + return DataModelLogger::LogValue("DataVersion", 1, value); } - case PowerSource::Attributes::BatVoltage::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatVoltage", 1, value); + return DataModelLogger::LogValue("StableDataVersion", 1, value); } - case PowerSource::Attributes::BatPercentRemaining::Id: { + case ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatPercentRemaining", 1, value); + return DataModelLogger::LogValue("LeaderRouterId", 1, value); } - case PowerSource::Attributes::BatTimeRemaining::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatTimeRemaining", 1, value); + return DataModelLogger::LogValue("DetachedRoleCount", 1, value); } - case PowerSource::Attributes::BatChargeLevel::Id: { - chip::app::Clusters::PowerSource::BatChargeLevelEnum value; + case ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatChargeLevel", 1, value); + return DataModelLogger::LogValue("ChildRoleCount", 1, value); } - case PowerSource::Attributes::BatReplacementNeeded::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatReplacementNeeded", 1, value); + return DataModelLogger::LogValue("RouterRoleCount", 1, value); } - case PowerSource::Attributes::BatReplaceability::Id: { - chip::app::Clusters::PowerSource::BatReplaceabilityEnum value; + case ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatReplaceability", 1, value); + return DataModelLogger::LogValue("LeaderRoleCount", 1, value); } - case PowerSource::Attributes::BatPresent::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatPresent", 1, value); + return DataModelLogger::LogValue("AttachAttemptCount", 1, value); } - case PowerSource::Attributes::ActiveBatFaults::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveBatFaults", 1, value); + return DataModelLogger::LogValue("PartitionIdChangeCount", 1, value); } - case PowerSource::Attributes::BatReplacementDescription::Id: { - chip::CharSpan value; + case ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatReplacementDescription", 1, value); + return DataModelLogger::LogValue("BetterPartitionAttachAttemptCount", 1, value); } - case PowerSource::Attributes::BatCommonDesignation::Id: { - chip::app::Clusters::PowerSource::BatCommonDesignationEnum value; + case ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatCommonDesignation", 1, value); + return DataModelLogger::LogValue("ParentChangeCount", 1, value); } - case PowerSource::Attributes::BatANSIDesignation::Id: { - chip::CharSpan value; + case ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatANSIDesignation", 1, value); + return DataModelLogger::LogValue("TxTotalCount", 1, value); } - case PowerSource::Attributes::BatIECDesignation::Id: { - chip::CharSpan value; + case ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatIECDesignation", 1, value); + return DataModelLogger::LogValue("TxUnicastCount", 1, value); } - case PowerSource::Attributes::BatApprovedChemistry::Id: { - chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value; + case ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatApprovedChemistry", 1, value); + return DataModelLogger::LogValue("TxBroadcastCount", 1, value); } - case PowerSource::Attributes::BatCapacity::Id: { + case ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatCapacity", 1, value); + return DataModelLogger::LogValue("TxAckRequestedCount", 1, value); } - case PowerSource::Attributes::BatQuantity::Id: { - uint8_t value; + case ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatQuantity", 1, value); + return DataModelLogger::LogValue("TxAckedCount", 1, value); } - case PowerSource::Attributes::BatChargeState::Id: { - chip::app::Clusters::PowerSource::BatChargeStateEnum value; + case ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatChargeState", 1, value); + return DataModelLogger::LogValue("TxNoAckRequestedCount", 1, value); } - case PowerSource::Attributes::BatTimeToFullCharge::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::TxDataCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatTimeToFullCharge", 1, value); + return DataModelLogger::LogValue("TxDataCount", 1, value); } - case PowerSource::Attributes::BatFunctionalWhileCharging::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatFunctionalWhileCharging", 1, value); + return DataModelLogger::LogValue("TxDataPollCount", 1, value); } - case PowerSource::Attributes::BatChargingCurrent::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatChargingCurrent", 1, value); + return DataModelLogger::LogValue("TxBeaconCount", 1, value); } - case PowerSource::Attributes::ActiveBatChargeFaults::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveBatChargeFaults", 1, value); + return DataModelLogger::LogValue("TxBeaconRequestCount", 1, value); } - case PowerSource::Attributes::EndpointList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EndpointList", 1, value); + return DataModelLogger::LogValue("TxOtherCount", 1, value); } - case PowerSource::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + return DataModelLogger::LogValue("TxRetryCount", 1, value); } - case PowerSource::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("TxDirectMaxRetryExpiryCount", 1, value); } - case PowerSource::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("TxIndirectMaxRetryExpiryCount", 1, value); } - case PowerSource::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("TxErrCcaCount", 1, value); } - case PowerSource::Attributes::FeatureMap::Id: { + case ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("TxErrAbortCount", 1, value); } - case PowerSource::Attributes::ClusterRevision::Id: { - uint16_t value; + case ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); + return DataModelLogger::LogValue("TxErrBusyChannelCount", 1, value); } + case ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RxTotalCount", 1, value); } - break; - } - case GeneralCommissioning::Id: { - switch (path.mAttributeId) - { - case GeneralCommissioning::Attributes::Breadcrumb::Id: { - uint64_t value; + case ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Breadcrumb", 1, value); + return DataModelLogger::LogValue("RxUnicastCount", 1, value); } - case GeneralCommissioning::Attributes::BasicCommissioningInfo::Id: { - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType value; + case ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BasicCommissioningInfo", 1, value); + return DataModelLogger::LogValue("RxBroadcastCount", 1, value); } - case GeneralCommissioning::Attributes::RegulatoryConfig::Id: { - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; + case ThreadNetworkDiagnostics::Attributes::RxDataCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RegulatoryConfig", 1, value); + return DataModelLogger::LogValue("RxDataCount", 1, value); } - case GeneralCommissioning::Attributes::LocationCapability::Id: { - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; + case ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LocationCapability", 1, value); + return DataModelLogger::LogValue("RxDataPollCount", 1, value); } - case GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportsConcurrentConnection", 1, value); + return DataModelLogger::LogValue("RxBeaconCount", 1, value); } - case GeneralCommissioning::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + return DataModelLogger::LogValue("RxBeaconRequestCount", 1, value); } - case GeneralCommissioning::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("RxOtherCount", 1, value); } - case GeneralCommissioning::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("RxAddressFilteredCount", 1, value); } - case GeneralCommissioning::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("RxDestAddrFilteredCount", 1, value); } - case GeneralCommissioning::Attributes::FeatureMap::Id: { + case ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("RxDuplicatedCount", 1, value); } - case GeneralCommissioning::Attributes::ClusterRevision::Id: { - uint16_t value; + case ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); + return DataModelLogger::LogValue("RxErrNoFrameCount", 1, value); } + case ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RxErrUnknownNeighborCount", 1, value); } - break; - } - case NetworkCommissioning::Id: { - switch (path.mAttributeId) - { - case NetworkCommissioning::Attributes::MaxNetworks::Id: { - uint8_t value; + case ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxNetworks", 1, value); + return DataModelLogger::LogValue("RxErrInvalidSrcAddrCount", 1, value); } - case NetworkCommissioning::Attributes::Networks::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> - value; + case ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Networks", 1, value); + return DataModelLogger::LogValue("RxErrSecCount", 1, value); } - case NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id: { - uint8_t value; + case ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ScanMaxTimeSeconds", 1, value); + return DataModelLogger::LogValue("RxErrFcsCount", 1, value); } - case NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id: { - uint8_t value; + case ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ConnectMaxTimeSeconds", 1, value); + return DataModelLogger::LogValue("RxErrOtherCount", 1, value); } - case NetworkCommissioning::Attributes::InterfaceEnabled::Id: { - bool value; + case ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("InterfaceEnabled", 1, value); + return DataModelLogger::LogValue("ActiveTimestamp", 1, value); } - case NetworkCommissioning::Attributes::LastNetworkingStatus::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastNetworkingStatus", 1, value); + return DataModelLogger::LogValue("PendingTimestamp", 1, value); } - case NetworkCommissioning::Attributes::LastNetworkID::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::Delay::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastNetworkID", 1, value); + return DataModelLogger::LogValue("Delay", 1, value); } - case NetworkCommissioning::Attributes::LastConnectErrorValue::Id: { - chip::app::DataModel::Nullable value; + case ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id: { + chip::app::DataModel::Nullable + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastConnectErrorValue", 1, value); + return DataModelLogger::LogValue("SecurityPolicy", 1, value); } - case NetworkCommissioning::Attributes::SupportedWiFiBands::Id: { - chip::app::DataModel::DecodableList value; + case ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedWiFiBands", 1, value); + return DataModelLogger::LogValue("ChannelPage0Mask", 1, value); } - case NetworkCommissioning::Attributes::SupportedThreadFeatures::Id: { - chip::BitMask value; + case ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedThreadFeatures", 1, value); + return DataModelLogger::LogValue("OperationalDatasetComponents", 1, value); } - case NetworkCommissioning::Attributes::ThreadVersion::Id: { - uint16_t value; + case ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ThreadVersion", 1, value); + return DataModelLogger::LogValue("ActiveNetworkFaultsList", 1, value); } - case NetworkCommissioning::Attributes::GeneratedCommandList::Id: { + case ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case NetworkCommissioning::Attributes::AcceptedCommandList::Id: { + case ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case NetworkCommissioning::Attributes::EventList::Id: { + case ThreadNetworkDiagnostics::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case NetworkCommissioning::Attributes::AttributeList::Id: { + case ThreadNetworkDiagnostics::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case NetworkCommissioning::Attributes::FeatureMap::Id: { + case ThreadNetworkDiagnostics::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case NetworkCommissioning::Attributes::ClusterRevision::Id: { + case ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6653,117 +9313,100 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case DiagnosticLogs::Id: { + case WiFiNetworkDiagnostics::Id: { switch (path.mAttributeId) { - case DiagnosticLogs::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); - } - case DiagnosticLogs::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); - } - case DiagnosticLogs::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case WiFiNetworkDiagnostics::Attributes::Bssid::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("BSSID", 1, value); } - case DiagnosticLogs::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case WiFiNetworkDiagnostics::Attributes::SecurityType::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("SecurityType", 1, value); } - case DiagnosticLogs::Attributes::FeatureMap::Id: { - uint32_t value; + case WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("WiFiVersion", 1, value); } - case DiagnosticLogs::Attributes::ClusterRevision::Id: { - uint16_t value; + case WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } + return DataModelLogger::LogValue("ChannelNumber", 1, value); } - break; - } - case GeneralDiagnostics::Id: { - switch (path.mAttributeId) - { - case GeneralDiagnostics::Attributes::NetworkInterfaces::Id: { - chip::app::DataModel::DecodableList - value; + case WiFiNetworkDiagnostics::Attributes::Rssi::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NetworkInterfaces", 1, value); + return DataModelLogger::LogValue("RSSI", 1, value); } - case GeneralDiagnostics::Attributes::RebootCount::Id: { - uint16_t value; + case WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RebootCount", 1, value); + return DataModelLogger::LogValue("BeaconLostCount", 1, value); } - case GeneralDiagnostics::Attributes::UpTime::Id: { - uint64_t value; + case WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UpTime", 1, value); + return DataModelLogger::LogValue("BeaconRxCount", 1, value); } - case GeneralDiagnostics::Attributes::TotalOperationalHours::Id: { - uint32_t value; + case WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TotalOperationalHours", 1, value); + return DataModelLogger::LogValue("PacketMulticastRxCount", 1, value); } - case GeneralDiagnostics::Attributes::BootReason::Id: { - chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value; + case WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BootReason", 1, value); + return DataModelLogger::LogValue("PacketMulticastTxCount", 1, value); } - case GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id: { - chip::app::DataModel::DecodableList value; + case WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveHardwareFaults", 1, value); + return DataModelLogger::LogValue("PacketUnicastRxCount", 1, value); } - case GeneralDiagnostics::Attributes::ActiveRadioFaults::Id: { - chip::app::DataModel::DecodableList value; + case WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveRadioFaults", 1, value); + return DataModelLogger::LogValue("PacketUnicastTxCount", 1, value); } - case GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id: { - chip::app::DataModel::DecodableList value; + case WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveNetworkFaults", 1, value); + return DataModelLogger::LogValue("CurrentMaxRate", 1, value); } - case GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id: { - bool value; + case WiFiNetworkDiagnostics::Attributes::OverrunCount::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TestEventTriggersEnabled", 1, value); + return DataModelLogger::LogValue("OverrunCount", 1, value); } - case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { + case WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case GeneralDiagnostics::Attributes::AcceptedCommandList::Id: { + case WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case GeneralDiagnostics::Attributes::EventList::Id: { + case WiFiNetworkDiagnostics::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case GeneralDiagnostics::Attributes::AttributeList::Id: { + case WiFiNetworkDiagnostics::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case GeneralDiagnostics::Attributes::FeatureMap::Id: { + case WiFiNetworkDiagnostics::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case GeneralDiagnostics::Attributes::ClusterRevision::Id: { + case WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6771,57 +9414,80 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case SoftwareDiagnostics::Id: { + case EthernetNetworkDiagnostics::Id: { switch (path.mAttributeId) { - case SoftwareDiagnostics::Attributes::ThreadMetrics::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> - value; + case EthernetNetworkDiagnostics::Attributes::PHYRate::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ThreadMetrics", 1, value); + return DataModelLogger::LogValue("PHYRate", 1, value); } - case SoftwareDiagnostics::Attributes::CurrentHeapFree::Id: { + case EthernetNetworkDiagnostics::Attributes::FullDuplex::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FullDuplex", 1, value); + } + case EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id: { uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentHeapFree", 1, value); + return DataModelLogger::LogValue("PacketRxCount", 1, value); } - case SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id: { + case EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id: { uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentHeapUsed", 1, value); + return DataModelLogger::LogValue("PacketTxCount", 1, value); } - case SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id: { + case EthernetNetworkDiagnostics::Attributes::TxErrCount::Id: { uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentHeapHighWatermark", 1, value); + return DataModelLogger::LogValue("TxErrCount", 1, value); + } + case EthernetNetworkDiagnostics::Attributes::CollisionCount::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CollisionCount", 1, value); + } + case EthernetNetworkDiagnostics::Attributes::OverrunCount::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OverrunCount", 1, value); + } + case EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CarrierDetect", 1, value); + } + case EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id: { + uint64_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeSinceReset", 1, value); } - case SoftwareDiagnostics::Attributes::GeneratedCommandList::Id: { + case EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case SoftwareDiagnostics::Attributes::AcceptedCommandList::Id: { + case EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case SoftwareDiagnostics::Attributes::EventList::Id: { + case EthernetNetworkDiagnostics::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case SoftwareDiagnostics::Attributes::AttributeList::Id: { + case EthernetNetworkDiagnostics::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case SoftwareDiagnostics::Attributes::FeatureMap::Id: { + case EthernetNetworkDiagnostics::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case SoftwareDiagnostics::Attributes::ClusterRevision::Id: { + case EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -6829,357 +9495,322 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ThreadNetworkDiagnostics::Id: { + case TimeSynchronization::Id: { switch (path.mAttributeId) { - case ThreadNetworkDiagnostics::Attributes::Channel::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Channel", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::RoutingRole::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RoutingRole", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::NetworkName::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NetworkName", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::PanId::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PanId", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id: { + case TimeSynchronization::Attributes::UTCTime::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ExtendedPanId", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MeshLocalPrefix", 1, value); + return DataModelLogger::LogValue("UTCTime", 1, value); } - case ThreadNetworkDiagnostics::Attributes::OverrunCount::Id: { - uint64_t value; + case TimeSynchronization::Attributes::Granularity::Id: { + chip::app::Clusters::TimeSynchronization::GranularityEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OverrunCount", 1, value); + return DataModelLogger::LogValue("Granularity", 1, value); } - case ThreadNetworkDiagnostics::Attributes::NeighborTable::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> - value; + case TimeSynchronization::Attributes::TimeSource::Id: { + chip::app::Clusters::TimeSynchronization::TimeSourceEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NeighborTable", 1, value); + return DataModelLogger::LogValue("TimeSource", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RouteTable::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> + case TimeSynchronization::Attributes::TrustedTimeSource::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RouteTable", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::PartitionId::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PartitionId", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::Weighting::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Weighting", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::DataVersion::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DataVersion", 1, value); - } - case ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StableDataVersion", 1, value); + return DataModelLogger::LogValue("TrustedTimeSource", 1, value); } - case ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id: { - chip::app::DataModel::Nullable value; + case TimeSynchronization::Attributes::DefaultNTP::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LeaderRouterId", 1, value); + return DataModelLogger::LogValue("DefaultNTP", 1, value); } - case ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::TimeZone::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DetachedRoleCount", 1, value); + return DataModelLogger::LogValue("TimeZone", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::DSTOffset::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ChildRoleCount", 1, value); + return DataModelLogger::LogValue("DSTOffset", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::LocalTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RouterRoleCount", 1, value); + return DataModelLogger::LogValue("LocalTime", 1, value); } - case ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::TimeZoneDatabase::Id: { + chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LeaderRoleCount", 1, value); + return DataModelLogger::LogValue("TimeZoneDatabase", 1, value); } - case ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::NTPServerAvailable::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttachAttemptCount", 1, value); + return DataModelLogger::LogValue("NTPServerAvailable", 1, value); } - case ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::TimeZoneListMaxSize::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PartitionIdChangeCount", 1, value); + return DataModelLogger::LogValue("TimeZoneListMaxSize", 1, value); } - case ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BetterPartitionAttachAttemptCount", 1, value); + return DataModelLogger::LogValue("DSTOffsetListMaxSize", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id: { - uint16_t value; + case TimeSynchronization::Attributes::SupportsDNSResolve::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ParentChangeCount", 1, value); + return DataModelLogger::LogValue("SupportsDNSResolve", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id: { - uint32_t value; + case TimeSynchronization::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxTotalCount", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id: { - uint32_t value; + case TimeSynchronization::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxUnicastCount", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id: { - uint32_t value; + case TimeSynchronization::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxBroadcastCount", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id: { - uint32_t value; + case TimeSynchronization::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxAckRequestedCount", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id: { + case TimeSynchronization::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxAckedCount", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id: { - uint32_t value; + case TimeSynchronization::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxNoAckRequestedCount", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxDataCount::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxDataCount", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id: { - uint32_t value; + break; + } + case BridgedDeviceBasicInformation::Id: { + switch (path.mAttributeId) + { + case BridgedDeviceBasicInformation::Attributes::VendorName::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxDataPollCount", 1, value); + return DataModelLogger::LogValue("VendorName", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::VendorID::Id: { + chip::VendorId value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxBeaconCount", 1, value); + return DataModelLogger::LogValue("VendorID", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ProductName::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxBeaconRequestCount", 1, value); + return DataModelLogger::LogValue("ProductName", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::NodeLabel::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxOtherCount", 1, value); + return DataModelLogger::LogValue("NodeLabel", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxRetryCount", 1, value); + return DataModelLogger::LogValue("HardwareVersion", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxDirectMaxRetryExpiryCount", 1, value); + return DataModelLogger::LogValue("HardwareVersionString", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id: { + case BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxIndirectMaxRetryExpiryCount", 1, value); + return DataModelLogger::LogValue("SoftwareVersion", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxErrCcaCount", 1, value); + return DataModelLogger::LogValue("SoftwareVersionString", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxErrAbortCount", 1, value); + return DataModelLogger::LogValue("ManufacturingDate", 1, value); } - case ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::PartNumber::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxErrBusyChannelCount", 1, value); + return DataModelLogger::LogValue("PartNumber", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ProductURL::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxTotalCount", 1, value); + return DataModelLogger::LogValue("ProductURL", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ProductLabel::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxUnicastCount", 1, value); + return DataModelLogger::LogValue("ProductLabel", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::SerialNumber::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxBroadcastCount", 1, value); + return DataModelLogger::LogValue("SerialNumber", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxDataCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::Reachable::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxDataCount", 1, value); + return DataModelLogger::LogValue("Reachable", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::UniqueID::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxDataPollCount", 1, value); + return DataModelLogger::LogValue("UniqueID", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id: { + chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxBeaconCount", 1, value); + return DataModelLogger::LogValue("ProductAppearance", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxBeaconRequestCount", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxOtherCount", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxAddressFilteredCount", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxDestAddrFilteredCount", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id: { + case BridgedDeviceBasicInformation::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxDuplicatedCount", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id: { - uint32_t value; + case BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrNoFrameCount", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id: { - uint32_t value; + } + break; + } + case Switch::Id: { + switch (path.mAttributeId) + { + case Switch::Attributes::NumberOfPositions::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrUnknownNeighborCount", 1, value); + return DataModelLogger::LogValue("NumberOfPositions", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id: { - uint32_t value; + case Switch::Attributes::CurrentPosition::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrInvalidSrcAddrCount", 1, value); + return DataModelLogger::LogValue("CurrentPosition", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id: { - uint32_t value; + case Switch::Attributes::MultiPressMax::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrSecCount", 1, value); + return DataModelLogger::LogValue("MultiPressMax", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id: { - uint32_t value; + case Switch::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrFcsCount", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id: { - uint32_t value; + case Switch::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RxErrOtherCount", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id: { - chip::app::DataModel::Nullable value; + case Switch::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveTimestamp", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id: { - chip::app::DataModel::Nullable value; + case Switch::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PendingTimestamp", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::Delay::Id: { - chip::app::DataModel::Nullable value; + case Switch::Attributes::FeatureMap::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Delay", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id: { - chip::app::DataModel::Nullable - value; + case Switch::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SecurityPolicy", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id: { - chip::app::DataModel::Nullable value; + } + break; + } + case AdministratorCommissioning::Id: { + switch (path.mAttributeId) + { + case AdministratorCommissioning::Attributes::WindowStatus::Id: { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ChannelPage0Mask", 1, value); + return DataModelLogger::LogValue("WindowStatus", 1, value); } - case ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id: { - chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> - value; + case AdministratorCommissioning::Attributes::AdminFabricIndex::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalDatasetComponents", 1, value); + return DataModelLogger::LogValue("AdminFabricIndex", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id: { - chip::app::DataModel::DecodableList value; + case AdministratorCommissioning::Attributes::AdminVendorId::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveNetworkFaultsList", 1, value); + return DataModelLogger::LogValue("AdminVendorId", 1, value); } - case ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { + case AdministratorCommissioning::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { + case AdministratorCommissioning::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::EventList::Id: { + case AdministratorCommissioning::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::AttributeList::Id: { + case AdministratorCommissioning::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ThreadNetworkDiagnostics::Attributes::FeatureMap::Id: { + case AdministratorCommissioning::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id: { + case AdministratorCommissioning::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7187,100 +9818,126 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case WiFiNetworkDiagnostics::Id: { + case OperationalCredentials::Id: { switch (path.mAttributeId) { - case WiFiNetworkDiagnostics::Attributes::Bssid::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::NOCs::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BSSID", 1, value); + return DataModelLogger::LogValue("NOCs", 1, value); } - case WiFiNetworkDiagnostics::Attributes::SecurityType::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::Fabrics::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SecurityType", 1, value); + return DataModelLogger::LogValue("Fabrics", 1, value); } - case WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::SupportedFabrics::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WiFiVersion", 1, value); + return DataModelLogger::LogValue("SupportedFabrics", 1, value); } - case WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::CommissionedFabrics::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ChannelNumber", 1, value); + return DataModelLogger::LogValue("CommissionedFabrics", 1, value); } - case WiFiNetworkDiagnostics::Attributes::Rssi::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::TrustedRootCertificates::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RSSI", 1, value); + return DataModelLogger::LogValue("TrustedRootCertificates", 1, value); } - case WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::CurrentFabricIndex::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BeaconLostCount", 1, value); + return DataModelLogger::LogValue("CurrentFabricIndex", 1, value); } - case WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BeaconRxCount", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketMulticastRxCount", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketMulticastTxCount", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketUnicastRxCount", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::FeatureMap::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketUnicastTxCount", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id: { - chip::app::DataModel::Nullable value; + case OperationalCredentials::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMaxRate", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case WiFiNetworkDiagnostics::Attributes::OverrunCount::Id: { - chip::app::DataModel::Nullable value; + } + break; + } + case GroupKeyManagement::Id: { + switch (path.mAttributeId) + { + case GroupKeyManagement::Attributes::GroupKeyMap::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GroupKeyMap", 1, value); + } + case GroupKeyManagement::Attributes::GroupTable::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GroupTable", 1, value); + } + case GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxGroupsPerFabric", 1, value); + } + case GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OverrunCount", 1, value); + return DataModelLogger::LogValue("MaxGroupKeysPerFabric", 1, value); } - case WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { + case GroupKeyManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { + case GroupKeyManagement::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::EventList::Id: { + case GroupKeyManagement::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::AttributeList::Id: { + case GroupKeyManagement::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case WiFiNetworkDiagnostics::Attributes::FeatureMap::Id: { + case GroupKeyManagement::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id: { + case GroupKeyManagement::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7288,80 +9945,40 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case EthernetNetworkDiagnostics::Id: { + case FixedLabel::Id: { switch (path.mAttributeId) { - case EthernetNetworkDiagnostics::Attributes::PHYRate::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PHYRate", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::FullDuplex::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FullDuplex", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketRxCount", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PacketTxCount", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::TxErrCount::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TxErrCount", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::CollisionCount::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CollisionCount", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::OverrunCount::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OverrunCount", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CarrierDetect", 1, value); - } - case EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id: { - uint64_t value; + case FixedLabel::Attributes::LabelList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TimeSinceReset", 1, value); + return DataModelLogger::LogValue("LabelList", 1, value); } - case EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { + case FixedLabel::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { + case FixedLabel::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case EthernetNetworkDiagnostics::Attributes::EventList::Id: { + case FixedLabel::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case EthernetNetworkDiagnostics::Attributes::AttributeList::Id: { + case FixedLabel::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case EthernetNetworkDiagnostics::Attributes::FeatureMap::Id: { + case FixedLabel::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id: { + case FixedLabel::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7369,104 +9986,76 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case TimeSynchronization::Id: { + case UserLabel::Id: { switch (path.mAttributeId) { - case TimeSynchronization::Attributes::UTCTime::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UTCTime", 1, value); - } - case TimeSynchronization::Attributes::Granularity::Id: { - chip::app::Clusters::TimeSynchronization::GranularityEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Granularity", 1, value); - } - case TimeSynchronization::Attributes::TimeSource::Id: { - chip::app::Clusters::TimeSynchronization::TimeSourceEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TimeSource", 1, value); - } - case TimeSynchronization::Attributes::TrustedTimeSource::Id: { - chip::app::DataModel::Nullable< - chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TrustedTimeSource", 1, value); - } - case TimeSynchronization::Attributes::DefaultNTP::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DefaultNTP", 1, value); - } - case TimeSynchronization::Attributes::TimeZone::Id: { - chip::app::DataModel::DecodableList - value; + case UserLabel::Attributes::LabelList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TimeZone", 1, value); + return DataModelLogger::LogValue("LabelList", 1, value); } - case TimeSynchronization::Attributes::DSTOffset::Id: { - chip::app::DataModel::DecodableList - value; + case UserLabel::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DSTOffset", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case TimeSynchronization::Attributes::LocalTime::Id: { - chip::app::DataModel::Nullable value; + case UserLabel::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LocalTime", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case TimeSynchronization::Attributes::TimeZoneDatabase::Id: { - chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value; + case UserLabel::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TimeZoneDatabase", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case TimeSynchronization::Attributes::NTPServerAvailable::Id: { - bool value; + case UserLabel::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NTPServerAvailable", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case TimeSynchronization::Attributes::TimeZoneListMaxSize::Id: { - uint8_t value; + case UserLabel::Attributes::FeatureMap::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TimeZoneListMaxSize", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id: { - uint8_t value; + case UserLabel::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DSTOffsetListMaxSize", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case TimeSynchronization::Attributes::SupportsDNSResolve::Id: { - bool value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportsDNSResolve", 1, value); } - case TimeSynchronization::Attributes::GeneratedCommandList::Id: { + break; + } + case ProxyConfiguration::Id: { + switch (path.mAttributeId) + { + case ProxyConfiguration::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case TimeSynchronization::Attributes::AcceptedCommandList::Id: { + case ProxyConfiguration::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case TimeSynchronization::Attributes::EventList::Id: { + case ProxyConfiguration::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case TimeSynchronization::Attributes::AttributeList::Id: { + case ProxyConfiguration::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case TimeSynchronization::Attributes::FeatureMap::Id: { + case ProxyConfiguration::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case TimeSynchronization::Attributes::ClusterRevision::Id: { + case ProxyConfiguration::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7474,115 +10063,112 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BridgedDeviceBasicInformation::Id: { + case ProxyDiscovery::Id: { switch (path.mAttributeId) { - case BridgedDeviceBasicInformation::Attributes::VendorName::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("VendorName", 1, value); - } - case BridgedDeviceBasicInformation::Attributes::VendorID::Id: { - chip::VendorId value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("VendorID", 1, value); - } - case BridgedDeviceBasicInformation::Attributes::ProductName::Id: { - chip::CharSpan value; + case ProxyDiscovery::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductName", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::NodeLabel::Id: { - chip::CharSpan value; + case ProxyDiscovery::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NodeLabel", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id: { - uint16_t value; + case ProxyDiscovery::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HardwareVersion", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id: { - chip::CharSpan value; + case ProxyDiscovery::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HardwareVersionString", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id: { + case ProxyDiscovery::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SoftwareVersion", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id: { - chip::CharSpan value; + case ProxyDiscovery::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SoftwareVersionString", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ManufacturingDate", 1, value); } - case BridgedDeviceBasicInformation::Attributes::PartNumber::Id: { - chip::CharSpan value; + break; + } + case ProxyValid::Id: { + switch (path.mAttributeId) + { + case ProxyValid::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PartNumber", 1, value); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::ProductURL::Id: { - chip::CharSpan value; + case ProxyValid::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductURL", 1, value); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::ProductLabel::Id: { - chip::CharSpan value; + case ProxyValid::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductLabel", 1, value); + return DataModelLogger::LogValue("EventList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::SerialNumber::Id: { - chip::CharSpan value; + case ProxyValid::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SerialNumber", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::Reachable::Id: { - bool value; + case ProxyValid::Attributes::FeatureMap::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Reachable", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BridgedDeviceBasicInformation::Attributes::UniqueID::Id: { - chip::CharSpan value; + case ProxyValid::Attributes::ClusterRevision::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UniqueID", 1, value); + return DataModelLogger::LogValue("ClusterRevision", 1, value); } - case BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id: { - chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType value; + } + break; + } + case BooleanState::Id: { + switch (path.mAttributeId) + { + case BooleanState::Attributes::StateValue::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProductAppearance", 1, value); + return DataModelLogger::LogValue("StateValue", 1, value); } - case BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id: { + case BooleanState::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id: { + case BooleanState::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::EventList::Id: { + case BooleanState::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::AttributeList::Id: { + case BooleanState::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BridgedDeviceBasicInformation::Attributes::FeatureMap::Id: { + case BooleanState::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id: { + case BooleanState::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7590,50 +10176,77 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Switch::Id: { + case IcdManagement::Id: { switch (path.mAttributeId) { - case Switch::Attributes::NumberOfPositions::Id: { - uint8_t value; + case IcdManagement::Attributes::IdleModeDuration::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NumberOfPositions", 1, value); + return DataModelLogger::LogValue("IdleModeDuration", 1, value); } - case Switch::Attributes::CurrentPosition::Id: { - uint8_t value; + case IcdManagement::Attributes::ActiveModeDuration::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentPosition", 1, value); + return DataModelLogger::LogValue("ActiveModeDuration", 1, value); } - case Switch::Attributes::MultiPressMax::Id: { - uint8_t value; + case IcdManagement::Attributes::ActiveModeThreshold::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MultiPressMax", 1, value); + return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); } - case Switch::Attributes::GeneratedCommandList::Id: { + case IcdManagement::Attributes::RegisteredClients::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RegisteredClients", 1, value); + } + case IcdManagement::Attributes::ICDCounter::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ICDCounter", 1, value); + } + case IcdManagement::Attributes::ClientsSupportedPerFabric::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClientsSupportedPerFabric", 1, value); + } + case IcdManagement::Attributes::UserActiveModeTriggerHint::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UserActiveModeTriggerHint", 1, value); + } + case IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UserActiveModeTriggerInstruction", 1, value); + } + case IcdManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case Switch::Attributes::AcceptedCommandList::Id: { + case IcdManagement::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case Switch::Attributes::EventList::Id: { + case IcdManagement::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case Switch::Attributes::AttributeList::Id: { + case IcdManagement::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case Switch::Attributes::FeatureMap::Id: { + case IcdManagement::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case Switch::Attributes::ClusterRevision::Id: { + case IcdManagement::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7641,50 +10254,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case AdministratorCommissioning::Id: { + case Timer::Id: { switch (path.mAttributeId) { - case AdministratorCommissioning::Attributes::WindowStatus::Id: { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; + case Timer::Attributes::SetTime::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("WindowStatus", 1, value); + return DataModelLogger::LogValue("SetTime", 1, value); } - case AdministratorCommissioning::Attributes::AdminFabricIndex::Id: { - chip::app::DataModel::Nullable value; + case Timer::Attributes::TimeRemaining::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AdminFabricIndex", 1, value); + return DataModelLogger::LogValue("TimeRemaining", 1, value); } - case AdministratorCommissioning::Attributes::AdminVendorId::Id: { - chip::app::DataModel::Nullable value; + case Timer::Attributes::TimerState::Id: { + chip::app::Clusters::Timer::TimerStatusEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AdminVendorId", 1, value); + return DataModelLogger::LogValue("TimerState", 1, value); } - case AdministratorCommissioning::Attributes::GeneratedCommandList::Id: { + case Timer::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case AdministratorCommissioning::Attributes::AcceptedCommandList::Id: { + case Timer::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case AdministratorCommissioning::Attributes::EventList::Id: { + case Timer::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case AdministratorCommissioning::Attributes::AttributeList::Id: { + case Timer::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case AdministratorCommissioning::Attributes::FeatureMap::Id: { + case Timer::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case AdministratorCommissioning::Attributes::ClusterRevision::Id: { + case Timer::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7692,68 +10305,67 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OperationalCredentials::Id: { + case OvenCavityOperationalState::Id: { switch (path.mAttributeId) { - case OperationalCredentials::Attributes::NOCs::Id: { - chip::app::DataModel::DecodableList - value; + case OvenCavityOperationalState::Attributes::PhaseList::Id: { + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NOCs", 1, value); + return DataModelLogger::LogValue("PhaseList", 1, value); } - case OperationalCredentials::Attributes::Fabrics::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; + case OvenCavityOperationalState::Attributes::CurrentPhase::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Fabrics", 1, value); + return DataModelLogger::LogValue("CurrentPhase", 1, value); } - case OperationalCredentials::Attributes::SupportedFabrics::Id: { - uint8_t value; + case OvenCavityOperationalState::Attributes::CountdownTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedFabrics", 1, value); + return DataModelLogger::LogValue("CountdownTime", 1, value); } - case OperationalCredentials::Attributes::CommissionedFabrics::Id: { - uint8_t value; + case OvenCavityOperationalState::Attributes::OperationalStateList::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CommissionedFabrics", 1, value); + return DataModelLogger::LogValue("OperationalStateList", 1, value); } - case OperationalCredentials::Attributes::TrustedRootCertificates::Id: { - chip::app::DataModel::DecodableList value; + case OvenCavityOperationalState::Attributes::OperationalState::Id: { + chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TrustedRootCertificates", 1, value); + return DataModelLogger::LogValue("OperationalState", 1, value); } - case OperationalCredentials::Attributes::CurrentFabricIndex::Id: { - uint8_t value; + case OvenCavityOperationalState::Attributes::OperationalError::Id: { + chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentFabricIndex", 1, value); + return DataModelLogger::LogValue("OperationalError", 1, value); } - case OperationalCredentials::Attributes::GeneratedCommandList::Id: { + case OvenCavityOperationalState::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OperationalCredentials::Attributes::AcceptedCommandList::Id: { + case OvenCavityOperationalState::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OperationalCredentials::Attributes::EventList::Id: { + case OvenCavityOperationalState::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OperationalCredentials::Attributes::AttributeList::Id: { + case OvenCavityOperationalState::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OperationalCredentials::Attributes::FeatureMap::Id: { + case OvenCavityOperationalState::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OperationalCredentials::Attributes::ClusterRevision::Id: { + case OvenCavityOperationalState::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7761,57 +10373,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case GroupKeyManagement::Id: { + case OvenMode::Id: { switch (path.mAttributeId) { - case GroupKeyManagement::Attributes::GroupKeyMap::Id: { - chip::app::DataModel::DecodableList - value; + case OvenMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GroupKeyMap", 1, value); + return DataModelLogger::LogValue("SupportedModes", 1, value); } - case GroupKeyManagement::Attributes::GroupTable::Id: { - chip::app::DataModel::DecodableList - value; + case OvenMode::Attributes::CurrentMode::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GroupTable", 1, value); + return DataModelLogger::LogValue("CurrentMode", 1, value); } - case GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id: { - uint16_t value; + case OvenMode::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxGroupsPerFabric", 1, value); + return DataModelLogger::LogValue("StartUpMode", 1, value); } - case GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id: { - uint16_t value; + case OvenMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxGroupKeysPerFabric", 1, value); + return DataModelLogger::LogValue("OnMode", 1, value); } - case GroupKeyManagement::Attributes::GeneratedCommandList::Id: { + case OvenMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case GroupKeyManagement::Attributes::AcceptedCommandList::Id: { + case OvenMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case GroupKeyManagement::Attributes::EventList::Id: { + case OvenMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case GroupKeyManagement::Attributes::AttributeList::Id: { + case OvenMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case GroupKeyManagement::Attributes::FeatureMap::Id: { + case OvenMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case GroupKeyManagement::Attributes::ClusterRevision::Id: { + case OvenMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7819,40 +10429,45 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case FixedLabel::Id: { + case LaundryDryerControls::Id: { switch (path.mAttributeId) { - case FixedLabel::Attributes::LabelList::Id: { - chip::app::DataModel::DecodableList value; + case LaundryDryerControls::Attributes::SupportedDrynessLevels::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LabelList", 1, value); + return DataModelLogger::LogValue("SupportedDrynessLevels", 1, value); } - case FixedLabel::Attributes::GeneratedCommandList::Id: { + case LaundryDryerControls::Attributes::SelectedDrynessLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SelectedDrynessLevel", 1, value); + } + case LaundryDryerControls::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case FixedLabel::Attributes::AcceptedCommandList::Id: { + case LaundryDryerControls::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case FixedLabel::Attributes::EventList::Id: { + case LaundryDryerControls::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case FixedLabel::Attributes::AttributeList::Id: { + case LaundryDryerControls::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case FixedLabel::Attributes::FeatureMap::Id: { + case LaundryDryerControls::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case FixedLabel::Attributes::ClusterRevision::Id: { + case LaundryDryerControls::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7860,76 +10475,122 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case UserLabel::Id: { + case ModeSelect::Id: { switch (path.mAttributeId) { - case UserLabel::Attributes::LabelList::Id: { - chip::app::DataModel::DecodableList value; + case ModeSelect::Attributes::Description::Id: { + chip::CharSpan value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LabelList", 1, value); + return DataModelLogger::LogValue("Description", 1, value); } - case UserLabel::Attributes::GeneratedCommandList::Id: { + case ModeSelect::Attributes::StandardNamespace::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StandardNamespace", 1, value); + } + case ModeSelect::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case ModeSelect::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case ModeSelect::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case ModeSelect::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case ModeSelect::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case UserLabel::Attributes::AcceptedCommandList::Id: { + case ModeSelect::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case UserLabel::Attributes::EventList::Id: { + case ModeSelect::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case UserLabel::Attributes::AttributeList::Id: { + case ModeSelect::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case UserLabel::Attributes::FeatureMap::Id: { + case ModeSelect::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ModeSelect::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case LaundryWasherMode::Id: { + switch (path.mAttributeId) + { + case LaundryWasherMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case LaundryWasherMode::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case LaundryWasherMode::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); } - case UserLabel::Attributes::ClusterRevision::Id: { - uint16_t value; + case LaundryWasherMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } + return DataModelLogger::LogValue("OnMode", 1, value); } - break; - } - case ProxyConfiguration::Id: { - switch (path.mAttributeId) - { - case ProxyConfiguration::Attributes::GeneratedCommandList::Id: { + case LaundryWasherMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ProxyConfiguration::Attributes::AcceptedCommandList::Id: { + case LaundryWasherMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ProxyConfiguration::Attributes::EventList::Id: { + case LaundryWasherMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ProxyConfiguration::Attributes::AttributeList::Id: { + case LaundryWasherMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ProxyConfiguration::Attributes::FeatureMap::Id: { + case LaundryWasherMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ProxyConfiguration::Attributes::ClusterRevision::Id: { + case LaundryWasherMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7937,35 +10598,57 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ProxyDiscovery::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Id: { switch (path.mAttributeId) { - case ProxyDiscovery::Attributes::GeneratedCommandList::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ProxyDiscovery::Attributes::AcceptedCommandList::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ProxyDiscovery::Attributes::EventList::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ProxyDiscovery::Attributes::AttributeList::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ProxyDiscovery::Attributes::FeatureMap::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ProxyDiscovery::Attributes::ClusterRevision::Id: { + case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -7973,35 +10656,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ProxyValid::Id: { + case LaundryWasherControls::Id: { switch (path.mAttributeId) { - case ProxyValid::Attributes::GeneratedCommandList::Id: { + case LaundryWasherControls::Attributes::SpinSpeeds::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SpinSpeeds", 1, value); + } + case LaundryWasherControls::Attributes::SpinSpeedCurrent::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SpinSpeedCurrent", 1, value); + } + case LaundryWasherControls::Attributes::NumberOfRinses::Id: { + chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfRinses", 1, value); + } + case LaundryWasherControls::Attributes::SupportedRinses::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedRinses", 1, value); + } + case LaundryWasherControls::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ProxyValid::Attributes::AcceptedCommandList::Id: { + case LaundryWasherControls::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ProxyValid::Attributes::EventList::Id: { + case LaundryWasherControls::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ProxyValid::Attributes::AttributeList::Id: { + case LaundryWasherControls::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ProxyValid::Attributes::FeatureMap::Id: { + case LaundryWasherControls::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ProxyValid::Attributes::ClusterRevision::Id: { + case LaundryWasherControls::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8009,40 +10712,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BooleanState::Id: { + case RvcRunMode::Id: { switch (path.mAttributeId) { - case BooleanState::Attributes::StateValue::Id: { - bool value; + case RvcRunMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StateValue", 1, value); + return DataModelLogger::LogValue("SupportedModes", 1, value); } - case BooleanState::Attributes::GeneratedCommandList::Id: { + case RvcRunMode::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case RvcRunMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case RvcRunMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BooleanState::Attributes::AcceptedCommandList::Id: { + case RvcRunMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BooleanState::Attributes::EventList::Id: { + case RvcRunMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BooleanState::Attributes::AttributeList::Id: { + case RvcRunMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BooleanState::Attributes::FeatureMap::Id: { + case RvcRunMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BooleanState::Attributes::ClusterRevision::Id: { + case RvcRunMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8050,77 +10763,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case IcdManagement::Id: { + case RvcCleanMode::Id: { switch (path.mAttributeId) { - case IcdManagement::Attributes::IdleModeDuration::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("IdleModeDuration", 1, value); - } - case IcdManagement::Attributes::ActiveModeDuration::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeDuration", 1, value); - } - case IcdManagement::Attributes::ActiveModeThreshold::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); - } - case IcdManagement::Attributes::RegisteredClients::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RegisteredClients", 1, value); - } - case IcdManagement::Attributes::ICDCounter::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ICDCounter", 1, value); - } - case IcdManagement::Attributes::ClientsSupportedPerFabric::Id: { - uint16_t value; + case RvcCleanMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClientsSupportedPerFabric", 1, value); + return DataModelLogger::LogValue("SupportedModes", 1, value); } - case IcdManagement::Attributes::UserActiveModeTriggerHint::Id: { - chip::BitMask value; + case RvcCleanMode::Attributes::CurrentMode::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UserActiveModeTriggerHint", 1, value); + return DataModelLogger::LogValue("CurrentMode", 1, value); } - case IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id: { - chip::CharSpan value; + case RvcCleanMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("UserActiveModeTriggerInstruction", 1, value); + return DataModelLogger::LogValue("OnMode", 1, value); } - case IcdManagement::Attributes::GeneratedCommandList::Id: { + case RvcCleanMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case IcdManagement::Attributes::AcceptedCommandList::Id: { + case RvcCleanMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case IcdManagement::Attributes::EventList::Id: { + case RvcCleanMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case IcdManagement::Attributes::AttributeList::Id: { + case RvcCleanMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case IcdManagement::Attributes::FeatureMap::Id: { + case RvcCleanMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case IcdManagement::Attributes::ClusterRevision::Id: { + case RvcCleanMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8128,67 +10814,65 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OvenOperationalState::Id: { + case TemperatureControl::Id: { switch (path.mAttributeId) { - case OvenOperationalState::Attributes::PhaseList::Id: { - chip::app::DataModel::Nullable> value; + case TemperatureControl::Attributes::TemperatureSetpoint::Id: { + int16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PhaseList", 1, value); + return DataModelLogger::LogValue("TemperatureSetpoint", 1, value); } - case OvenOperationalState::Attributes::CurrentPhase::Id: { - chip::app::DataModel::Nullable value; + case TemperatureControl::Attributes::MinTemperature::Id: { + int16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentPhase", 1, value); + return DataModelLogger::LogValue("MinTemperature", 1, value); } - case OvenOperationalState::Attributes::CountdownTime::Id: { - chip::app::DataModel::Nullable value; + case TemperatureControl::Attributes::MaxTemperature::Id: { + int16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CountdownTime", 1, value); + return DataModelLogger::LogValue("MaxTemperature", 1, value); } - case OvenOperationalState::Attributes::OperationalStateList::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenOperationalState::Structs::OperationalStateStruct::DecodableType> - value; + case TemperatureControl::Attributes::Step::Id: { + int16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalStateList", 1, value); + return DataModelLogger::LogValue("Step", 1, value); } - case OvenOperationalState::Attributes::OperationalState::Id: { + case TemperatureControl::Attributes::SelectedTemperatureLevel::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalState", 1, value); + return DataModelLogger::LogValue("SelectedTemperatureLevel", 1, value); } - case OvenOperationalState::Attributes::OperationalError::Id: { - chip::app::Clusters::OvenOperationalState::Structs::ErrorStateStruct::DecodableType value; + case TemperatureControl::Attributes::SupportedTemperatureLevels::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalError", 1, value); + return DataModelLogger::LogValue("SupportedTemperatureLevels", 1, value); } - case OvenOperationalState::Attributes::GeneratedCommandList::Id: { + case TemperatureControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OvenOperationalState::Attributes::AcceptedCommandList::Id: { + case TemperatureControl::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OvenOperationalState::Attributes::EventList::Id: { + case TemperatureControl::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OvenOperationalState::Attributes::AttributeList::Id: { + case TemperatureControl::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OvenOperationalState::Attributes::FeatureMap::Id: { + case TemperatureControl::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OvenOperationalState::Attributes::ClusterRevision::Id: { + case TemperatureControl::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8196,65 +10880,50 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ModeSelect::Id: { + case RefrigeratorAlarm::Id: { switch (path.mAttributeId) { - case ModeSelect::Attributes::Description::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Description", 1, value); - } - case ModeSelect::Attributes::StandardNamespace::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StandardNamespace", 1, value); - } - case ModeSelect::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedModes", 1, value); - } - case ModeSelect::Attributes::CurrentMode::Id: { - uint8_t value; + case RefrigeratorAlarm::Attributes::Mask::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMode", 1, value); + return DataModelLogger::LogValue("Mask", 1, value); } - case ModeSelect::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; + case RefrigeratorAlarm::Attributes::State::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); + return DataModelLogger::LogValue("State", 1, value); } - case ModeSelect::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; + case RefrigeratorAlarm::Attributes::Supported::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); + return DataModelLogger::LogValue("Supported", 1, value); } - case ModeSelect::Attributes::GeneratedCommandList::Id: { + case RefrigeratorAlarm::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ModeSelect::Attributes::AcceptedCommandList::Id: { + case RefrigeratorAlarm::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ModeSelect::Attributes::EventList::Id: { + case RefrigeratorAlarm::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ModeSelect::Attributes::AttributeList::Id: { + case RefrigeratorAlarm::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ModeSelect::Attributes::FeatureMap::Id: { + case RefrigeratorAlarm::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ModeSelect::Attributes::ClusterRevision::Id: { + case RefrigeratorAlarm::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8262,56 +10931,56 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case LaundryWasherMode::Id: { + case DishwasherMode::Id: { switch (path.mAttributeId) { - case LaundryWasherMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList + case DishwasherMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedModes", 1, value); } - case LaundryWasherMode::Attributes::CurrentMode::Id: { + case DishwasherMode::Attributes::CurrentMode::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case LaundryWasherMode::Attributes::StartUpMode::Id: { + case DishwasherMode::Attributes::StartUpMode::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartUpMode", 1, value); } - case LaundryWasherMode::Attributes::OnMode::Id: { + case DishwasherMode::Attributes::OnMode::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OnMode", 1, value); } - case LaundryWasherMode::Attributes::GeneratedCommandList::Id: { + case DishwasherMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case LaundryWasherMode::Attributes::AcceptedCommandList::Id: { + case DishwasherMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case LaundryWasherMode::Attributes::EventList::Id: { + case DishwasherMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case LaundryWasherMode::Attributes::AttributeList::Id: { + case DishwasherMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case LaundryWasherMode::Attributes::FeatureMap::Id: { + case DishwasherMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case LaundryWasherMode::Attributes::ClusterRevision::Id: { + case DishwasherMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8319,57 +10988,40 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case RefrigeratorAndTemperatureControlledCabinetMode::Id: { + case AirQuality::Id: { switch (path.mAttributeId) { - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> - value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedModes", 1, value); - } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMode", 1, value); - } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); - } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; + case AirQuality::Attributes::AirQuality::Id: { + chip::app::Clusters::AirQuality::AirQualityEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); + return DataModelLogger::LogValue("AirQuality", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id: { + case AirQuality::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id: { + case AirQuality::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id: { + case AirQuality::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id: { + case AirQuality::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id: { + case AirQuality::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id: { + case AirQuality::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8377,55 +11029,100 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case LaundryWasherControls::Id: { + case SmokeCoAlarm::Id: { switch (path.mAttributeId) { - case LaundryWasherControls::Attributes::SpinSpeeds::Id: { - chip::app::DataModel::DecodableList value; + case SmokeCoAlarm::Attributes::ExpressedState::Id: { + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SpinSpeeds", 1, value); + return DataModelLogger::LogValue("ExpressedState", 1, value); } - case LaundryWasherControls::Attributes::SpinSpeedCurrent::Id: { - chip::app::DataModel::Nullable value; + case SmokeCoAlarm::Attributes::SmokeState::Id: { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SpinSpeedCurrent", 1, value); + return DataModelLogger::LogValue("SmokeState", 1, value); } - case LaundryWasherControls::Attributes::NumberOfRinses::Id: { - chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value; + case SmokeCoAlarm::Attributes::COState::Id: { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NumberOfRinses", 1, value); + return DataModelLogger::LogValue("COState", 1, value); } - case LaundryWasherControls::Attributes::SupportedRinses::Id: { - chip::app::DataModel::DecodableList value; + case SmokeCoAlarm::Attributes::BatteryAlert::Id: { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedRinses", 1, value); + return DataModelLogger::LogValue("BatteryAlert", 1, value); } - case LaundryWasherControls::Attributes::GeneratedCommandList::Id: { + case SmokeCoAlarm::Attributes::DeviceMuted::Id: { + chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DeviceMuted", 1, value); + } + case SmokeCoAlarm::Attributes::TestInProgress::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TestInProgress", 1, value); + } + case SmokeCoAlarm::Attributes::HardwareFaultAlert::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("HardwareFaultAlert", 1, value); + } + case SmokeCoAlarm::Attributes::EndOfServiceAlert::Id: { + chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EndOfServiceAlert", 1, value); + } + case SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id: { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("InterconnectSmokeAlarm", 1, value); + } + case SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id: { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("InterconnectCOAlarm", 1, value); + } + case SmokeCoAlarm::Attributes::ContaminationState::Id: { + chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ContaminationState", 1, value); + } + case SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id: { + chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SmokeSensitivityLevel", 1, value); + } + case SmokeCoAlarm::Attributes::ExpiryDate::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ExpiryDate", 1, value); + } + case SmokeCoAlarm::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case LaundryWasherControls::Attributes::AcceptedCommandList::Id: { + case SmokeCoAlarm::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case LaundryWasherControls::Attributes::EventList::Id: { + case SmokeCoAlarm::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case LaundryWasherControls::Attributes::AttributeList::Id: { + case SmokeCoAlarm::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case LaundryWasherControls::Attributes::FeatureMap::Id: { + case SmokeCoAlarm::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case LaundryWasherControls::Attributes::ClusterRevision::Id: { + case SmokeCoAlarm::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8433,50 +11130,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case RvcRunMode::Id: { + case DishwasherAlarm::Id: { switch (path.mAttributeId) { - case RvcRunMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList value; + case DishwasherAlarm::Attributes::Mask::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedModes", 1, value); + return DataModelLogger::LogValue("Mask", 1, value); } - case RvcRunMode::Attributes::CurrentMode::Id: { - uint8_t value; + case DishwasherAlarm::Attributes::Latch::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMode", 1, value); + return DataModelLogger::LogValue("Latch", 1, value); } - case RvcRunMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; + case DishwasherAlarm::Attributes::State::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); + return DataModelLogger::LogValue("State", 1, value); } - case RvcRunMode::Attributes::GeneratedCommandList::Id: { + case DishwasherAlarm::Attributes::Supported::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Supported", 1, value); + } + case DishwasherAlarm::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case RvcRunMode::Attributes::AcceptedCommandList::Id: { + case DishwasherAlarm::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case RvcRunMode::Attributes::EventList::Id: { + case DishwasherAlarm::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case RvcRunMode::Attributes::AttributeList::Id: { + case DishwasherAlarm::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case RvcRunMode::Attributes::FeatureMap::Id: { + case DishwasherAlarm::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case RvcRunMode::Attributes::ClusterRevision::Id: { + case DishwasherAlarm::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8484,50 +11186,46 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case RvcCleanMode::Id: { + case MicrowaveOvenMode::Id: { switch (path.mAttributeId) { - case RvcCleanMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList value; + case MicrowaveOvenMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedModes", 1, value); } - case RvcCleanMode::Attributes::CurrentMode::Id: { + case MicrowaveOvenMode::Attributes::CurrentMode::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case RvcCleanMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } - case RvcCleanMode::Attributes::GeneratedCommandList::Id: { + case MicrowaveOvenMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case RvcCleanMode::Attributes::AcceptedCommandList::Id: { + case MicrowaveOvenMode::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case RvcCleanMode::Attributes::EventList::Id: { + case MicrowaveOvenMode::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case RvcCleanMode::Attributes::AttributeList::Id: { + case MicrowaveOvenMode::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case RvcCleanMode::Attributes::FeatureMap::Id: { + case MicrowaveOvenMode::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case RvcCleanMode::Attributes::ClusterRevision::Id: { + case MicrowaveOvenMode::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8535,65 +11233,60 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case TemperatureControl::Id: { + case MicrowaveOvenControl::Id: { switch (path.mAttributeId) { - case TemperatureControl::Attributes::TemperatureSetpoint::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TemperatureSetpoint", 1, value); - } - case TemperatureControl::Attributes::MinTemperature::Id: { - int16_t value; + case MicrowaveOvenControl::Attributes::CookTime::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MinTemperature", 1, value); + return DataModelLogger::LogValue("CookTime", 1, value); } - case TemperatureControl::Attributes::MaxTemperature::Id: { - int16_t value; + case MicrowaveOvenControl::Attributes::PowerSetting::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxTemperature", 1, value); + return DataModelLogger::LogValue("PowerSetting", 1, value); } - case TemperatureControl::Attributes::Step::Id: { - int16_t value; + case MicrowaveOvenControl::Attributes::MinPower::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Step", 1, value); + return DataModelLogger::LogValue("MinPower", 1, value); } - case TemperatureControl::Attributes::SelectedTemperatureLevel::Id: { + case MicrowaveOvenControl::Attributes::MaxPower::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SelectedTemperatureLevel", 1, value); + return DataModelLogger::LogValue("MaxPower", 1, value); } - case TemperatureControl::Attributes::SupportedTemperatureLevels::Id: { - chip::app::DataModel::DecodableList value; + case MicrowaveOvenControl::Attributes::PowerStep::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedTemperatureLevels", 1, value); + return DataModelLogger::LogValue("PowerStep", 1, value); } - case TemperatureControl::Attributes::GeneratedCommandList::Id: { + case MicrowaveOvenControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case TemperatureControl::Attributes::AcceptedCommandList::Id: { + case MicrowaveOvenControl::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case TemperatureControl::Attributes::EventList::Id: { + case MicrowaveOvenControl::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case TemperatureControl::Attributes::AttributeList::Id: { + case MicrowaveOvenControl::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case TemperatureControl::Attributes::FeatureMap::Id: { + case MicrowaveOvenControl::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case TemperatureControl::Attributes::ClusterRevision::Id: { + case MicrowaveOvenControl::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8601,50 +11294,67 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case RefrigeratorAlarm::Id: { + case OperationalState::Id: { switch (path.mAttributeId) { - case RefrigeratorAlarm::Attributes::Mask::Id: { - chip::BitMask value; + case OperationalState::Attributes::PhaseList::Id: { + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Mask", 1, value); + return DataModelLogger::LogValue("PhaseList", 1, value); } - case RefrigeratorAlarm::Attributes::State::Id: { - chip::BitMask value; + case OperationalState::Attributes::CurrentPhase::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("State", 1, value); + return DataModelLogger::LogValue("CurrentPhase", 1, value); } - case RefrigeratorAlarm::Attributes::Supported::Id: { - chip::BitMask value; + case OperationalState::Attributes::CountdownTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Supported", 1, value); + return DataModelLogger::LogValue("CountdownTime", 1, value); } - case RefrigeratorAlarm::Attributes::GeneratedCommandList::Id: { + case OperationalState::Attributes::OperationalStateList::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OperationalStateList", 1, value); + } + case OperationalState::Attributes::OperationalState::Id: { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OperationalState", 1, value); + } + case OperationalState::Attributes::OperationalError::Id: { + chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OperationalError", 1, value); + } + case OperationalState::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case RefrigeratorAlarm::Attributes::AcceptedCommandList::Id: { + case OperationalState::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case RefrigeratorAlarm::Attributes::EventList::Id: { + case OperationalState::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case RefrigeratorAlarm::Attributes::AttributeList::Id: { + case OperationalState::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case RefrigeratorAlarm::Attributes::FeatureMap::Id: { + case OperationalState::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case RefrigeratorAlarm::Attributes::ClusterRevision::Id: { + case OperationalState::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8652,56 +11362,67 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case DishwasherMode::Id: { + case RvcOperationalState::Id: { switch (path.mAttributeId) { - case DishwasherMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList - value; + case RvcOperationalState::Attributes::PhaseList::Id: { + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedModes", 1, value); + return DataModelLogger::LogValue("PhaseList", 1, value); } - case DishwasherMode::Attributes::CurrentMode::Id: { - uint8_t value; + case RvcOperationalState::Attributes::CurrentPhase::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMode", 1, value); + return DataModelLogger::LogValue("CurrentPhase", 1, value); } - case DishwasherMode::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; + case RvcOperationalState::Attributes::CountdownTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); + return DataModelLogger::LogValue("CountdownTime", 1, value); } - case DishwasherMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; + case RvcOperationalState::Attributes::OperationalStateList::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); + return DataModelLogger::LogValue("OperationalStateList", 1, value); } - case DishwasherMode::Attributes::GeneratedCommandList::Id: { + case RvcOperationalState::Attributes::OperationalState::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OperationalState", 1, value); + } + case RvcOperationalState::Attributes::OperationalError::Id: { + chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OperationalError", 1, value); + } + case RvcOperationalState::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case DishwasherMode::Attributes::AcceptedCommandList::Id: { + case RvcOperationalState::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case DishwasherMode::Attributes::EventList::Id: { + case RvcOperationalState::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case DishwasherMode::Attributes::AttributeList::Id: { + case RvcOperationalState::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case DishwasherMode::Attributes::FeatureMap::Id: { + case RvcOperationalState::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case DishwasherMode::Attributes::ClusterRevision::Id: { + case RvcOperationalState::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8709,40 +11430,67 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case AirQuality::Id: { + case HepaFilterMonitoring::Id: { switch (path.mAttributeId) { - case AirQuality::Attributes::AirQuality::Id: { - chip::app::Clusters::AirQuality::AirQualityEnum value; + case HepaFilterMonitoring::Attributes::Condition::Id: { + chip::Percent value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AirQuality", 1, value); + return DataModelLogger::LogValue("Condition", 1, value); } - case AirQuality::Attributes::GeneratedCommandList::Id: { + case HepaFilterMonitoring::Attributes::DegradationDirection::Id: { + chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DegradationDirection", 1, value); + } + case HepaFilterMonitoring::Attributes::ChangeIndication::Id: { + chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeIndication", 1, value); + } + case HepaFilterMonitoring::Attributes::InPlaceIndicator::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("InPlaceIndicator", 1, value); + } + case HepaFilterMonitoring::Attributes::LastChangedTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LastChangedTime", 1, value); + } + case HepaFilterMonitoring::Attributes::ReplacementProductList::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ReplacementProductList", 1, value); + } + case HepaFilterMonitoring::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case AirQuality::Attributes::AcceptedCommandList::Id: { + case HepaFilterMonitoring::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case AirQuality::Attributes::EventList::Id: { + case HepaFilterMonitoring::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case AirQuality::Attributes::AttributeList::Id: { + case HepaFilterMonitoring::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case AirQuality::Attributes::FeatureMap::Id: { + case HepaFilterMonitoring::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case AirQuality::Attributes::ClusterRevision::Id: { + case HepaFilterMonitoring::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8750,156 +11498,143 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case SmokeCoAlarm::Id: { + case ActivatedCarbonFilterMonitoring::Id: { switch (path.mAttributeId) { - case SmokeCoAlarm::Attributes::ExpressedState::Id: { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ExpressedState", 1, value); - } - case SmokeCoAlarm::Attributes::SmokeState::Id: { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SmokeState", 1, value); - } - case SmokeCoAlarm::Attributes::COState::Id: { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("COState", 1, value); - } - case SmokeCoAlarm::Attributes::BatteryAlert::Id: { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + case ActivatedCarbonFilterMonitoring::Attributes::Condition::Id: { + chip::Percent value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("BatteryAlert", 1, value); + return DataModelLogger::LogValue("Condition", 1, value); } - case SmokeCoAlarm::Attributes::DeviceMuted::Id: { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; + case ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id: { + chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DeviceMuted", 1, value); + return DataModelLogger::LogValue("DegradationDirection", 1, value); } - case SmokeCoAlarm::Attributes::TestInProgress::Id: { - bool value; + case ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id: { + chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("TestInProgress", 1, value); + return DataModelLogger::LogValue("ChangeIndication", 1, value); } - case SmokeCoAlarm::Attributes::HardwareFaultAlert::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id: { bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HardwareFaultAlert", 1, value); - } - case SmokeCoAlarm::Attributes::EndOfServiceAlert::Id: { - chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EndOfServiceAlert", 1, value); - } - case SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id: { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("InterconnectSmokeAlarm", 1, value); - } - case SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id: { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("InterconnectCOAlarm", 1, value); - } - case SmokeCoAlarm::Attributes::ContaminationState::Id: { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ContaminationState", 1, value); + return DataModelLogger::LogValue("InPlaceIndicator", 1, value); } - case SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id: { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; + case ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SmokeSensitivityLevel", 1, value); + return DataModelLogger::LogValue("LastChangedTime", 1, value); } - case SmokeCoAlarm::Attributes::ExpiryDate::Id: { - uint32_t value; + case ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ExpiryDate", 1, value); + return DataModelLogger::LogValue("ReplacementProductList", 1, value); } - case SmokeCoAlarm::Attributes::GeneratedCommandList::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case SmokeCoAlarm::Attributes::AcceptedCommandList::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case SmokeCoAlarm::Attributes::EventList::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case SmokeCoAlarm::Attributes::AttributeList::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case SmokeCoAlarm::Attributes::FeatureMap::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case SmokeCoAlarm::Attributes::ClusterRevision::Id: { + case ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); } } - break; - } - case DishwasherAlarm::Id: { - switch (path.mAttributeId) - { - case DishwasherAlarm::Attributes::Mask::Id: { - chip::BitMask value; + break; + } + case BooleanStateConfiguration::Id: { + switch (path.mAttributeId) + { + case BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentSensitivityLevel", 1, value); + } + case BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedSensitivityLevels", 1, value); + } + case BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultSensitivityLevel", 1, value); + } + case BooleanStateConfiguration::Attributes::AlarmsActive::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsActive", 1, value); + } + case BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Mask", 1, value); + return DataModelLogger::LogValue("AlarmsSuppressed", 1, value); } - case DishwasherAlarm::Attributes::Latch::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsEnabled::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Latch", 1, value); + return DataModelLogger::LogValue("AlarmsEnabled", 1, value); } - case DishwasherAlarm::Attributes::State::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsSupported::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("State", 1, value); + return DataModelLogger::LogValue("AlarmsSupported", 1, value); } - case DishwasherAlarm::Attributes::Supported::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::SensorFault::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Supported", 1, value); + return DataModelLogger::LogValue("SensorFault", 1, value); } - case DishwasherAlarm::Attributes::GeneratedCommandList::Id: { + case BooleanStateConfiguration::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case DishwasherAlarm::Attributes::AcceptedCommandList::Id: { + case BooleanStateConfiguration::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case DishwasherAlarm::Attributes::EventList::Id: { + case BooleanStateConfiguration::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case DishwasherAlarm::Attributes::AttributeList::Id: { + case BooleanStateConfiguration::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case DishwasherAlarm::Attributes::FeatureMap::Id: { + case BooleanStateConfiguration::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case DishwasherAlarm::Attributes::ClusterRevision::Id: { + case BooleanStateConfiguration::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8907,46 +11642,85 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case MicrowaveOvenMode::Id: { + case ValveConfigurationAndControl::Id: { switch (path.mAttributeId) { - case MicrowaveOvenMode::Attributes::SupportedModes::Id: { - chip::app::DataModel::DecodableList - value; + case ValveConfigurationAndControl::Attributes::OpenDuration::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedModes", 1, value); + return DataModelLogger::LogValue("OpenDuration", 1, value); } - case MicrowaveOvenMode::Attributes::CurrentMode::Id: { - uint8_t value; + case ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentMode", 1, value); + return DataModelLogger::LogValue("DefaultOpenDuration", 1, value); } - case MicrowaveOvenMode::Attributes::GeneratedCommandList::Id: { + case ValveConfigurationAndControl::Attributes::AutoCloseTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AutoCloseTime", 1, value); + } + case ValveConfigurationAndControl::Attributes::RemainingDuration::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemainingDuration", 1, value); + } + case ValveConfigurationAndControl::Attributes::CurrentState::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentState", 1, value); + } + case ValveConfigurationAndControl::Attributes::TargetState::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TargetState", 1, value); + } + case ValveConfigurationAndControl::Attributes::CurrentLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::TargetLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TargetLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id: { + chip::Percent value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultOpenLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::ValveFault::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveFault", 1, value); + } + case ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case MicrowaveOvenMode::Attributes::AcceptedCommandList::Id: { + case ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case MicrowaveOvenMode::Attributes::EventList::Id: { + case ValveConfigurationAndControl::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case MicrowaveOvenMode::Attributes::AttributeList::Id: { + case ValveConfigurationAndControl::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case MicrowaveOvenMode::Attributes::FeatureMap::Id: { + case ValveConfigurationAndControl::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case MicrowaveOvenMode::Attributes::ClusterRevision::Id: { + case ValveConfigurationAndControl::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8954,60 +11728,68 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case MicrowaveOvenControl::Id: { + case ElectricalEnergyMeasurement::Id: { switch (path.mAttributeId) { - case MicrowaveOvenControl::Attributes::CookTime::Id: { - uint32_t value; + case ElectricalEnergyMeasurement::Attributes::Accuracy::Id: { + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CookTime", 1, value); + return DataModelLogger::LogValue("Accuracy", 1, value); } - case MicrowaveOvenControl::Attributes::PowerSetting::Id: { - uint8_t value; + case ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PowerSetting", 1, value); + return DataModelLogger::LogValue("CumulativeEnergyImported", 1, value); } - case MicrowaveOvenControl::Attributes::MinPower::Id: { - uint8_t value; + case ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MinPower", 1, value); + return DataModelLogger::LogValue("CumulativeEnergyExported", 1, value); } - case MicrowaveOvenControl::Attributes::MaxPower::Id: { - uint8_t value; + case ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxPower", 1, value); + return DataModelLogger::LogValue("PeriodicEnergyImported", 1, value); } - case MicrowaveOvenControl::Attributes::PowerStep::Id: { - uint8_t value; + case ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PowerStep", 1, value); + return DataModelLogger::LogValue("PeriodicEnergyExported", 1, value); } - case MicrowaveOvenControl::Attributes::GeneratedCommandList::Id: { + case ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case MicrowaveOvenControl::Attributes::AcceptedCommandList::Id: { + case ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case MicrowaveOvenControl::Attributes::EventList::Id: { + case ElectricalEnergyMeasurement::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case MicrowaveOvenControl::Attributes::AttributeList::Id: { + case ElectricalEnergyMeasurement::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case MicrowaveOvenControl::Attributes::FeatureMap::Id: { + case ElectricalEnergyMeasurement::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case MicrowaveOvenControl::Attributes::ClusterRevision::Id: { + case ElectricalEnergyMeasurement::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -9015,67 +11797,81 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OperationalState::Id: { + case DemandResponseLoadControl::Id: { switch (path.mAttributeId) { - case OperationalState::Attributes::PhaseList::Id: { - chip::app::DataModel::Nullable> value; + case DemandResponseLoadControl::Attributes::LoadControlPrograms::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PhaseList", 1, value); + return DataModelLogger::LogValue("LoadControlPrograms", 1, value); } - case OperationalState::Attributes::CurrentPhase::Id: { - chip::app::DataModel::Nullable value; + case DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentPhase", 1, value); + return DataModelLogger::LogValue("NumberOfLoadControlPrograms", 1, value); } - case OperationalState::Attributes::CountdownTime::Id: { - chip::app::DataModel::Nullable value; + case DemandResponseLoadControl::Attributes::Events::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CountdownTime", 1, value); + return DataModelLogger::LogValue("Events", 1, value); } - case OperationalState::Attributes::OperationalStateList::Id: { + case DemandResponseLoadControl::Attributes::ActiveEvents::Id: { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> + chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalStateList", 1, value); + return DataModelLogger::LogValue("ActiveEvents", 1, value); } - case OperationalState::Attributes::OperationalState::Id: { - chip::app::Clusters::OperationalState::OperationalStateEnum value; + case DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalState", 1, value); + return DataModelLogger::LogValue("NumberOfEventsPerProgram", 1, value); } - case OperationalState::Attributes::OperationalError::Id: { - chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType value; + case DemandResponseLoadControl::Attributes::NumberOfTransitions::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalError", 1, value); + return DataModelLogger::LogValue("NumberOfTransitions", 1, value); } - case OperationalState::Attributes::GeneratedCommandList::Id: { + case DemandResponseLoadControl::Attributes::DefaultRandomStart::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultRandomStart", 1, value); + } + case DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultRandomDuration", 1, value); + } + case DemandResponseLoadControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case OperationalState::Attributes::AcceptedCommandList::Id: { + case DemandResponseLoadControl::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case OperationalState::Attributes::EventList::Id: { + case DemandResponseLoadControl::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case OperationalState::Attributes::AttributeList::Id: { + case DemandResponseLoadControl::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case OperationalState::Attributes::FeatureMap::Id: { + case DemandResponseLoadControl::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case OperationalState::Attributes::ClusterRevision::Id: { + case DemandResponseLoadControl::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -9083,67 +11879,73 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case RvcOperationalState::Id: { + case DeviceEnergyManagement::Id: { switch (path.mAttributeId) { - case RvcOperationalState::Attributes::PhaseList::Id: { - chip::app::DataModel::Nullable> value; + case DeviceEnergyManagement::Attributes::ESAType::Id: { + chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("PhaseList", 1, value); + return DataModelLogger::LogValue("ESAType", 1, value); } - case RvcOperationalState::Attributes::CurrentPhase::Id: { - chip::app::DataModel::Nullable value; + case DeviceEnergyManagement::Attributes::ESACanGenerate::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentPhase", 1, value); + return DataModelLogger::LogValue("ESACanGenerate", 1, value); } - case RvcOperationalState::Attributes::CountdownTime::Id: { - chip::app::DataModel::Nullable value; + case DeviceEnergyManagement::Attributes::ESAState::Id: { + chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CountdownTime", 1, value); + return DataModelLogger::LogValue("ESAState", 1, value); } - case RvcOperationalState::Attributes::OperationalStateList::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> - value; + case DeviceEnergyManagement::Attributes::AbsMinPower::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalStateList", 1, value); + return DataModelLogger::LogValue("AbsMinPower", 1, value); } - case RvcOperationalState::Attributes::OperationalState::Id: { - uint8_t value; + case DeviceEnergyManagement::Attributes::AbsMaxPower::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalState", 1, value); + return DataModelLogger::LogValue("AbsMaxPower", 1, value); } - case RvcOperationalState::Attributes::OperationalError::Id: { - chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType value; + case DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::Id: { + chip::app::DataModel::Nullable> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OperationalError", 1, value); + return DataModelLogger::LogValue("PowerAdjustmentCapability", 1, value); } - case RvcOperationalState::Attributes::GeneratedCommandList::Id: { + case DeviceEnergyManagement::Attributes::Forecast::Id: { + chip::app::DataModel::Nullable + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Forecast", 1, value); + } + case DeviceEnergyManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case RvcOperationalState::Attributes::AcceptedCommandList::Id: { + case DeviceEnergyManagement::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case RvcOperationalState::Attributes::EventList::Id: { + case DeviceEnergyManagement::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case RvcOperationalState::Attributes::AttributeList::Id: { + case DeviceEnergyManagement::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case RvcOperationalState::Attributes::FeatureMap::Id: { + case DeviceEnergyManagement::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case RvcOperationalState::Attributes::ClusterRevision::Id: { + case DeviceEnergyManagement::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -9151,135 +11953,160 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case HepaFilterMonitoring::Id: { + case EnergyEvse::Id: { switch (path.mAttributeId) { - case HepaFilterMonitoring::Attributes::Condition::Id: { - chip::Percent value; + case EnergyEvse::Attributes::State::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Condition", 1, value); + return DataModelLogger::LogValue("State", 1, value); } - case HepaFilterMonitoring::Attributes::DegradationDirection::Id: { - chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value; + case EnergyEvse::Attributes::SupplyState::Id: { + chip::app::Clusters::EnergyEvse::SupplyStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DegradationDirection", 1, value); + return DataModelLogger::LogValue("SupplyState", 1, value); } - case HepaFilterMonitoring::Attributes::ChangeIndication::Id: { - chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value; + case EnergyEvse::Attributes::FaultState::Id: { + chip::app::Clusters::EnergyEvse::FaultStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ChangeIndication", 1, value); + return DataModelLogger::LogValue("FaultState", 1, value); } - case HepaFilterMonitoring::Attributes::InPlaceIndicator::Id: { - bool value; + case EnergyEvse::Attributes::ChargingEnabledUntil::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("InPlaceIndicator", 1, value); + return DataModelLogger::LogValue("ChargingEnabledUntil", 1, value); } - case HepaFilterMonitoring::Attributes::LastChangedTime::Id: { + case EnergyEvse::Attributes::DischargingEnabledUntil::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastChangedTime", 1, value); + return DataModelLogger::LogValue("DischargingEnabledUntil", 1, value); } - case HepaFilterMonitoring::Attributes::ReplacementProductList::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; + case EnergyEvse::Attributes::CircuitCapacity::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ReplacementProductList", 1, value); + return DataModelLogger::LogValue("CircuitCapacity", 1, value); } - case HepaFilterMonitoring::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case EnergyEvse::Attributes::MinimumChargeCurrent::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + return DataModelLogger::LogValue("MinimumChargeCurrent", 1, value); } - case HepaFilterMonitoring::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; + case EnergyEvse::Attributes::MaximumChargeCurrent::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + return DataModelLogger::LogValue("MaximumChargeCurrent", 1, value); } - case HepaFilterMonitoring::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; + case EnergyEvse::Attributes::MaximumDischargeCurrent::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); + return DataModelLogger::LogValue("MaximumDischargeCurrent", 1, value); } - case HepaFilterMonitoring::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; + case EnergyEvse::Attributes::UserMaximumChargeCurrent::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); + return DataModelLogger::LogValue("UserMaximumChargeCurrent", 1, value); } - case HepaFilterMonitoring::Attributes::FeatureMap::Id: { + case EnergyEvse::Attributes::RandomizationDelayWindow::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); + return DataModelLogger::LogValue("RandomizationDelayWindow", 1, value); } - case HepaFilterMonitoring::Attributes::ClusterRevision::Id: { - uint16_t value; + case EnergyEvse::Attributes::NumberOfWeeklyTargets::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); + return DataModelLogger::LogValue("NumberOfWeeklyTargets", 1, value); } + case EnergyEvse::Attributes::NumberOfDailyTargets::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfDailyTargets", 1, value); } - break; - } - case ActivatedCarbonFilterMonitoring::Id: { - switch (path.mAttributeId) - { - case ActivatedCarbonFilterMonitoring::Attributes::Condition::Id: { - chip::Percent value; + case EnergyEvse::Attributes::NextChargeStartTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("Condition", 1, value); + return DataModelLogger::LogValue("NextChargeStartTime", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id: { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value; + case EnergyEvse::Attributes::NextChargeTargetTime::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DegradationDirection", 1, value); + return DataModelLogger::LogValue("NextChargeTargetTime", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id: { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value; + case EnergyEvse::Attributes::NextChargeRequiredEnergy::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ChangeIndication", 1, value); + return DataModelLogger::LogValue("NextChargeRequiredEnergy", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id: { - bool value; + case EnergyEvse::Attributes::NextChargeTargetSoC::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("InPlaceIndicator", 1, value); + return DataModelLogger::LogValue("NextChargeTargetSoC", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id: { + case EnergyEvse::Attributes::ApproximateEVEfficiency::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ApproximateEVEfficiency", 1, value); + } + case EnergyEvse::Attributes::StateOfCharge::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StateOfCharge", 1, value); + } + case EnergyEvse::Attributes::BatteryCapacity::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BatteryCapacity", 1, value); + } + case EnergyEvse::Attributes::VehicleID::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("VehicleID", 1, value); + } + case EnergyEvse::Attributes::SessionID::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastChangedTime", 1, value); + return DataModelLogger::LogValue("SessionID", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; + case EnergyEvse::Attributes::SessionDuration::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SessionDuration", 1, value); + } + case EnergyEvse::Attributes::SessionEnergyCharged::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SessionEnergyCharged", 1, value); + } + case EnergyEvse::Attributes::SessionEnergyDischarged::Id: { + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ReplacementProductList", 1, value); + return DataModelLogger::LogValue("SessionEnergyDischarged", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id: { + case EnergyEvse::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id: { + case EnergyEvse::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::EventList::Id: { + case EnergyEvse::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id: { + case EnergyEvse::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id: { + case EnergyEvse::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id: { + case EnergyEvse::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -9990,27 +12817,27 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("MinSetpointDeadBand", 1, value); } case Thermostat::Attributes::RemoteSensing::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RemoteSensing", 1, value); } case Thermostat::Attributes::ControlSequenceOfOperation::Id: { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlSequenceOfOperation", 1, value); } case Thermostat::Attributes::SystemMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SystemModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SystemMode", 1, value); } case Thermostat::Attributes::ThermostatRunningMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningMode", 1, value); } case Thermostat::Attributes::StartOfWeek::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::StartOfWeekEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartOfWeek", 1, value); } @@ -10025,7 +12852,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("NumberOfDailyTransitions", 1, value); } case Thermostat::Attributes::TemperatureSetpointHold::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TemperatureSetpointHold", 1, value); } @@ -10035,17 +12862,17 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("TemperatureSetpointHoldDuration", 1, value); } case Thermostat::Attributes::ThermostatProgrammingOperationMode::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatProgrammingOperationMode", 1, value); } case Thermostat::Attributes::ThermostatRunningState::Id: { - uint16_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningState", 1, value); } case Thermostat::Attributes::SetpointChangeSource::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SetpointChangeSource", 1, value); } @@ -10095,7 +12922,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("EmergencyHeatDelta", 1, value); } case Thermostat::Attributes::ACType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACType", 1, value); } @@ -10105,22 +12932,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCapacity", 1, value); } case Thermostat::Attributes::ACRefrigerantType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACRefrigerantType", 1, value); } case Thermostat::Attributes::ACCompressorType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCompressorTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCompressorType", 1, value); } case Thermostat::Attributes::ACErrorCode::Id: { - uint32_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACErrorCode", 1, value); } case Thermostat::Attributes::ACLouverPosition::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACLouverPositionEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACLouverPosition", 1, value); } @@ -10130,7 +12957,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCoilTemperature", 1, value); } case Thermostat::Attributes::ACCapacityformat::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCapacityFormatEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCapacityformat", 1, value); } @@ -10267,17 +13094,17 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id: { - uint8_t value; + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TemperatureDisplayMode", 1, value); } case ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id: { - uint8_t value; + chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("KeypadLockout", 1, value); } case ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id: { - uint8_t value; + chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ScheduleProgrammingVisibility", 1, value); } @@ -12215,6 +15042,30 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SeekRangeStart", 1, value); } + case MediaPlayback::Attributes::ActiveAudioTrack::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveAudioTrack", 1, value); + } + case MediaPlayback::Attributes::AvailableAudioTracks::Id: { + chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AvailableAudioTracks", 1, value); + } + case MediaPlayback::Attributes::ActiveTextTrack::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveTextTrack", 1, value); + } + case MediaPlayback::Attributes::AvailableTextTracks::Id: { + chip::app::DataModel::Nullable< + chip::app::DataModel::DecodableList> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AvailableTextTracks", 1, value); + } case MediaPlayback::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -12617,6 +15468,120 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case ContentControl::Id: { + switch (path.mAttributeId) + { + case ContentControl::Attributes::Enabled::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Enabled", 1, value); + } + case ContentControl::Attributes::OnDemandRatings::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnDemandRatings", 1, value); + } + case ContentControl::Attributes::OnDemandRatingThreshold::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnDemandRatingThreshold", 1, value); + } + case ContentControl::Attributes::ScheduledContentRatings::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ScheduledContentRatings", 1, value); + } + case ContentControl::Attributes::ScheduledContentRatingThreshold::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ScheduledContentRatingThreshold", 1, value); + } + case ContentControl::Attributes::ScreenDailyTime::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ScreenDailyTime", 1, value); + } + case ContentControl::Attributes::RemainingScreenTime::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemainingScreenTime", 1, value); + } + case ContentControl::Attributes::BlockUnrated::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BlockUnrated", 1, value); + } + case ContentControl::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ContentControl::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ContentControl::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ContentControl::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ContentControl::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ContentControl::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ContentAppObserver::Id: { + switch (path.mAttributeId) + { + case ContentAppObserver::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ContentAppObserver::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ContentAppObserver::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ContentAppObserver::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ContentAppObserver::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ContentAppObserver::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case ElectricalMeasurement::Id: { switch (path.mAttributeId) { @@ -14056,20 +17021,36 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RegisterClientResponse", 1, value); } + case IcdManagement::Commands::StayActiveResponse::Id: { + IcdManagement::Commands::StayActiveResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StayActiveResponse", 1, value); + } } break; } - case OvenOperationalState::Id: { + case OvenCavityOperationalState::Id: { switch (path.mCommandId) { - case OvenOperationalState::Commands::OperationalCommandResponse::Id: { - OvenOperationalState::Commands::OperationalCommandResponse::DecodableType value; + case OvenCavityOperationalState::Commands::OperationalCommandResponse::Id: { + OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationalCommandResponse", 1, value); } } break; } + case OvenMode::Id: { + switch (path.mCommandId) + { + case OvenMode::Commands::ChangeToModeResponse::Id: { + OvenMode::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } + } + break; + } case LaundryWasherMode::Id: { switch (path.mCommandId) { @@ -14147,6 +17128,17 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case EnergyEvse::Id: { + switch (path.mCommandId) + { + case EnergyEvse::Commands::GetTargetsResponse::Id: { + EnergyEvse::Commands::GetTargetsResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GetTargetsResponse", 1, value); + } + } + break; + } case DoorLock::Id: { switch (path.mCommandId) { @@ -14202,6 +17194,11 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ChangeChannelResponse", 1, value); } + case Channel::Commands::ProgramGuideResponse::Id: { + Channel::Commands::ProgramGuideResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ProgramGuideResponse", 1, value); + } } break; } @@ -14271,6 +17268,28 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case ContentControl::Id: { + switch (path.mCommandId) + { + case ContentControl::Commands::ResetPINResponse::Id: { + ContentControl::Commands::ResetPINResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ResetPINResponse", 1, value); + } + } + break; + } + case ContentAppObserver::Id: { + switch (path.mCommandId) + { + case ContentAppObserver::Commands::ContentAppMessageResponse::Id: { + ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ContentAppMessageResponse", 1, value); + } + } + break; + } case ElectricalMeasurement::Id: { switch (path.mCommandId) { @@ -14682,16 +17701,16 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } - case OvenOperationalState::Id: { + case OvenCavityOperationalState::Id: { switch (header.mPath.mEventId) { - case OvenOperationalState::Events::OperationalError::Id: { - chip::app::Clusters::OvenOperationalState::Events::OperationalError::DecodableType value; + case OvenCavityOperationalState::Events::OperationalError::Id: { + chip::app::Clusters::OvenCavityOperationalState::Events::OperationalError::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationalError", 1, value); } - case OvenOperationalState::Events::OperationCompletion::Id: { - chip::app::Clusters::OvenOperationalState::Events::OperationCompletion::DecodableType value; + case OvenCavityOperationalState::Events::OperationCompletion::Id: { + chip::app::Clusters::OvenCavityOperationalState::Events::OperationCompletion::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationCompletion", 1, value); } @@ -14813,6 +17832,127 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case BooleanStateConfiguration::Id: { + switch (header.mPath.mEventId) + { + case BooleanStateConfiguration::Events::AlarmsStateChanged::Id: { + chip::app::Clusters::BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsStateChanged", 1, value); + } + case BooleanStateConfiguration::Events::SensorFault::Id: { + chip::app::Clusters::BooleanStateConfiguration::Events::SensorFault::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SensorFault", 1, value); + } + } + break; + } + case ValveConfigurationAndControl::Id: { + switch (header.mPath.mEventId) + { + case ValveConfigurationAndControl::Events::ValveStateChanged::Id: { + chip::app::Clusters::ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveStateChanged", 1, value); + } + case ValveConfigurationAndControl::Events::ValveFault::Id: { + chip::app::Clusters::ValveConfigurationAndControl::Events::ValveFault::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveFault", 1, value); + } + } + break; + } + case ElectricalEnergyMeasurement::Id: { + switch (header.mPath.mEventId) + { + case ElectricalEnergyMeasurement::Events::CumulativeEnergyMeasured::Id: { + chip::app::Clusters::ElectricalEnergyMeasurement::Events::CumulativeEnergyMeasured::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CumulativeEnergyMeasured", 1, value); + } + case ElectricalEnergyMeasurement::Events::PeriodicEnergyMeasured::Id: { + chip::app::Clusters::ElectricalEnergyMeasurement::Events::PeriodicEnergyMeasured::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PeriodicEnergyMeasured", 1, value); + } + } + break; + } + case DemandResponseLoadControl::Id: { + switch (header.mPath.mEventId) + { + case DemandResponseLoadControl::Events::LoadControlEventStatusChange::Id: { + chip::app::Clusters::DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LoadControlEventStatusChange", 1, value); + } + } + break; + } + case DeviceEnergyManagement::Id: { + switch (header.mPath.mEventId) + { + case DeviceEnergyManagement::Events::PowerAdjustStart::Id: { + chip::app::Clusters::DeviceEnergyManagement::Events::PowerAdjustStart::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PowerAdjustStart", 1, value); + } + case DeviceEnergyManagement::Events::PowerAdjustEnd::Id: { + chip::app::Clusters::DeviceEnergyManagement::Events::PowerAdjustEnd::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PowerAdjustEnd", 1, value); + } + case DeviceEnergyManagement::Events::Paused::Id: { + chip::app::Clusters::DeviceEnergyManagement::Events::Paused::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Paused", 1, value); + } + case DeviceEnergyManagement::Events::Resumed::Id: { + chip::app::Clusters::DeviceEnergyManagement::Events::Resumed::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Resumed", 1, value); + } + } + break; + } + case EnergyEvse::Id: { + switch (header.mPath.mEventId) + { + case EnergyEvse::Events::EVConnected::Id: { + chip::app::Clusters::EnergyEvse::Events::EVConnected::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EVConnected", 1, value); + } + case EnergyEvse::Events::EVNotDetected::Id: { + chip::app::Clusters::EnergyEvse::Events::EVNotDetected::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EVNotDetected", 1, value); + } + case EnergyEvse::Events::EnergyTransferStarted::Id: { + chip::app::Clusters::EnergyEvse::Events::EnergyTransferStarted::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EnergyTransferStarted", 1, value); + } + case EnergyEvse::Events::EnergyTransferStopped::Id: { + chip::app::Clusters::EnergyEvse::Events::EnergyTransferStopped::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EnergyTransferStopped", 1, value); + } + case EnergyEvse::Events::Fault::Id: { + chip::app::Clusters::EnergyEvse::Events::Fault::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Fault", 1, value); + } + case EnergyEvse::Events::Rfid::Id: { + chip::app::Clusters::EnergyEvse::Events::Rfid::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RFID", 1, value); + } + } + break; + } case DoorLock::Id: { switch (header.mPath.mEventId) { @@ -14935,6 +18075,50 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case TargetNavigator::Id: { + switch (header.mPath.mEventId) + { + case TargetNavigator::Events::TargetUpdated::Id: { + chip::app::Clusters::TargetNavigator::Events::TargetUpdated::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TargetUpdated", 1, value); + } + } + break; + } + case MediaPlayback::Id: { + switch (header.mPath.mEventId) + { + case MediaPlayback::Events::StateChanged::Id: { + chip::app::Clusters::MediaPlayback::Events::StateChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StateChanged", 1, value); + } + } + break; + } + case AccountLogin::Id: { + switch (header.mPath.mEventId) + { + case AccountLogin::Events::LoggedOut::Id: { + chip::app::Clusters::AccountLogin::Events::LoggedOut::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LoggedOut", 1, value); + } + } + break; + } + case ContentControl::Id: { + switch (header.mPath.mEventId) + { + case ContentControl::Events::RemainingScreenTimeExpired::Id: { + chip::app::Clusters::ContentControl::Events::RemainingScreenTimeExpired::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemainingScreenTimeExpired", 1, value); + } + } + break; + } case UnitTesting::Id: { switch (header.mPath.mEventId) { @@ -14951,6 +18135,17 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case SampleMei::Id: { + switch (header.mPath.mEventId) + { + case SampleMei::Events::PingCountEvent::Id: { + chip::app::Clusters::SampleMei::Events::PingCountEvent::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PingCountEvent", 1, value); + } + } + break; + } default: break; } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 3ec55f85d345aa..d768721f46c0fc 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -44,6 +44,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value); @@ -170,21 +173,113 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyRangeStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::MeasurementAccuracyStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Structs::EnergyMeasurementStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::PowerSavingsControlStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::DutyCycleControlStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::AverageLoadControlStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::TemperatureControlStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventTransitionStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlEventStruct::DecodableType & value); + +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::CostStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::ForecastStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::ConstraintsStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotAdjustmentStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value); + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ProgramCategoryStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::SeriesInfoStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ChannelInfoStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ProgramStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::PageTokenStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::ChannelPagingStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Structs::TrackAttributesStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Structs::TrackStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value); @@ -194,6 +289,12 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::DimensionStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::TrackPreferenceStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentLauncher::Structs::PlaybackPreferencesStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::DecodableType & value); @@ -215,6 +316,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::RatingNameStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value); @@ -320,9 +424,10 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::BooleanState::Events::StateChange::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::OvenOperationalState::Events::OperationalError::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::OvenOperationalState::Events::OperationCompletion::DecodableType & value); + const chip::app::Clusters::OvenCavityOperationalState::Events::OperationalError::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::OvenCavityOperationalState::Events::OperationCompletion::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RefrigeratorAlarm::Events::Notify::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -357,6 +462,44 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Events::OperationalError::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Events::OperationCompletion::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::BooleanStateConfiguration::Events::SensorFault::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ValveConfigurationAndControl::Events::ValveFault::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Events::CumulativeEnergyMeasured::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ElectricalEnergyMeasurement::Events::PeriodicEnergyMeasured::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Events::PowerAdjustStart::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Events::PowerAdjustEnd::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Events::Paused::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Events::Resumed::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::EVConnected::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::EVNotDetected::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::EnergyTransferStarted::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::EnergyTransferStopped::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::Fault::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Events::Rfid::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Events::DoorLockAlarm::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -410,10 +553,20 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PumpConfigurationAndControl::Events::AirDetection::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::TargetNavigator::Events::TargetUpdated::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Events::StateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::AccountLogin::Events::LoggedOut::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Events::RemainingScreenTimeExpired::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Events::TestFabricScopedEvent::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::SampleMei::Events::PingCountEvent::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & value); @@ -486,9 +639,13 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::DecodableType & value); + const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value); static CHIP_ERROR @@ -507,6 +664,8 @@ LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -523,6 +682,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Commands::ProgramGuideResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -535,6 +696,11 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Commands::ResetPINResponse::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & value); 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 729a51cba04286..c5aec0730e7d59 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -78,7 +78,10 @@ | ProxyValid | 0x0044 | | BooleanState | 0x0045 | | IcdManagement | 0x0046 | -| OvenOperationalState | 0x0048 | +| Timer | 0x0047 | +| OvenCavityOperationalState | 0x0048 | +| OvenMode | 0x0049 | +| LaundryDryerControls | 0x004A | | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | @@ -97,6 +100,12 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | +| BooleanStateConfiguration | 0x0080 | +| ValveConfigurationAndControl | 0x0081 | +| ElectricalEnergyMeasurement | 0x0091 | +| DemandResponseLoadControl | 0x0096 | +| DeviceEnergyManagement | 0x0098 | +| EnergyEvse | 0x0099 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | | BarrierControl | 0x0103 | @@ -134,6 +143,8 @@ | ApplicationLauncher | 0x050C | | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | +| ContentControl | 0x050F | +| ContentAppObserver | 0x0510 | | ElectricalMeasurement | 0x0B04 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| @@ -1898,7 +1909,7 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { | * NameSupport | 0x0004 | | * LastConfiguredBy | 0x0005 | | * SceneTableSize | 0x0006 | -| * RemainingCapacity | 0x0007 | +| * FabricSceneInfo | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3101,34 +3112,38 @@ class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute RemainingCapacity + * Attribute FabricSceneInfo */ -class ReadScenesRemainingCapacity : public ReadAttribute { +class ReadScenesFabricSceneInfo : public ReadAttribute { public: - ReadScenesRemainingCapacity() - : ReadAttribute("remaining-capacity") + ReadScenesFabricSceneInfo() + : ReadAttribute("fabric-scene-info") { } - ~ReadScenesRemainingCapacity() + ~ReadScenesFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::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); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes RemainingCapacity read Error", error); + LogNSError("Scenes FabricSceneInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3137,21 +3152,21 @@ class ReadScenesRemainingCapacity : public ReadAttribute { } }; -class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { +class SubscribeAttributeScenesFabricSceneInfo : public SubscribeAttribute { public: - SubscribeAttributeScenesRemainingCapacity() - : SubscribeAttribute("remaining-capacity") + SubscribeAttributeScenesFabricSceneInfo() + : SubscribeAttribute("fabric-scene-info") { } - ~SubscribeAttributeScenesRemainingCapacity() + ~SubscribeAttributeScenesFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::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); @@ -3166,10 +3181,10 @@ class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingCapacityWithParams:params + [cluster subscribeAttributeFabricSceneInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14382,6 +14397,8 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | | * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -16241,6 +16258,177 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SpecificationVersion + */ +class ReadBasicInformationSpecificationVersion : public ReadAttribute { +public: + ReadBasicInformationSpecificationVersion() + : ReadAttribute("specification-version") + { + } + + ~ReadBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SpecificationVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSpecificationVersion() + : SubscribeAttribute("specification-version") + { + } + + ~SubscribeAttributeBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSpecificationVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion 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 MaxPathsPerInvoke + */ +class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { +public: + ReadBasicInformationMaxPathsPerInvoke() + : ReadAttribute("max-paths-per-invoke") + { + } + + ~ReadBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationMaxPathsPerInvoke() + : SubscribeAttribute("max-paths-per-invoke") + { + } + + ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeMaxPathsPerInvokeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke 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 + /* * Attribute GeneratedCommandList */ @@ -23801,8 +23989,6 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } }; -#if MTR_ENABLE_PROVISIONAL - /* * Attribute EndpointList */ @@ -23885,8 +24071,6 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -49217,12 +49401,18 @@ class IcdManagementStayActiveRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stayActiveRequestWithParams:params completion: - ^(NSError * _Nullable error) { + ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -50434,21 +50624,18 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OvenOperationalState | 0x0048 | +| Cluster Timer | 0x0047 | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -50457,106 +50644,99 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command Pause + * Command SetTimer */ -class OvenOperationalStatePause : public ClusterCommand { +class TimerSetTimer : public ClusterCommand { public: - OvenOperationalStatePause() - : ClusterCommand("pause") + TimerSetTimer() + : ClusterCommand("set-timer") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenOperationalStateClusterPauseParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterSetTimerParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newTime = [NSNumber numberWithUnsignedInt:mRequest.newTime]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setTimerWithParams: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::Timer::Commands::SetTimer::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command Stop + * Command ResetTimer */ -class OvenOperationalStateStop : public ClusterCommand { +class TimerResetTimer : public ClusterCommand { public: - OvenOperationalStateStop() - : ClusterCommand("stop") + TimerResetTimer() + : ClusterCommand("reset-timer") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenOperationalStateClusterStopParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterResetTimerParams 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 stopWithParams:params completion: - ^(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetTimerWithParams: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; } @@ -50567,105 +50747,107 @@ class OvenOperationalStateStop : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command Start + * Command AddTime */ -class OvenOperationalStateStart : public ClusterCommand { +class TimerAddTime : public ClusterCommand { public: - OvenOperationalStateStart() - : ClusterCommand("start") + TimerAddTime() + : ClusterCommand("add-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenOperationalStateClusterStartParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterAddTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.additionalTime = [NSNumber numberWithUnsignedInt:mRequest.additionalTime]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addTimeWithParams: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::Timer::Commands::AddTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command Resume + * Command ReduceTime */ -class OvenOperationalStateResume : public ClusterCommand { +class TimerReduceTime : public ClusterCommand { public: - OvenOperationalStateResume() - : ClusterCommand("resume") + TimerReduceTime() + : ClusterCommand("reduce-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenOperationalStateClusterResumeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterReduceTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.timeReduction = [NSNumber numberWithUnsignedInt:mRequest.timeReduction]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROvenOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster reduceTimeWithParams: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::Timer::Commands::ReduceTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -50673,34 +50855,34 @@ class OvenOperationalStateResume : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute PhaseList + * Attribute SetTime */ -class ReadOvenOperationalStatePhaseList : public ReadAttribute { +class ReadTimerSetTime : public ReadAttribute { public: - ReadOvenOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadTimerSetTime() + : ReadAttribute("set-time") { } - ~ReadOvenOperationalStatePhaseList() + ~ReadTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState PhaseList read Error", error); + LogNSError("Timer SetTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50709,25 +50891,25 @@ class ReadOvenOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeTimerSetTime : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeTimerSetTime() + : SubscribeAttribute("set-time") { } - ~SubscribeAttributeOvenOperationalStatePhaseList() + ~SubscribeAttributeTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50738,10 +50920,10 @@ class SubscribeAttributeOvenOperationalStatePhaseList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeSetTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.PhaseList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50758,34 +50940,34 @@ class SubscribeAttributeOvenOperationalStatePhaseList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPhase + * Attribute TimeRemaining */ -class ReadOvenOperationalStateCurrentPhase : public ReadAttribute { +class ReadTimerTimeRemaining : public ReadAttribute { public: - ReadOvenOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadTimerTimeRemaining() + : ReadAttribute("time-remaining") { } - ~ReadOvenOperationalStateCurrentPhase() + ~ReadTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState CurrentPhase read Error", error); + LogNSError("Timer TimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50794,25 +50976,25 @@ class ReadOvenOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeTimerTimeRemaining() + : SubscribeAttribute("time-remaining") { } - ~SubscribeAttributeOvenOperationalStateCurrentPhase() + ~SubscribeAttributeTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50823,10 +51005,10 @@ class SubscribeAttributeOvenOperationalStateCurrentPhase : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50843,34 +51025,34 @@ class SubscribeAttributeOvenOperationalStateCurrentPhase : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute CountdownTime + * Attribute TimerState */ -class ReadOvenOperationalStateCountdownTime : public ReadAttribute { +class ReadTimerTimerState : public ReadAttribute { public: - ReadOvenOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadTimerTimerState() + : ReadAttribute("timer-state") { } - ~ReadOvenOperationalStateCountdownTime() + ~ReadTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimerStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState CountdownTime read Error", error); + LogNSError("Timer TimerState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50879,25 +51061,25 @@ class ReadOvenOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeTimerTimerState : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeTimerTimerState() + : SubscribeAttribute("timer-state") { } - ~SubscribeAttributeOvenOperationalStateCountdownTime() + ~SubscribeAttributeTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50908,10 +51090,10 @@ class SubscribeAttributeOvenOperationalStateCountdownTime : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeTimerStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.CountdownTime response %@", [value description]); + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50928,34 +51110,34 @@ class SubscribeAttributeOvenOperationalStateCountdownTime : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalStateList + * Attribute GeneratedCommandList */ -class ReadOvenOperationalStateOperationalStateList : public ReadAttribute { +class ReadTimerGeneratedCommandList : public ReadAttribute { public: - ReadOvenOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadTimerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOvenOperationalStateOperationalStateList() + ~ReadTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState OperationalStateList read Error", error); + LogNSError("Timer GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50964,25 +51146,25 @@ class ReadOvenOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeTimerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenOperationalStateOperationalStateList() + ~SubscribeAttributeTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50993,10 +51175,10 @@ class SubscribeAttributeOvenOperationalStateOperationalStateList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalStateList response %@", [value description]); + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51013,34 +51195,34 @@ class SubscribeAttributeOvenOperationalStateOperationalStateList : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalState + * Attribute AcceptedCommandList */ -class ReadOvenOperationalStateOperationalState : public ReadAttribute { +class ReadTimerAcceptedCommandList : public ReadAttribute { public: - ReadOvenOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadTimerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOvenOperationalStateOperationalState() + ~ReadTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState OperationalState read Error", error); + LogNSError("Timer AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51049,25 +51231,25 @@ class ReadOvenOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeTimerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenOperationalStateOperationalState() + ~SubscribeAttributeTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51078,10 +51260,10 @@ class SubscribeAttributeOvenOperationalStateOperationalState : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51098,34 +51280,34 @@ class SubscribeAttributeOvenOperationalStateOperationalState : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalError + * Attribute EventList */ -class ReadOvenOperationalStateOperationalError : public ReadAttribute { +class ReadTimerEventList : public ReadAttribute { public: - ReadOvenOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadTimerEventList() + : ReadAttribute("event-list") { } - ~ReadOvenOperationalStateOperationalError() + ~ReadTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState OperationalError read Error", error); + LogNSError("Timer EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51134,25 +51316,25 @@ class ReadOvenOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeTimerEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeTimerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenOperationalStateOperationalError() + ~SubscribeAttributeTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51163,10 +51345,10 @@ class SubscribeAttributeOvenOperationalStateOperationalError : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROvenOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51183,34 +51365,34 @@ class SubscribeAttributeOvenOperationalStateOperationalError : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadOvenOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadTimerAttributeList : public ReadAttribute { public: - ReadOvenOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOvenOperationalStateGeneratedCommandList() + ~ReadTimerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState GeneratedCommandList read Error", error); + LogNSError("Timer AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51219,25 +51401,25 @@ class ReadOvenOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenOperationalStateGeneratedCommandList() + ~SubscribeAttributeTimerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51248,10 +51430,10 @@ class SubscribeAttributeOvenOperationalStateGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"Timer.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51268,34 +51450,34 @@ class SubscribeAttributeOvenOperationalStateGeneratedCommandList : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadOvenOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadTimerFeatureMap : public ReadAttribute { public: - ReadOvenOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTimerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOvenOperationalStateAcceptedCommandList() + ~ReadTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState AcceptedCommandList read Error", error); + LogNSError("Timer FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51304,25 +51486,25 @@ class ReadOvenOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTimerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenOperationalStateAcceptedCommandList() + ~SubscribeAttributeTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51333,10 +51515,10 @@ class SubscribeAttributeOvenOperationalStateAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51353,34 +51535,34 @@ class SubscribeAttributeOvenOperationalStateAcceptedCommandList : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadOvenOperationalStateEventList : public ReadAttribute { +class ReadTimerClusterRevision : public ReadAttribute { public: - ReadOvenOperationalStateEventList() - : ReadAttribute("event-list") + ReadTimerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOvenOperationalStateEventList() + ~ReadTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState EventList read Error", error); + LogNSError("Timer ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51389,25 +51571,25 @@ class ReadOvenOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTimerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenOperationalStateEventList() + ~SubscribeAttributeTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51418,10 +51600,10 @@ class SubscribeAttributeOvenOperationalStateEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51434,123 +51616,277 @@ class SubscribeAttributeOvenOperationalStateEventList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OvenCavityOperationalState | 0x0048 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Command Pause */ -class ReadOvenOperationalStateAttributeList : public ReadAttribute { +class OvenCavityOperationalStatePause : public ClusterCommand { public: - ReadOvenOperationalStateAttributeList() - : ReadAttribute("attribute-list") + OvenCavityOperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } - ~ReadOvenOperationalStateAttributeList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::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); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams 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 pauseWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class OvenCavityOperationalStateStop : public ClusterCommand { +public: + OvenCavityOperationalStateStop() + : ClusterCommand("stop") + { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OvenOperationalState AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStopParams 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 stopWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOvenOperationalStateAttributeList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Start + */ +class OvenCavityOperationalStateStart : public ClusterCommand { public: - SubscribeAttributeOvenOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") + OvenCavityOperationalStateStart() + : ClusterCommand("start") { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::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); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStartParams 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 startWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~SubscribeAttributeOvenOperationalStateAttributeList() +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class OvenCavityOperationalStateResume : public ClusterCommand { +public: + OvenCavityOperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState 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(); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams 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 resumeWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.AttributeList 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; } + +private: }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute PhaseList */ -class ReadOvenOperationalStateFeatureMap : public ReadAttribute { +class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { public: - ReadOvenOperationalStateFeatureMap() - : ReadAttribute("feature-map") + ReadOvenCavityOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadOvenOperationalStateFeatureMap() + ~ReadOvenCavityOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState FeatureMap read Error", error); + LogNSError("OvenCavityOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51559,25 +51895,25 @@ class ReadOvenOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenCavityOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeOvenOperationalStateFeatureMap() + ~SubscribeAttributeOvenCavityOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51588,10 +51924,10 @@ class SubscribeAttributeOvenOperationalStateFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51608,34 +51944,34 @@ class SubscribeAttributeOvenOperationalStateFeatureMap : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute CurrentPhase */ -class ReadOvenOperationalStateClusterRevision : public ReadAttribute { +class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { public: - ReadOvenOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenCavityOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadOvenOperationalStateClusterRevision() + ~ReadOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenOperationalState ClusterRevision read Error", error); + LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51644,25 +51980,25 @@ class ReadOvenOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeOvenOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeOvenOperationalStateClusterRevision() + ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::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); - __auto_type * cluster = [[MTRBaseClusterOvenOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51673,10 +52009,10 @@ class SubscribeAttributeOvenOperationalStateClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51690,188 +52026,37 @@ class SubscribeAttributeOvenOperationalStateClusterRevision : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class ModeSelectChangeToMode : public ClusterCommand { -public: - ModeSelectChangeToMode() - : ClusterCommand("change-to-mode") - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams: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::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; - -/* - * Attribute Description - */ -class ReadModeSelectDescription : public ReadAttribute { -public: - ReadModeSelectDescription() - : ReadAttribute("description") - { - } - - ~ReadModeSelectDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ModeSelect Description read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { -public: - SubscribeAttributeModeSelectDescription() - : SubscribeAttribute("description") - { - } - - ~SubscribeAttributeModeSelectDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect 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 subscribeAttributeDescriptionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description 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; - } -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute StandardNamespace + * Attribute CountdownTime */ -class ReadModeSelectStandardNamespace : public ReadAttribute { +class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { public: - ReadModeSelectStandardNamespace() - : ReadAttribute("standard-namespace") + ReadOvenCavityOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadModeSelectStandardNamespace() + ~ReadOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect StandardNamespace read Error", error); + LogNSError("OvenCavityOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51880,25 +52065,25 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { } }; -class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStandardNamespace() - : SubscribeAttribute("standard-namespace") + SubscribeAttributeOvenCavityOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeModeSelectStandardNamespace() + ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51909,10 +52094,10 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStandardNamespaceWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51925,35 +52110,38 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedModes + * Attribute OperationalStateList */ -class ReadModeSelectSupportedModes : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { public: - ReadModeSelectSupportedModes() - : ReadAttribute("supported-modes") + ReadOvenCavityOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadModeSelectSupportedModes() + ~ReadOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect SupportedModes read Error", error); + LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51962,25 +52150,25 @@ class ReadModeSelectSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeModeSelectSupportedModes() + ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51991,10 +52179,10 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52007,188 +52195,65 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } }; -/* - * Attribute CurrentMode - */ -class ReadModeSelectCurrentMode : public ReadAttribute { -public: - ReadModeSelectCurrentMode() - : ReadAttribute("current-mode") - { - } - - ~ReadModeSelectCurrentMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ModeSelect CurrentMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { -public: - SubscribeAttributeModeSelectCurrentMode() - : SubscribeAttribute("current-mode") - { - } - - ~SubscribeAttributeModeSelectCurrentMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect 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 subscribeAttributeCurrentModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode 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 StartUpMode + * Attribute OperationalState */ -class ReadModeSelectStartUpMode : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { public: - ReadModeSelectStartUpMode() - : ReadAttribute("start-up-mode") + ReadOvenCavityOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadModeSelectStartUpMode() + ~ReadOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteModeSelectStartUpMode : public WriteAttribute { -public: - WriteModeSelectStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); + LogNSError("OvenCavityOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeOvenCavityOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeModeSelectStartUpMode() + ~SubscribeAttributeOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52199,10 +52264,10 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52215,106 +52280,65 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OnMode + * Attribute OperationalError */ -class ReadModeSelectOnMode : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { public: - ReadModeSelectOnMode() - : ReadAttribute("on-mode") + ReadOvenCavityOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadModeSelectOnMode() + ~ReadOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteModeSelectOnMode : public WriteAttribute { -public: - WriteModeSelectOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); + LogNSError("OvenCavityOperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeModeSelectOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeOvenCavityOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeModeSelectOnMode() + ~SubscribeAttributeOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52325,10 +52349,10 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + reportHandler:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52341,35 +52365,38 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadModeSelectGeneratedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadModeSelectGeneratedCommandList() + ReadOvenCavityOperationalStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadModeSelectGeneratedCommandList() + ~ReadOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect GeneratedCommandList read Error", error); + LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52378,25 +52405,25 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectGeneratedCommandList() + SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeModeSelectGeneratedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52410,7 +52437,7 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52423,35 +52450,38 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadModeSelectAcceptedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadModeSelectAcceptedCommandList() + ReadOvenCavityOperationalStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadModeSelectAcceptedCommandList() + ~ReadOvenCavityOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AcceptedCommandList read Error", error); + LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52460,25 +52490,25 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAcceptedCommandList() + SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeModeSelectAcceptedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52492,7 +52522,7 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52505,37 +52535,38 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadModeSelectEventList : public ReadAttribute { +class ReadOvenCavityOperationalStateEventList : public ReadAttribute { public: - ReadModeSelectEventList() + ReadOvenCavityOperationalStateEventList() : ReadAttribute("event-list") { } - ~ReadModeSelectEventList() + ~ReadOvenCavityOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect EventList read Error", error); + LogNSError("OvenCavityOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52544,25 +52575,25 @@ class ReadModeSelectEventList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectEventList() + SubscribeAttributeOvenCavityOperationalStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeModeSelectEventList() + ~SubscribeAttributeOvenCavityOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52576,7 +52607,7 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52590,36 +52621,37 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadModeSelectAttributeList : public ReadAttribute { +class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { public: - ReadModeSelectAttributeList() + ReadOvenCavityOperationalStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadModeSelectAttributeList() + ~ReadOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AttributeList read Error", error); + LogNSError("OvenCavityOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52628,25 +52660,25 @@ class ReadModeSelectAttributeList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAttributeList() + SubscribeAttributeOvenCavityOperationalStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectAttributeList() + ~SubscribeAttributeOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52660,7 +52692,7 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52673,35 +52705,38 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadModeSelectFeatureMap : public ReadAttribute { +class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { public: - ReadModeSelectFeatureMap() + ReadOvenCavityOperationalStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadModeSelectFeatureMap() + ~ReadOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect FeatureMap read Error", error); + LogNSError("OvenCavityOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52710,25 +52745,25 @@ class ReadModeSelectFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectFeatureMap() + SubscribeAttributeOvenCavityOperationalStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectFeatureMap() + ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52742,7 +52777,7 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52755,35 +52790,38 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadModeSelectClusterRevision : public ReadAttribute { +class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { public: - ReadModeSelectClusterRevision() + ReadOvenCavityOperationalStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadModeSelectClusterRevision() + ~ReadOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect ClusterRevision read Error", error); + LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52792,25 +52830,25 @@ class ReadModeSelectClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectClusterRevision() + SubscribeAttributeOvenCavityOperationalStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectClusterRevision() + ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52824,7 +52862,7 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52837,9 +52875,11 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherMode | 0x0051 | +| Cluster OvenMode | 0x0049 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -52863,9 +52903,9 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { /* * Command ChangeToMode */ -class LaundryWasherModeChangeToMode : public ClusterCommand { +class OvenModeChangeToMode : public ClusterCommand { public: - LaundryWasherModeChangeToMode() + OvenModeChangeToMode() : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL @@ -52876,14 +52916,14 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; @@ -52892,17 +52932,17 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -52914,7 +52954,7 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -52924,32 +52964,32 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { /* * Attribute SupportedModes */ -class ReadLaundryWasherModeSupportedModes : public ReadAttribute { +class ReadOvenModeSupportedModes : public ReadAttribute { public: - ReadLaundryWasherModeSupportedModes() + ReadOvenModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadLaundryWasherModeSupportedModes() + ~ReadOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode SupportedModes read Error", error); + LogNSError("OvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52958,25 +52998,25 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeSupportedModes() + SubscribeAttributeOvenModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryWasherModeSupportedModes() + ~SubscribeAttributeOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52990,7 +53030,7 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53009,32 +53049,32 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib /* * Attribute CurrentMode */ -class ReadLaundryWasherModeCurrentMode : public ReadAttribute { +class ReadOvenModeCurrentMode : public ReadAttribute { public: - ReadLaundryWasherModeCurrentMode() + ReadOvenModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadLaundryWasherModeCurrentMode() + ~ReadOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode CurrentMode read Error", error); + LogNSError("OvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53043,25 +53083,25 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeCurrentMode() + SubscribeAttributeOvenModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeLaundryWasherModeCurrentMode() + ~SubscribeAttributeOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53075,7 +53115,7 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53094,32 +53134,32 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute /* * Attribute StartUpMode */ -class ReadLaundryWasherModeStartUpMode : public ReadAttribute { +class ReadOvenModeStartUpMode : public ReadAttribute { public: - ReadLaundryWasherModeStartUpMode() + ReadOvenModeStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadLaundryWasherModeStartUpMode() + ~ReadOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode StartUpMode read Error", error); + LogNSError("OvenMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53128,9 +53168,9 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { } }; -class WriteLaundryWasherModeStartUpMode : public WriteAttribute { +class WriteOvenModeStartUpMode : public WriteAttribute { public: - WriteLaundryWasherModeStartUpMode() + WriteOvenModeStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -53138,18 +53178,18 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteLaundryWasherModeStartUpMode() + ~WriteOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -53160,7 +53200,7 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode write Error", error); + LogNSError("OvenMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53172,25 +53212,25 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeStartUpMode() + SubscribeAttributeOvenModeStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeLaundryWasherModeStartUpMode() + ~SubscribeAttributeOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53204,7 +53244,7 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53223,32 +53263,32 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute /* * Attribute OnMode */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { +class ReadOvenModeOnMode : public ReadAttribute { public: - ReadLaundryWasherModeOnMode() + ReadOvenModeOnMode() : ReadAttribute("on-mode") { } - ~ReadLaundryWasherModeOnMode() + ~ReadOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode OnMode read Error", error); + LogNSError("OvenMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53257,9 +53297,9 @@ class ReadLaundryWasherModeOnMode : public ReadAttribute { } }; -class WriteLaundryWasherModeOnMode : public WriteAttribute { +class WriteOvenModeOnMode : public WriteAttribute { public: - WriteLaundryWasherModeOnMode() + WriteOvenModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -53267,18 +53307,18 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteLaundryWasherModeOnMode() + ~WriteOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -53289,7 +53329,7 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); + LogNSError("OvenMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53301,25 +53341,25 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeOnMode() + SubscribeAttributeOvenModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeLaundryWasherModeOnMode() + ~SubscribeAttributeOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53333,7 +53373,7 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53352,32 +53392,32 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { +class ReadOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeGeneratedCommandList() + ReadOvenModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherModeGeneratedCommandList() + ~ReadOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + LogNSError("OvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53386,25 +53426,25 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeGeneratedCommandList() + SubscribeAttributeOvenModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() + ~SubscribeAttributeOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53418,7 +53458,7 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53437,32 +53477,32 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { +class ReadOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeAcceptedCommandList() + ReadOvenModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherModeAcceptedCommandList() + ~ReadOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + LogNSError("OvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53471,25 +53511,25 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAcceptedCommandList() + SubscribeAttributeOvenModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() + ~SubscribeAttributeOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53503,7 +53543,7 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53522,32 +53562,32 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA /* * Attribute EventList */ -class ReadLaundryWasherModeEventList : public ReadAttribute { +class ReadOvenModeEventList : public ReadAttribute { public: - ReadLaundryWasherModeEventList() + ReadOvenModeEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherModeEventList() + ~ReadOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"OvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode EventList read Error", error); + LogNSError("OvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53556,25 +53596,25 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeEventList() + SubscribeAttributeOvenModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherModeEventList() + ~SubscribeAttributeOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53588,7 +53628,7 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"OvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53607,32 +53647,32 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadLaundryWasherModeAttributeList : public ReadAttribute { +class ReadOvenModeAttributeList : public ReadAttribute { public: - ReadLaundryWasherModeAttributeList() + ReadOvenModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherModeAttributeList() + ~ReadOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AttributeList read Error", error); + LogNSError("OvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53641,25 +53681,25 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAttributeList() + SubscribeAttributeOvenModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherModeAttributeList() + ~SubscribeAttributeOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53673,7 +53713,7 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53692,32 +53732,32 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu /* * Attribute FeatureMap */ -class ReadLaundryWasherModeFeatureMap : public ReadAttribute { +class ReadOvenModeFeatureMap : public ReadAttribute { public: - ReadLaundryWasherModeFeatureMap() + ReadOvenModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherModeFeatureMap() + ~ReadOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode FeatureMap read Error", error); + LogNSError("OvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53726,25 +53766,25 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeFeatureMap() + SubscribeAttributeOvenModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherModeFeatureMap() + ~SubscribeAttributeOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53758,7 +53798,7 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53777,32 +53817,32 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadLaundryWasherModeClusterRevision : public ReadAttribute { +class ReadOvenModeClusterRevision : public ReadAttribute { public: - ReadLaundryWasherModeClusterRevision() + ReadOvenModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherModeClusterRevision() + ~ReadOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode ClusterRevision read Error", error); + LogNSError("OvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53811,25 +53851,25 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeClusterRevision() + SubscribeAttributeOvenModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherModeClusterRevision() + ~SubscribeAttributeOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53843,7 +53883,7 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53860,16 +53900,13 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster LaundryDryerControls | 0x004A | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * SupportedDrynessLevels | 0x0000 | +| * SelectedDrynessLevel | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -53880,97 +53917,37 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL -/* - * Command ChangeToMode - */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { -public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() - : ClusterCommand("change-to-mode") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute SupportedDrynessLevels */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { +class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() - : ReadAttribute("supported-modes") + ReadLaundryDryerControlsSupportedDrynessLevels() + : ReadAttribute("supported-dryness-levels") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~ReadLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedDrynessLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53979,25 +53956,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + : SubscribeAttribute("supported-dryness-levels") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54008,95 +53985,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeSupportedDrynessLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes 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 CurrentMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() - : ReadAttribute("current-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() - : SubscribeAttribute("current-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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 subscribeAttributeCurrentModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54113,34 +54005,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo #if MTR_ENABLE_PROVISIONAL /* - * Attribute StartUpMode + * Attribute SelectedDrynessLevel */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { +class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadLaundryDryerControlsSelectedDrynessLevel() + : ReadAttribute("selected-dryness-level") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + ~ReadLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedDrynessLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); + LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54149,28 +54041,28 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public Re } }; -class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { +class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { public: - WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteLaundryDryerControlsSelectedDrynessLevel() + : WriteAttribute("selected-dryness-level") { - AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-name", "selected-dryness-level"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + ~WriteLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -54179,9 +54071,9 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); + LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54193,25 +54085,25 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + : SubscribeAttribute("selected-dryness-level") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54222,10 +54114,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeSelectedDrynessLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54242,105 +54134,61 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute GeneratedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { +class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : ReadAttribute("on-mode") + ReadLaundryDryerControlsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~ReadLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54351,10 +54199,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54371,34 +54219,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadLaundryDryerControlsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~ReadLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54407,25 +54255,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54436,10 +54284,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54456,34 +54304,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsEventList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadLaundryDryerControlsEventList() + : ReadAttribute("event-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~ReadLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + LogNSError("LaundryDryerControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54492,25 +54340,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeLaundryDryerControlsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~SubscribeAttributeLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54521,10 +54369,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54541,34 +54389,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute AttributeList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { +class ReadLaundryDryerControlsAttributeList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() - : ReadAttribute("event-list") + ReadLaundryDryerControlsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~ReadLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + LogNSError("LaundryDryerControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54577,25 +54425,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeLaundryDryerControlsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~SubscribeAttributeLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54606,10 +54454,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54626,34 +54474,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute FeatureMap */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { +class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() - : ReadAttribute("attribute-list") + ReadLaundryDryerControlsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~ReadLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + LogNSError("LaundryDryerControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54662,25 +54510,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeLaundryDryerControlsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~SubscribeAttributeLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54691,10 +54539,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54711,34 +54559,34 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute ClusterRevision */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { +class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() - : ReadAttribute("feature-map") + ReadLaundryDryerControlsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~ReadLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); + LogNSError("LaundryDryerControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54747,25 +54595,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeLaundryDryerControlsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~SubscribeAttributeLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54776,10 +54624,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54793,37 +54641,106 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ModeSelect | 0x0050 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute ClusterRevision + * Command ChangeToMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { +class ModeSelectChangeToMode : public ClusterCommand { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() - : ReadAttribute("cluster-revision") + ModeSelectChangeToMode() + : ClusterCommand("change-to-mode") { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::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); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams: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::ModeSelect::Commands::ChangeToMode::Type mRequest; +}; + +/* + * Attribute Description + */ +class ReadModeSelectDescription : public ReadAttribute { +public: + ReadModeSelectDescription() + : ReadAttribute("description") + { + } + + ~ReadModeSelectDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + LogNSError("ModeSelect Description read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54832,25 +54749,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeModeSelectDescription() + : SubscribeAttribute("description") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~SubscribeAttributeModeSelectDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54861,10 +54778,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54877,60 +54794,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherControls | 0x0053 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * SupportedRinses | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpinSpeeds + * Attribute StandardNamespace */ -class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { +class ReadModeSelectStandardNamespace : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeeds() - : ReadAttribute("spin-speeds") + ReadModeSelectStandardNamespace() + : ReadAttribute("standard-namespace") { } - ~ReadLaundryWasherControlsSpinSpeeds() + ~ReadModeSelectStandardNamespace() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SpinSpeeds read Error", error); + LogNSError("ModeSelect StandardNamespace read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54939,25 +54831,25 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { +class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeeds() - : SubscribeAttribute("spin-speeds") + SubscribeAttributeModeSelectStandardNamespace() + : SubscribeAttribute("standard-namespace") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() + ~SubscribeAttributeModeSelectStandardNamespace() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54968,10 +54860,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedsWithParams:params + [cluster subscribeAttributeStandardNamespaceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54984,38 +54876,35 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpinSpeedCurrent + * Attribute SupportedModes */ -class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { +class ReadModeSelectSupportedModes : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeedCurrent() - : ReadAttribute("spin-speed-current") + ReadModeSelectSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadLaundryWasherControlsSpinSpeedCurrent() + ~ReadModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); + LogNSError("ModeSelect SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55024,69 +54913,107 @@ class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { } }; -class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { +class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { public: - WriteLaundryWasherControlsSpinSpeedCurrent() - : WriteAttribute("spin-speed-current") + SubscribeAttributeModeSelectSupportedModes() + : SubscribeAttribute("supported-modes") { - AddArgument("attr-name", "spin-speed-current"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterModeSelect 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 subscribeAttributeSupportedModesWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute CurrentMode + */ +class ReadModeSelectCurrentMode : public ReadAttribute { +public: + ReadModeSelectCurrentMode() + : ReadAttribute("current-mode") + { + } + + ~ReadModeSelectCurrentMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::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); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() - : SubscribeAttribute("spin-speed-current") + SubscribeAttributeModeSelectCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeModeSelectCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55097,10 +55024,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedCurrentWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55113,38 +55040,35 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NumberOfRinses + * Attribute StartUpMode */ -class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { +class ReadModeSelectStartUpMode : public ReadAttribute { public: - ReadLaundryWasherControlsNumberOfRinses() - : ReadAttribute("number-of-rinses") + ReadModeSelectStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadLaundryWasherControlsNumberOfRinses() + ~ReadModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls NumberOfRinses read Error", error); + LogNSError("ModeSelect StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55153,36 +55077,39 @@ class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { } }; -class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { +class WriteModeSelectStartUpMode : public WriteAttribute { public: - WriteLaundryWasherControlsNumberOfRinses() - : WriteAttribute("number-of-rinses") + WriteModeSelectStartUpMode() + : WriteAttribute("start-up-mode") { - AddArgument("attr-name", "number-of-rinses"); + AddArgument("attr-name", "start-up-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteLaundryWasherControlsNumberOfRinses() + ~WriteModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + LogNSError("ModeSelect StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55191,28 +55118,28 @@ class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsNumberOfRinses() - : SubscribeAttribute("number-of-rinses") + SubscribeAttributeModeSelectStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() + ~SubscribeAttributeModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55223,10 +55150,10 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRinsesWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55239,38 +55166,35 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedRinses + * Attribute OnMode */ -class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { +class ReadModeSelectOnMode : public ReadAttribute { public: - ReadLaundryWasherControlsSupportedRinses() - : ReadAttribute("supported-rinses") + ReadModeSelectOnMode() + : ReadAttribute("on-mode") { } - ~ReadLaundryWasherControlsSupportedRinses() + ~ReadModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SupportedRinses read Error", error); + LogNSError("ModeSelect OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55279,25 +55203,69 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { +class WriteModeSelectOnMode : public WriteAttribute { public: - SubscribeAttributeLaundryWasherControlsSupportedRinses() - : SubscribeAttribute("supported-rinses") + WriteModeSelectOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryWasherControlsSupportedRinses() + ~WriteModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeModeSelectOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55308,10 +55276,10 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedRinsesWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55324,38 +55292,35 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { +class ReadModeSelectGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsGeneratedCommandList() + ReadModeSelectGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherControlsGeneratedCommandList() + ~ReadModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + LogNSError("ModeSelect GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55364,25 +55329,25 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + SubscribeAttributeModeSelectGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + ~SubscribeAttributeModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55396,7 +55361,7 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55409,38 +55374,35 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { +class ReadModeSelectAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsAcceptedCommandList() + ReadModeSelectAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherControlsAcceptedCommandList() + ~ReadModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + LogNSError("ModeSelect AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55449,25 +55411,25 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + SubscribeAttributeModeSelectAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + ~SubscribeAttributeModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55481,7 +55443,7 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55494,38 +55456,37 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadLaundryWasherControlsEventList : public ReadAttribute { +class ReadModeSelectEventList : public ReadAttribute { public: - ReadLaundryWasherControlsEventList() + ReadModeSelectEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherControlsEventList() + ~ReadModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls EventList read Error", error); + LogNSError("ModeSelect EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55534,25 +55495,25 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { +class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsEventList() + SubscribeAttributeModeSelectEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherControlsEventList() + ~SubscribeAttributeModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55566,7 +55527,7 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55580,37 +55541,36 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadLaundryWasherControlsAttributeList : public ReadAttribute { +class ReadModeSelectAttributeList : public ReadAttribute { public: - ReadLaundryWasherControlsAttributeList() + ReadModeSelectAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherControlsAttributeList() + ~ReadModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AttributeList read Error", error); + LogNSError("ModeSelect AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55619,25 +55579,25 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAttributeList() + SubscribeAttributeModeSelectAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherControlsAttributeList() + ~SubscribeAttributeModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55651,7 +55611,7 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55664,38 +55624,35 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { +class ReadModeSelectFeatureMap : public ReadAttribute { public: - ReadLaundryWasherControlsFeatureMap() + ReadModeSelectFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherControlsFeatureMap() + ~ReadModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls FeatureMap read Error", error); + LogNSError("ModeSelect FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55704,25 +55661,25 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsFeatureMap() + SubscribeAttributeModeSelectFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherControlsFeatureMap() + ~SubscribeAttributeModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55736,7 +55693,7 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55749,38 +55706,35 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { +class ReadModeSelectClusterRevision : public ReadAttribute { public: - ReadLaundryWasherControlsClusterRevision() + ReadModeSelectClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherControlsClusterRevision() + ~ReadModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls ClusterRevision read Error", error); + LogNSError("ModeSelect ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55789,25 +55743,25 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsClusterRevision() + SubscribeAttributeModeSelectClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherControlsClusterRevision() + ~SubscribeAttributeModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55821,7 +55775,7 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55834,11 +55788,9 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcRunMode | 0x0054 | +| Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -55846,6 +55798,7 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -55861,9 +55814,9 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA /* * Command ChangeToMode */ -class RvcRunModeChangeToMode : public ClusterCommand { +class LaundryWasherModeChangeToMode : public ClusterCommand { public: - RvcRunModeChangeToMode() + LaundryWasherModeChangeToMode() : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL @@ -55874,14 +55827,14 @@ class RvcRunModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; @@ -55890,17 +55843,17 @@ class RvcRunModeChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -55912,7 +55865,7 @@ class RvcRunModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -55922,32 +55875,32 @@ class RvcRunModeChangeToMode : public ClusterCommand { /* * Attribute SupportedModes */ -class ReadRvcRunModeSupportedModes : public ReadAttribute { +class ReadLaundryWasherModeSupportedModes : public ReadAttribute { public: - ReadRvcRunModeSupportedModes() + ReadLaundryWasherModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadRvcRunModeSupportedModes() + ~ReadLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode SupportedModes read Error", error); + LogNSError("LaundryWasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55956,25 +55909,25 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeSupportedModes() + SubscribeAttributeLaundryWasherModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRvcRunModeSupportedModes() + ~SubscribeAttributeLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55988,7 +55941,7 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56007,32 +55960,32 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { /* * Attribute CurrentMode */ -class ReadRvcRunModeCurrentMode : public ReadAttribute { +class ReadLaundryWasherModeCurrentMode : public ReadAttribute { public: - ReadRvcRunModeCurrentMode() + ReadLaundryWasherModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadRvcRunModeCurrentMode() + ~ReadLaundryWasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode CurrentMode read Error", error); + LogNSError("LaundryWasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56041,25 +55994,25 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeCurrentMode() + SubscribeAttributeLaundryWasherModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRvcRunModeCurrentMode() + ~SubscribeAttributeLaundryWasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56073,7 +56026,7 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56090,34 +56043,34 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute StartUpMode */ -class ReadRvcRunModeOnMode : public ReadAttribute { +class ReadLaundryWasherModeStartUpMode : public ReadAttribute { public: - ReadRvcRunModeOnMode() - : ReadAttribute("on-mode") + ReadLaundryWasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadRvcRunModeOnMode() + ~ReadLaundryWasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode OnMode read Error", error); + LogNSError("LaundryWasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56126,28 +56079,28 @@ class ReadRvcRunModeOnMode : public ReadAttribute { } }; -class WriteRvcRunModeOnMode : public WriteAttribute { +class WriteLaundryWasherModeStartUpMode : public WriteAttribute { public: - WriteRvcRunModeOnMode() - : WriteAttribute("on-mode") + WriteLaundryWasherModeStartUpMode() + : WriteAttribute("start-up-mode") { - AddArgument("attr-name", "on-mode"); + AddArgument("attr-name", "start-up-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteRvcRunModeOnMode() + ~WriteLaundryWasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -56156,9 +56109,9 @@ class WriteRvcRunModeOnMode : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("RVCRunMode OnMode write Error", error); + LogNSError("LaundryWasherMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56170,25 +56123,25 @@ class WriteRvcRunModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeLaundryWasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeRvcRunModeOnMode() + ~SubscribeAttributeLaundryWasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56199,10 +56152,10 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56219,34 +56172,34 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute OnMode */ -class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherModeOnMode : public ReadAttribute { public: - ReadRvcRunModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadLaundryWasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadRvcRunModeGeneratedCommandList() + ~ReadLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode GeneratedCommandList read Error", error); + LogNSError("LaundryWasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56255,25 +56208,69 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { +class WriteLaundryWasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeRvcRunModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteLaundryWasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRvcRunModeGeneratedCommandList() + ~WriteLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeLaundryWasherModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56284,10 +56281,10 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56304,34 +56301,34 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { public: - ReadRvcRunModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadLaundryWasherModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRvcRunModeAcceptedCommandList() + ~ReadLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AcceptedCommandList read Error", error); + LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56340,25 +56337,110 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeLaundryWasherModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcRunModeAcceptedCommandList() + ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; - + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { +public: + ReadLaundryWasherModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadLaundryWasherModeAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56372,7 +56454,7 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56391,32 +56473,32 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadRvcRunModeEventList : public ReadAttribute { +class ReadLaundryWasherModeEventList : public ReadAttribute { public: - ReadRvcRunModeEventList() + ReadLaundryWasherModeEventList() : ReadAttribute("event-list") { } - ~ReadRvcRunModeEventList() + ~ReadLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode EventList read Error", error); + LogNSError("LaundryWasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56425,25 +56507,25 @@ class ReadRvcRunModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeEventList() + SubscribeAttributeLaundryWasherModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcRunModeEventList() + ~SubscribeAttributeLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56457,7 +56539,7 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56476,32 +56558,32 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadRvcRunModeAttributeList : public ReadAttribute { +class ReadLaundryWasherModeAttributeList : public ReadAttribute { public: - ReadRvcRunModeAttributeList() + ReadLaundryWasherModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcRunModeAttributeList() + ~ReadLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AttributeList read Error", error); + LogNSError("LaundryWasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56510,25 +56592,25 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAttributeList() + SubscribeAttributeLaundryWasherModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcRunModeAttributeList() + ~SubscribeAttributeLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56542,7 +56624,7 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56561,32 +56643,32 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadRvcRunModeFeatureMap : public ReadAttribute { +class ReadLaundryWasherModeFeatureMap : public ReadAttribute { public: - ReadRvcRunModeFeatureMap() + ReadLaundryWasherModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcRunModeFeatureMap() + ~ReadLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode FeatureMap read Error", error); + LogNSError("LaundryWasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56595,25 +56677,25 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeFeatureMap() + SubscribeAttributeLaundryWasherModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcRunModeFeatureMap() + ~SubscribeAttributeLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56627,7 +56709,7 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56646,32 +56728,32 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadRvcRunModeClusterRevision : public ReadAttribute { +class ReadLaundryWasherModeClusterRevision : public ReadAttribute { public: - ReadRvcRunModeClusterRevision() + ReadLaundryWasherModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcRunModeClusterRevision() + ~ReadLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode ClusterRevision read Error", error); + LogNSError("LaundryWasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56680,25 +56762,25 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeClusterRevision() + SubscribeAttributeLaundryWasherModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcRunModeClusterRevision() + ~SubscribeAttributeLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56712,7 +56794,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56729,7 +56811,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcCleanMode | 0x0055 | +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -56737,6 +56819,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -56752,9 +56835,9 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { /* * Command ChangeToMode */ -class RvcCleanModeChangeToMode : public ClusterCommand { +class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { public: - RvcCleanModeChangeToMode() + RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL @@ -56765,14 +56848,14 @@ class RvcCleanModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; @@ -56781,17 +56864,17 @@ class RvcCleanModeChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -56803,7 +56886,7 @@ class RvcCleanModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -56813,32 +56896,32 @@ class RvcCleanModeChangeToMode : public ClusterCommand { /* * Attribute SupportedModes */ -class ReadRvcCleanModeSupportedModes : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { public: - ReadRvcCleanModeSupportedModes() + ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadRvcCleanModeSupportedModes() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode SupportedModes read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56847,25 +56930,25 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeSupportedModes() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRvcCleanModeSupportedModes() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56879,7 +56962,7 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56898,32 +56981,32 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { /* * Attribute CurrentMode */ -class ReadRvcCleanModeCurrentMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { public: - ReadRvcCleanModeCurrentMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadRvcCleanModeCurrentMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode CurrentMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56932,25 +57015,25 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeCurrentMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRvcCleanModeCurrentMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56964,7 +57047,136 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode 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 StartUpMode + */ +class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { +public: + ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + : ReadAttribute("start-up-mode") + { + } + + ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::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); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { +public: + WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + : WriteAttribute("start-up-mode") + { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::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); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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 subscribeAttributeStartUpModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56983,32 +57195,32 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { /* * Attribute OnMode */ -class ReadRvcCleanModeOnMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { public: - ReadRvcCleanModeOnMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() : ReadAttribute("on-mode") { } - ~ReadRvcCleanModeOnMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode OnMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57017,9 +57229,9 @@ class ReadRvcCleanModeOnMode : public ReadAttribute { } }; -class WriteRvcCleanModeOnMode : public WriteAttribute { +class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { public: - WriteRvcCleanModeOnMode() + WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -57027,18 +57239,18 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteRvcCleanModeOnMode() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -57049,7 +57261,7 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("RVCCleanMode OnMode write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57061,25 +57273,25 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeOnMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeRvcCleanModeOnMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57093,7 +57305,7 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57112,32 +57324,32 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { public: - ReadRvcCleanModeGeneratedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcCleanModeGeneratedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57146,25 +57358,25 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeGeneratedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcCleanModeGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57178,7 +57390,7 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57197,32 +57409,32 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri /* * Attribute AcceptedCommandList */ -class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { public: - ReadRvcCleanModeAcceptedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcCleanModeAcceptedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57231,25 +57443,25 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAcceptedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcCleanModeAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57263,7 +57475,7 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57282,32 +57494,32 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib /* * Attribute EventList */ -class ReadRvcCleanModeEventList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { public: - ReadRvcCleanModeEventList() + ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() : ReadAttribute("event-list") { } - ~ReadRvcCleanModeEventList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode EventList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57316,25 +57528,25 @@ class ReadRvcCleanModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeEventList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcCleanModeEventList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57348,7 +57560,7 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57367,32 +57579,32 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadRvcCleanModeAttributeList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { public: - ReadRvcCleanModeAttributeList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcCleanModeAttributeList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AttributeList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57401,25 +57613,25 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAttributeList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcCleanModeAttributeList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57433,7 +57645,7 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57452,32 +57664,32 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadRvcCleanModeFeatureMap : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { public: - ReadRvcCleanModeFeatureMap() + ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcCleanModeFeatureMap() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode FeatureMap read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57486,25 +57698,25 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeFeatureMap() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcCleanModeFeatureMap() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57518,7 +57730,7 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57537,32 +57749,32 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadRvcCleanModeClusterRevision : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { public: - ReadRvcCleanModeClusterRevision() + ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcCleanModeClusterRevision() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode ClusterRevision read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57571,25 +57783,25 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeClusterRevision() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcCleanModeClusterRevision() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57603,7 +57815,7 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57620,18 +57832,15 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * SelectedTemperatureLevel | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -57642,105 +57851,37 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTemperature - */ -class TemperatureControlSetTemperature : public ClusterCommand { -public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperature.HasValue()) { - params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; - } else { - params.targetTemperature = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperatureLevel.HasValue()) { - params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; - } else { - params.targetTemperatureLevel = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTemperatureWithParams: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::TemperatureControl::Commands::SetTemperature::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute TemperatureSetpoint + * Attribute SpinSpeeds */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") + ReadLaundryWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") { } - ~ReadTemperatureControlTemperatureSetpoint() + ~ReadLaundryWasherControlsSpinSpeeds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + LogNSError("LaundryWasherControls SpinSpeeds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57749,25 +57890,25 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + SubscribeAttributeLaundryWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") { } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() + ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57778,10 +57919,10 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointWithParams:params + [cluster subscribeAttributeSpinSpeedsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57798,34 +57939,34 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinTemperature + * Attribute SpinSpeedCurrent */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + ReadLaundryWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") { } - ~ReadTemperatureControlMinTemperature() + ~ReadLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MinTemperature read Error", error); + LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57834,25 +57975,69 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + WriteLaundryWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlMinTemperature() + ~WriteLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") + { + } + + ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57863,10 +58048,10 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinTemperatureWithParams:params + [cluster subscribeAttributeSpinSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57883,34 +58068,34 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxTemperature + * Attribute NumberOfRinses */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { +class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") + ReadLaundryWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") { } - ~ReadTemperatureControlMaxTemperature() + ~ReadLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MaxTemperature read Error", error); + LogNSError("LaundryWasherControls NumberOfRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57919,25 +58104,66 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + WriteLaundryWasherControlsNumberOfRinses() + : WriteAttribute("number-of-rinses") { + AddArgument("attr-name", "number-of-rinses"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlMaxTemperature() + ~WriteLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") + { + } + + ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57948,10 +58174,10 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxTemperatureWithParams:params + [cluster subscribeAttributeNumberOfRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57968,34 +58194,34 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute Step + * Attribute SupportedRinses */ -class ReadTemperatureControlStep : public ReadAttribute { +class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { public: - ReadTemperatureControlStep() - : ReadAttribute("step") + ReadLaundryWasherControlsSupportedRinses() + : ReadAttribute("supported-rinses") { } - ~ReadTemperatureControlStep() + ~ReadLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl Step read Error", error); + LogNSError("LaundryWasherControls SupportedRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58004,25 +58230,25 @@ class ReadTemperatureControlStep : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + SubscribeAttributeLaundryWasherControlsSupportedRinses() + : SubscribeAttribute("supported-rinses") { } - ~SubscribeAttributeTemperatureControlStep() + ~SubscribeAttributeLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58033,10 +58259,10 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStepWithParams:params + [cluster subscribeAttributeSupportedRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58053,34 +58279,34 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedTemperatureLevel + * Attribute GeneratedCommandList */ -class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureControlSelectedTemperatureLevel() - : ReadAttribute("selected-temperature-level") + ReadLaundryWasherControlsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTemperatureControlSelectedTemperatureLevel() + ~ReadLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58089,25 +58315,25 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlSelectedTemperatureLevel() - : SubscribeAttribute("selected-temperature-level") + SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58118,10 +58344,10 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58138,204 +58364,34 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedTemperatureLevels + * Attribute AcceptedCommandList */ -class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { +class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureControlSupportedTemperatureLevels() - : ReadAttribute("supported-temperature-levels") - { - } - - ~ReadTemperatureControlSupportedTemperatureLevels() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - : SubscribeAttribute("supported-temperature-levels") - { - } - - ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl 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 subscribeAttributeSupportedTemperatureLevelsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels 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 - */ -class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { -public: - ReadTemperatureControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadTemperatureControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeTemperatureControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl 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 subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList 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 AcceptedCommandList - */ -class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { -public: - ReadTemperatureControlAcceptedCommandList() + ReadLaundryWasherControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureControlAcceptedCommandList() + ~ReadLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AcceptedCommandList read Error", error); + LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58344,25 +58400,25 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAcceptedCommandList() + SubscribeAttributeLaundryWasherControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureControlAcceptedCommandList() + ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58376,7 +58432,7 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58395,32 +58451,32 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadTemperatureControlEventList : public ReadAttribute { +class ReadLaundryWasherControlsEventList : public ReadAttribute { public: - ReadTemperatureControlEventList() + ReadLaundryWasherControlsEventList() : ReadAttribute("event-list") { } - ~ReadTemperatureControlEventList() + ~ReadLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl EventList read Error", error); + LogNSError("LaundryWasherControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58429,25 +58485,25 @@ class ReadTemperatureControlEventList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlEventList() + SubscribeAttributeLaundryWasherControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureControlEventList() + ~SubscribeAttributeLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58461,7 +58517,7 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58480,32 +58536,32 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadTemperatureControlAttributeList : public ReadAttribute { +class ReadLaundryWasherControlsAttributeList : public ReadAttribute { public: - ReadTemperatureControlAttributeList() + ReadLaundryWasherControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTemperatureControlAttributeList() + ~ReadLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AttributeList read Error", error); + LogNSError("LaundryWasherControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58514,25 +58570,25 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAttributeList() + SubscribeAttributeLaundryWasherControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureControlAttributeList() + ~SubscribeAttributeLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58546,7 +58602,7 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58565,32 +58621,32 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadTemperatureControlFeatureMap : public ReadAttribute { +class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { public: - ReadTemperatureControlFeatureMap() + ReadLaundryWasherControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTemperatureControlFeatureMap() + ~ReadLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl FeatureMap read Error", error); + LogNSError("LaundryWasherControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58599,25 +58655,25 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlFeatureMap() + SubscribeAttributeLaundryWasherControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureControlFeatureMap() + ~SubscribeAttributeLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58631,7 +58687,7 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58650,32 +58706,32 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadTemperatureControlClusterRevision : public ReadAttribute { +class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { public: - ReadTemperatureControlClusterRevision() + ReadLaundryWasherControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTemperatureControlClusterRevision() + ~ReadLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl ClusterRevision read Error", error); + LogNSError("LaundryWasherControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58684,25 +58740,25 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlClusterRevision() + SubscribeAttributeLaundryWasherControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureControlClusterRevision() + ~SubscribeAttributeLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58716,7 +58772,7 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58731,16 +58787,16 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | +| Cluster RvcRunMode | 0x0054 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 0x0003 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -58749,40 +58805,90 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class RvcRunModeChangeToMode : public ClusterCommand { +public: + RvcRunModeChangeToMode() + : ClusterCommand("change-to-mode") + { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::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); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; +}; /* - * Attribute Mask + * Attribute SupportedModes */ -class ReadRefrigeratorAlarmMask : public ReadAttribute { +class ReadRvcRunModeSupportedModes : public ReadAttribute { public: - ReadRefrigeratorAlarmMask() - : ReadAttribute("mask") + ReadRvcRunModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadRefrigeratorAlarmMask() + ~ReadRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm Mask read Error", error); + LogNSError("RVCRunMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58791,25 +58897,25 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeRvcRunModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRefrigeratorAlarmMask() + ~SubscribeAttributeRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58820,10 +58926,10 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58836,38 +58942,35 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute State + * Attribute CurrentMode */ -class ReadRefrigeratorAlarmState : public ReadAttribute { +class ReadRvcRunModeCurrentMode : public ReadAttribute { public: - ReadRefrigeratorAlarmState() - : ReadAttribute("state") + ReadRvcRunModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadRefrigeratorAlarmState() + ~ReadRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm State read Error", error); + LogNSError("RVCRunMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58876,25 +58979,25 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeRvcRunModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRefrigeratorAlarmState() + ~SubscribeAttributeRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58905,10 +59008,10 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58921,38 +59024,35 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Supported + * Attribute OnMode */ -class ReadRefrigeratorAlarmSupported : public ReadAttribute { +class ReadRvcRunModeOnMode : public ReadAttribute { public: - ReadRefrigeratorAlarmSupported() - : ReadAttribute("supported") + ReadRvcRunModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadRefrigeratorAlarmSupported() + ~ReadRvcRunModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm Supported read Error", error); + LogNSError("RVCRunMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58961,25 +59061,69 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { +class WriteRvcRunModeOnMode : public WriteAttribute { public: - SubscribeAttributeRefrigeratorAlarmSupported() - : SubscribeAttribute("supported") + WriteRvcRunModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRefrigeratorAlarmSupported() + ~WriteRvcRunModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("RVCRunMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeRvcRunModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeRvcRunModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58990,10 +59134,10 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59006,38 +59150,35 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { +class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmGeneratedCommandList() + ReadRvcRunModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAlarmGeneratedCommandList() + ~ReadRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + LogNSError("RVCRunMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59046,25 +59187,25 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + SubscribeAttributeRvcRunModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + ~SubscribeAttributeRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59078,7 +59219,7 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59091,38 +59232,35 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { +class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmAcceptedCommandList() + ReadRvcRunModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAlarmAcceptedCommandList() + ~ReadRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + LogNSError("RVCRunMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59131,25 +59269,25 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + SubscribeAttributeRvcRunModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + ~SubscribeAttributeRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59163,7 +59301,7 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59176,38 +59314,37 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRefrigeratorAlarmEventList : public ReadAttribute { +class ReadRvcRunModeEventList : public ReadAttribute { public: - ReadRefrigeratorAlarmEventList() + ReadRvcRunModeEventList() : ReadAttribute("event-list") { } - ~ReadRefrigeratorAlarmEventList() + ~ReadRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm EventList read Error", error); + LogNSError("RVCRunMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59216,25 +59353,25 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmEventList() + SubscribeAttributeRvcRunModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAlarmEventList() + ~SubscribeAttributeRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59248,7 +59385,7 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59262,37 +59399,36 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { +class ReadRvcRunModeAttributeList : public ReadAttribute { public: - ReadRefrigeratorAlarmAttributeList() + ReadRvcRunModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAlarmAttributeList() + ~ReadRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AttributeList read Error", error); + LogNSError("RVCRunMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59301,25 +59437,25 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAttributeList() + SubscribeAttributeRvcRunModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAlarmAttributeList() + ~SubscribeAttributeRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59333,7 +59469,7 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59346,38 +59482,35 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { +class ReadRvcRunModeFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAlarmFeatureMap() + ReadRvcRunModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAlarmFeatureMap() + ~ReadRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + LogNSError("RVCRunMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59386,25 +59519,25 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmFeatureMap() + SubscribeAttributeRvcRunModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAlarmFeatureMap() + ~SubscribeAttributeRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59418,7 +59551,7 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59431,38 +59564,35 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { +class ReadRvcRunModeClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAlarmClusterRevision() + ReadRvcRunModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAlarmClusterRevision() + ~ReadRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + LogNSError("RVCRunMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59471,25 +59601,25 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmClusterRevision() + SubscribeAttributeRvcRunModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAlarmClusterRevision() + ~SubscribeAttributeRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59503,7 +59633,7 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59516,11 +59646,8 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DishwasherMode | 0x0059 | +| Cluster RvcCleanMode | 0x0055 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -59528,7 +59655,6 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -59540,50 +59666,45 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class DishwasherModeChangeToMode : public ClusterCommand { +class RvcCleanModeChangeToMode : public ClusterCommand { public: - DishwasherModeChangeToMode() + RvcCleanModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -59595,42 +59716,38 @@ class DishwasherModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ -class ReadDishwasherModeSupportedModes : public ReadAttribute { +class ReadRvcCleanModeSupportedModes : public ReadAttribute { public: - ReadDishwasherModeSupportedModes() + ReadRvcCleanModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadDishwasherModeSupportedModes() + ~ReadRvcCleanModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode SupportedModes read Error", error); + LogNSError("RVCCleanMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59639,25 +59756,25 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeSupportedModes() + SubscribeAttributeRvcCleanModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeDishwasherModeSupportedModes() + ~SubscribeAttributeRvcCleanModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59671,7 +59788,7 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59684,38 +59801,35 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadDishwasherModeCurrentMode : public ReadAttribute { +class ReadRvcCleanModeCurrentMode : public ReadAttribute { public: - ReadDishwasherModeCurrentMode() + ReadRvcCleanModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadDishwasherModeCurrentMode() + ~ReadRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode CurrentMode read Error", error); + LogNSError("RVCCleanMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59724,25 +59838,25 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeCurrentMode() + SubscribeAttributeRvcCleanModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeDishwasherModeCurrentMode() + ~SubscribeAttributeRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59756,7 +59870,7 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59769,38 +59883,35 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute StartUpMode + * Attribute OnMode */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { +class ReadRvcCleanModeOnMode : public ReadAttribute { public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadRvcCleanModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadDishwasherModeStartUpMode() + ~ReadRvcCleanModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode StartUpMode read Error", error); + LogNSError("RVCCleanMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59809,28 +59920,28 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { } }; -class WriteDishwasherModeStartUpMode : public WriteAttribute { +class WriteRvcCleanModeOnMode : public WriteAttribute { public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteRvcCleanModeOnMode() + : WriteAttribute("on-mode") { - AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-name", "on-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteDishwasherModeStartUpMode() + ~WriteRvcCleanModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -59839,9 +59950,9 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); + LogNSError("RVCCleanMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59853,25 +59964,25 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeRvcCleanModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeDishwasherModeStartUpMode() + ~SubscribeAttributeRvcCleanModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59882,10 +59993,10 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59898,109 +60009,62 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OnMode + * Attribute GeneratedCommandList */ -class ReadDishwasherModeOnMode : public ReadAttribute { +class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") + ReadRvcCleanModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDishwasherModeOnMode() + ~ReadRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeOnMode : public WriteAttribute { -public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); + LogNSError("RVCCleanMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeRvcCleanModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherModeOnMode() + ~SubscribeAttributeRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60011,10 +60075,10 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60027,38 +60091,35 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { +class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRvcCleanModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherModeGeneratedCommandList() + ~ReadRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode GeneratedCommandList read Error", error); + LogNSError("RVCCleanMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60067,110 +60128,25 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeDishwasherModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeDishwasherModeGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode 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 subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList 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 AcceptedCommandList - */ -class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { -public: - ReadDishwasherModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadDishwasherModeAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DishwasherMode AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAcceptedCommandList() + SubscribeAttributeRvcCleanModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherModeAcceptedCommandList() + ~SubscribeAttributeRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60184,7 +60160,7 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60197,38 +60173,37 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadDishwasherModeEventList : public ReadAttribute { +class ReadRvcCleanModeEventList : public ReadAttribute { public: - ReadDishwasherModeEventList() + ReadRvcCleanModeEventList() : ReadAttribute("event-list") { } - ~ReadDishwasherModeEventList() + ~ReadRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode EventList read Error", error); + LogNSError("RVCCleanMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60237,25 +60212,25 @@ class ReadDishwasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeEventList() + SubscribeAttributeRvcCleanModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherModeEventList() + ~SubscribeAttributeRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60269,7 +60244,7 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60283,37 +60258,36 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadDishwasherModeAttributeList : public ReadAttribute { +class ReadRvcCleanModeAttributeList : public ReadAttribute { public: - ReadDishwasherModeAttributeList() + ReadRvcCleanModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadDishwasherModeAttributeList() + ~ReadRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AttributeList read Error", error); + LogNSError("RVCCleanMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60322,25 +60296,25 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAttributeList() + SubscribeAttributeRvcCleanModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherModeAttributeList() + ~SubscribeAttributeRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60354,7 +60328,7 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60367,38 +60341,35 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadDishwasherModeFeatureMap : public ReadAttribute { +class ReadRvcCleanModeFeatureMap : public ReadAttribute { public: - ReadDishwasherModeFeatureMap() + ReadRvcCleanModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadDishwasherModeFeatureMap() + ~ReadRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode FeatureMap read Error", error); + LogNSError("RVCCleanMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60407,25 +60378,25 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeFeatureMap() + SubscribeAttributeRvcCleanModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDishwasherModeFeatureMap() + ~SubscribeAttributeRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60439,7 +60410,7 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60452,38 +60423,35 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadDishwasherModeClusterRevision : public ReadAttribute { +class ReadRvcCleanModeClusterRevision : public ReadAttribute { public: - ReadDishwasherModeClusterRevision() + ReadRvcCleanModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadDishwasherModeClusterRevision() + ~ReadRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode ClusterRevision read Error", error); + LogNSError("RVCCleanMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60492,25 +60460,25 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeClusterRevision() + SubscribeAttributeRvcCleanModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDishwasherModeClusterRevision() + ~SubscribeAttributeRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60524,7 +60492,7 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60537,16 +60505,20 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | +| Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| | Commands: | | +| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * AirQuality | 0x0000 | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -60557,37 +60529,105 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTemperature + */ +class TemperatureControlSetTemperature : public ClusterCommand { +public: + TemperatureControlSetTemperature() + : ClusterCommand("set-temperature") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::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); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperature.HasValue()) { + params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; + } else { + params.targetTemperature = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperatureLevel.HasValue()) { + params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; + } else { + params.targetTemperatureLevel = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTemperatureWithParams: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::TemperatureControl::Commands::SetTemperature::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute AirQuality + * Attribute TemperatureSetpoint */ -class ReadAirQualityAirQuality : public ReadAttribute { +class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { public: - ReadAirQualityAirQuality() - : ReadAttribute("air-quality") + ReadTemperatureControlTemperatureSetpoint() + : ReadAttribute("temperature-setpoint") { } - ~ReadAirQualityAirQuality() + ~ReadTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AirQuality read Error", error); + LogNSError("TemperatureControl TemperatureSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60596,25 +60636,25 @@ class ReadAirQualityAirQuality : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAirQuality() - : SubscribeAttribute("air-quality") + SubscribeAttributeTemperatureControlTemperatureSetpoint() + : SubscribeAttribute("temperature-setpoint") { } - ~SubscribeAttributeAirQualityAirQuality() + ~SubscribeAttributeTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60625,10 +60665,10 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAirQualityWithParams:params + [cluster subscribeAttributeTemperatureSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60645,34 +60685,34 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MinTemperature */ -class ReadAirQualityGeneratedCommandList : public ReadAttribute { +class ReadTemperatureControlMinTemperature : public ReadAttribute { public: - ReadAirQualityGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTemperatureControlMinTemperature() + : ReadAttribute("min-temperature") { } - ~ReadAirQualityGeneratedCommandList() + ~ReadTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality GeneratedCommandList read Error", error); + LogNSError("TemperatureControl MinTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60681,25 +60721,25 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { public: - SubscribeAttributeAirQualityGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTemperatureControlMinTemperature() + : SubscribeAttribute("min-temperature") { } - ~SubscribeAttributeAirQualityGeneratedCommandList() + ~SubscribeAttributeTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60710,10 +60750,10 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60730,34 +60770,34 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute MaxTemperature */ -class ReadAirQualityAcceptedCommandList : public ReadAttribute { +class ReadTemperatureControlMaxTemperature : public ReadAttribute { public: - ReadAirQualityAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTemperatureControlMaxTemperature() + : ReadAttribute("max-temperature") { } - ~ReadAirQualityAcceptedCommandList() + ~ReadTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AcceptedCommandList read Error", error); + LogNSError("TemperatureControl MaxTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60766,25 +60806,25 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTemperatureControlMaxTemperature() + : SubscribeAttribute("max-temperature") { } - ~SubscribeAttributeAirQualityAcceptedCommandList() + ~SubscribeAttributeTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60795,10 +60835,10 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60815,34 +60855,34 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute Step */ -class ReadAirQualityEventList : public ReadAttribute { +class ReadTemperatureControlStep : public ReadAttribute { public: - ReadAirQualityEventList() - : ReadAttribute("event-list") + ReadTemperatureControlStep() + : ReadAttribute("step") { } - ~ReadAirQualityEventList() + ~ReadTemperatureControlStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality EventList read Error", error); + LogNSError("TemperatureControl Step read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60851,25 +60891,25 @@ class ReadAirQualityEventList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { public: - SubscribeAttributeAirQualityEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTemperatureControlStep() + : SubscribeAttribute("step") { } - ~SubscribeAttributeAirQualityEventList() + ~SubscribeAttributeTemperatureControlStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60880,10 +60920,10 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60900,34 +60940,34 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute SelectedTemperatureLevel */ -class ReadAirQualityAttributeList : public ReadAttribute { +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { public: - ReadAirQualityAttributeList() - : ReadAttribute("attribute-list") + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") { } - ~ReadAirQualityAttributeList() + ~ReadTemperatureControlSelectedTemperatureLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AttributeList read Error", error); + LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60936,25 +60976,25 @@ class ReadAirQualityAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") { } - ~SubscribeAttributeAirQualityAttributeList() + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60965,10 +61005,10 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60985,34 +61025,34 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute SupportedTemperatureLevels */ -class ReadAirQualityFeatureMap : public ReadAttribute { +class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { public: - ReadAirQualityFeatureMap() - : ReadAttribute("feature-map") + ReadTemperatureControlSupportedTemperatureLevels() + : ReadAttribute("supported-temperature-levels") { } - ~ReadAirQualityFeatureMap() + ~ReadTemperatureControlSupportedTemperatureLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality FeatureMap read Error", error); + LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61021,25 +61061,25 @@ class ReadAirQualityFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { public: - SubscribeAttributeAirQualityFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + : SubscribeAttribute("supported-temperature-levels") { } - ~SubscribeAttributeAirQualityFeatureMap() + ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61050,10 +61090,10 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61070,34 +61110,34 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadAirQualityClusterRevision : public ReadAttribute { +class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { public: - ReadAirQualityClusterRevision() - : ReadAttribute("cluster-revision") + ReadTemperatureControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadAirQualityClusterRevision() + ~ReadTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality ClusterRevision read Error", error); + LogNSError("TemperatureControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61106,25 +61146,25 @@ class ReadAirQualityClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTemperatureControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAirQualityClusterRevision() + ~SubscribeAttributeTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61135,10 +61175,10 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61152,127 +61192,37 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelfTestRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SmokeSensitivityLevel | 0x000B | -| * ExpiryDate | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SelfTestRequest - */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand { -public: - SmokeCoAlarmSelfTestRequest() - : ClusterCommand("self-test-request") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams 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 selfTestRequestWithParams: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 /* - * Attribute ExpressedState + * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmExpressedState() - : ReadAttribute("expressed-state") + ReadTemperatureControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmExpressedState() + ~ReadTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpressedState read Error", error); + LogNSError("TemperatureControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61281,25 +61231,25 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpressedState() - : SubscribeAttribute("expressed-state") + SubscribeAttributeTemperatureControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmExpressedState() + ~SubscribeAttributeTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61310,10 +61260,10 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpressedStateWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61330,34 +61280,34 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeState + * Attribute EventList */ -class ReadSmokeCoAlarmSmokeState : public ReadAttribute { +class ReadTemperatureControlEventList : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeState() - : ReadAttribute("smoke-state") + ReadTemperatureControlEventList() + : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmSmokeState() + ~ReadTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm SmokeState read Error", error); + LogNSError("TemperatureControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61366,25 +61316,25 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeState() - : SubscribeAttribute("smoke-state") + SubscribeAttributeTemperatureControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmSmokeState() + ~SubscribeAttributeTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61395,10 +61345,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeStateWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61415,34 +61365,34 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute COState + * Attribute AttributeList */ -class ReadSmokeCoAlarmCOState : public ReadAttribute { +class ReadTemperatureControlAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmCOState() - : ReadAttribute("costate") + ReadTemperatureControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmCOState() + ~ReadTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm COState read Error", error); + LogNSError("TemperatureControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61451,25 +61401,25 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmCOState() - : SubscribeAttribute("costate") + SubscribeAttributeTemperatureControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmCOState() + ~SubscribeAttributeTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61480,10 +61430,10 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCOStateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61500,34 +61450,34 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute BatteryAlert + * Attribute FeatureMap */ -class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +class ReadTemperatureControlFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmBatteryAlert() - : ReadAttribute("battery-alert") + ReadTemperatureControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmBatteryAlert() + ~ReadTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + LogNSError("TemperatureControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61536,25 +61486,25 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmBatteryAlert() - : SubscribeAttribute("battery-alert") + SubscribeAttributeTemperatureControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmBatteryAlert() + ~SubscribeAttributeTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61565,10 +61515,10 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryAlertWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61585,34 +61535,34 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute DeviceMuted + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { +class ReadTemperatureControlClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmDeviceMuted() - : ReadAttribute("device-muted") + ReadTemperatureControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmDeviceMuted() + ~ReadTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + LogNSError("TemperatureControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61621,25 +61571,25 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmDeviceMuted() - : SubscribeAttribute("device-muted") + SubscribeAttributeTemperatureControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmDeviceMuted() + ~SubscribeAttributeTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61650,10 +61600,10 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceMutedWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61667,37 +61617,59 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RefrigeratorAlarm | 0x0057 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Mask | 0x0000 | +| * State | 0x0002 | +| * Supported | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Notify | 0x0000 | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute TestInProgress + * Attribute Mask */ -class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +class ReadRefrigeratorAlarmMask : public ReadAttribute { public: - ReadSmokeCoAlarmTestInProgress() - : ReadAttribute("test-in-progress") + ReadRefrigeratorAlarmMask() + : ReadAttribute("mask") { } - ~ReadSmokeCoAlarmTestInProgress() + ~ReadRefrigeratorAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm TestInProgress read Error", error); + LogNSError("RefrigeratorAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61706,25 +61678,25 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmTestInProgress() - : SubscribeAttribute("test-in-progress") + SubscribeAttributeRefrigeratorAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeSmokeCoAlarmTestInProgress() + ~SubscribeAttributeRefrigeratorAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61735,10 +61707,10 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestInProgressWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61755,34 +61727,34 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute HardwareFaultAlert + * Attribute State */ -class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { +class ReadRefrigeratorAlarmState : public ReadAttribute { public: - ReadSmokeCoAlarmHardwareFaultAlert() - : ReadAttribute("hardware-fault-alert") + ReadRefrigeratorAlarmState() + : ReadAttribute("state") { } - ~ReadSmokeCoAlarmHardwareFaultAlert() + ~ReadRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + LogNSError("RefrigeratorAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61791,25 +61763,25 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() - : SubscribeAttribute("hardware-fault-alert") + SubscribeAttributeRefrigeratorAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + ~SubscribeAttributeRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61820,10 +61792,10 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareFaultAlertWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61840,34 +61812,34 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute EndOfServiceAlert + * Attribute Supported */ -class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { +class ReadRefrigeratorAlarmSupported : public ReadAttribute { public: - ReadSmokeCoAlarmEndOfServiceAlert() - : ReadAttribute("end-of-service-alert") + ReadRefrigeratorAlarmSupported() + : ReadAttribute("supported") { } - ~ReadSmokeCoAlarmEndOfServiceAlert() + ~ReadRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + LogNSError("RefrigeratorAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61876,25 +61848,25 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() - : SubscribeAttribute("end-of-service-alert") + SubscribeAttributeRefrigeratorAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + ~SubscribeAttributeRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61905,10 +61877,10 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndOfServiceAlertWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61925,34 +61897,34 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectSmokeAlarm + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { +class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectSmokeAlarm() - : ReadAttribute("interconnect-smoke-alarm") + ReadRefrigeratorAlarmGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmInterconnectSmokeAlarm() + ~ReadRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61961,25 +61933,25 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() - : SubscribeAttribute("interconnect-smoke-alarm") + SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61990,10 +61962,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62010,34 +61982,34 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectCOAlarm + * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { +class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectCOAlarm() - : ReadAttribute("interconnect-coalarm") + ReadRefrigeratorAlarmAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmInterconnectCOAlarm() + ~ReadRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62046,25 +62018,25 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() - : SubscribeAttribute("interconnect-coalarm") + SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62075,10 +62047,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62095,34 +62067,34 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ContaminationState + * Attribute EventList */ -class ReadSmokeCoAlarmContaminationState : public ReadAttribute { +class ReadRefrigeratorAlarmEventList : public ReadAttribute { public: - ReadSmokeCoAlarmContaminationState() - : ReadAttribute("contamination-state") + ReadRefrigeratorAlarmEventList() + : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmContaminationState() + ~ReadRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ContaminationState read Error", error); + LogNSError("RefrigeratorAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62131,25 +62103,25 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmContaminationState() - : SubscribeAttribute("contamination-state") + SubscribeAttributeRefrigeratorAlarmEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmContaminationState() + ~SubscribeAttributeRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62160,10 +62132,10 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeContaminationStateWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62180,102 +62152,61 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeSensitivityLevel + * Attribute AttributeList */ -class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { +class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeSensitivityLevel() - : ReadAttribute("smoke-sensitivity-level") + ReadRefrigeratorAlarmAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmSmokeSensitivityLevel() + ~ReadRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { -public: - WriteSmokeCoAlarmSmokeSensitivityLevel() - : WriteAttribute("smoke-sensitivity-level") - { - AddArgument("attr-name", "smoke-sensitivity-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteSmokeCoAlarmSmokeSensitivityLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + LogNSError("RefrigeratorAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() - : SubscribeAttribute("smoke-sensitivity-level") + SubscribeAttributeRefrigeratorAlarmAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + ~SubscribeAttributeRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62286,10 +62217,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62306,34 +62237,34 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute ExpiryDate + * Attribute FeatureMap */ -class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmExpiryDate() - : ReadAttribute("expiry-date") + ReadRefrigeratorAlarmFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmExpiryDate() + ~ReadRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + LogNSError("RefrigeratorAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62342,25 +62273,25 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpiryDate() - : SubscribeAttribute("expiry-date") + SubscribeAttributeRefrigeratorAlarmFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmExpiryDate() + ~SubscribeAttributeRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62371,10 +62302,10 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiryDateWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62391,34 +62322,34 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRefrigeratorAlarmClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmGeneratedCommandList() + ~ReadRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62427,25 +62358,25 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRefrigeratorAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62456,10 +62387,10 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62472,38 +62403,121 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster DishwasherMode | 0x0059 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Command ChangeToMode */ -class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { +class DishwasherModeChangeToMode : public ClusterCommand { public: - ReadSmokeCoAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + DishwasherModeChangeToMode() + : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadSmokeCoAlarmAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::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); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadDishwasherModeSupportedModes : public ReadAttribute { +public: + ReadDishwasherModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + LogNSError("DishwasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62512,25 +62526,25 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDishwasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + ~SubscribeAttributeDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62541,10 +62555,10 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62561,34 +62575,34 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute CurrentMode */ -class ReadSmokeCoAlarmEventList : public ReadAttribute { +class ReadDishwasherModeCurrentMode : public ReadAttribute { public: - ReadSmokeCoAlarmEventList() - : ReadAttribute("event-list") + ReadDishwasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadSmokeCoAlarmEventList() + ~ReadDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EventList read Error", error); + LogNSError("DishwasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62597,25 +62611,25 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDishwasherModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeSmokeCoAlarmEventList() + ~SubscribeAttributeDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62626,10 +62640,10 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62646,34 +62660,34 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute StartUpMode */ -class ReadSmokeCoAlarmAttributeList : public ReadAttribute { +class ReadDishwasherModeStartUpMode : public ReadAttribute { public: - ReadSmokeCoAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadDishwasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadSmokeCoAlarmAttributeList() + ~ReadDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AttributeList read Error", error); + LogNSError("DishwasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62682,25 +62696,69 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { +class WriteDishwasherModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmAttributeList() - : SubscribeAttribute("attribute-list") + WriteDishwasherModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmAttributeList() + ~WriteDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeDishwasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeDishwasherModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62711,10 +62769,10 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62731,34 +62789,34 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute OnMode */ -class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { +class ReadDishwasherModeOnMode : public ReadAttribute { public: - ReadSmokeCoAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadDishwasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadSmokeCoAlarmFeatureMap() + ~ReadDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm FeatureMap read Error", error); + LogNSError("DishwasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62767,25 +62825,69 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { +class WriteDishwasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeSmokeCoAlarmFeatureMap() - : SubscribeAttribute("feature-map") + WriteDishwasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeSmokeCoAlarmFeatureMap() + ~WriteDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeDishwasherModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeDishwasherModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62796,10 +62898,10 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62816,34 +62918,34 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { +class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadDishwasherModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmClusterRevision() + ~ReadDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + LogNSError("DishwasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62852,25 +62954,25 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDishwasherModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmClusterRevision() + ~SubscribeAttributeDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62881,10 +62983,10 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62898,169 +63000,37 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster DishwasherAlarm | 0x005D | -|------------------------------------------------------------------------------| -| Commands: | | -| * Reset | 0x00 | -| * ModifyEnabledAlarms | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Mask | 0x0000 | -| * Latch | 0x0001 | -| * State | 0x0002 | -| * Supported | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Notify | 0x0000 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command Reset - */ -class DishwasherAlarmReset : public ClusterCommand { -public: - DishwasherAlarmReset() - : ClusterCommand("reset") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetWithParams: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::DishwasherAlarm::Commands::Reset::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ModifyEnabledAlarms - */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { -public: - DishwasherAlarmModifyEnabledAlarms() - : ClusterCommand("modify-enabled-alarms") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster modifyEnabledAlarmsWithParams: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::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute AcceptedCommandList */ -class ReadDishwasherAlarmMask : public ReadAttribute { +class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmMask() - : ReadAttribute("mask") + ReadDishwasherModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherAlarmMask() + ~ReadDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Mask read Error", error); + LogNSError("DishwasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63069,25 +63039,25 @@ class ReadDishwasherAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeDishwasherModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherAlarmMask() + ~SubscribeAttributeDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63098,10 +63068,10 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63118,34 +63088,34 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Latch + * Attribute EventList */ -class ReadDishwasherAlarmLatch : public ReadAttribute { +class ReadDishwasherModeEventList : public ReadAttribute { public: - ReadDishwasherAlarmLatch() - : ReadAttribute("latch") + ReadDishwasherModeEventList() + : ReadAttribute("event-list") { } - ~ReadDishwasherAlarmLatch() + ~ReadDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Latch read Error", error); + LogNSError("DishwasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63154,25 +63124,25 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmLatch() - : SubscribeAttribute("latch") + SubscribeAttributeDishwasherModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherAlarmLatch() + ~SubscribeAttributeDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63183,10 +63153,10 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLatchWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63203,34 +63173,34 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute AttributeList */ -class ReadDishwasherAlarmState : public ReadAttribute { +class ReadDishwasherModeAttributeList : public ReadAttribute { public: - ReadDishwasherAlarmState() - : ReadAttribute("state") + ReadDishwasherModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDishwasherAlarmState() + ~ReadDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm State read Error", error); + LogNSError("DishwasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63239,25 +63209,25 @@ class ReadDishwasherAlarmState : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeDishwasherModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherAlarmState() + ~SubscribeAttributeDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63268,10 +63238,10 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63288,34 +63258,34 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute FeatureMap */ -class ReadDishwasherAlarmSupported : public ReadAttribute { +class ReadDishwasherModeFeatureMap : public ReadAttribute { public: - ReadDishwasherAlarmSupported() - : ReadAttribute("supported") + ReadDishwasherModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDishwasherAlarmSupported() + ~ReadDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Supported read Error", error); + LogNSError("DishwasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63324,25 +63294,25 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeDishwasherModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDishwasherAlarmSupported() + ~SubscribeAttributeDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63353,10 +63323,10 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63373,34 +63343,34 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { +class ReadDishwasherModeClusterRevision : public ReadAttribute { public: - ReadDishwasherAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDishwasherModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDishwasherAlarmGeneratedCommandList() + ~ReadDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + LogNSError("DishwasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63409,25 +63379,25 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDishwasherModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() + ~SubscribeAttributeDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63438,10 +63408,10 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63454,38 +63424,57 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - -/* - * Attribute AcceptedCommandList +/*----------------------------------------------------------------------------*\ +| Cluster AirQuality | 0x005B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AirQuality | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AirQuality */ -class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { +class ReadAirQualityAirQuality : public ReadAttribute { public: - ReadDishwasherAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadAirQualityAirQuality() + : ReadAttribute("air-quality") { } - ~ReadDishwasherAlarmAcceptedCommandList() + ~ReadAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + LogNSError("AirQuality AirQuality read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63494,25 +63483,25 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAirQualityAirQuality() + : SubscribeAttribute("air-quality") { } - ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() + ~SubscribeAttributeAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63523,10 +63512,10 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAirQualityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63543,34 +63532,34 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadDishwasherAlarmEventList : public ReadAttribute { +class ReadAirQualityGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmEventList() - : ReadAttribute("event-list") + ReadAirQualityGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDishwasherAlarmEventList() + ~ReadAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm EventList read Error", error); + LogNSError("AirQuality GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63579,25 +63568,25 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeAirQualityGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherAlarmEventList() + ~SubscribeAttributeAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63608,10 +63597,10 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63628,34 +63617,34 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadDishwasherAlarmAttributeList : public ReadAttribute { +class ReadAirQualityAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadAirQualityAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherAlarmAttributeList() + ~ReadAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AttributeList read Error", error); + LogNSError("AirQuality AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63664,25 +63653,25 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAirQualityAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherAlarmAttributeList() + ~SubscribeAttributeAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63693,10 +63682,10 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63713,34 +63702,34 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadDishwasherAlarmFeatureMap : public ReadAttribute { +class ReadAirQualityEventList : public ReadAttribute { public: - ReadDishwasherAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadAirQualityEventList() + : ReadAttribute("event-list") { } - ~ReadDishwasherAlarmFeatureMap() + ~ReadAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm FeatureMap read Error", error); + LogNSError("AirQuality EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63749,25 +63738,25 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAirQualityEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherAlarmFeatureMap() + ~SubscribeAttributeAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63778,10 +63767,10 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63798,34 +63787,34 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadDishwasherAlarmClusterRevision : public ReadAttribute { +class ReadAirQualityAttributeList : public ReadAttribute { public: - ReadDishwasherAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadAirQualityAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDishwasherAlarmClusterRevision() + ~ReadAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm ClusterRevision read Error", error); + LogNSError("AirQuality AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63834,25 +63823,25 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAirQualityAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherAlarmClusterRevision() + ~SubscribeAttributeAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63863,10 +63852,10 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63880,57 +63869,37 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenMode | 0x005E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute FeatureMap */ -class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { +class ReadAirQualityFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenModeSupportedModes() - : ReadAttribute("supported-modes") + ReadAirQualityFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenModeSupportedModes() + ~ReadAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode SupportedModes read Error", error); + LogNSError("AirQuality FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63939,25 +63908,25 @@ class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeAirQualityFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenModeSupportedModes() + ~SubscribeAttributeAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63968,10 +63937,10 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63988,34 +63957,34 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute ClusterRevision */ -class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { +class ReadAirQualityClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenModeCurrentMode() - : ReadAttribute("current-mode") + ReadAirQualityClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenModeCurrentMode() + ~ReadAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode CurrentMode read Error", error); + LogNSError("AirQuality ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64024,25 +63993,25 @@ class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeAirQualityClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenModeCurrentMode() + ~SubscribeAttributeAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64053,10 +64022,10 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64069,38 +64038,128 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster SmokeCoAlarm | 0x005C | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelfTestRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ExpressedState | 0x0000 | +| * SmokeState | 0x0001 | +| * COState | 0x0002 | +| * BatteryAlert | 0x0003 | +| * DeviceMuted | 0x0004 | +| * TestInProgress | 0x0005 | +| * HardwareFaultAlert | 0x0006 | +| * EndOfServiceAlert | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * ContaminationState | 0x000A | +| * SmokeSensitivityLevel | 0x000B | +| * ExpiryDate | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SmokeAlarm | 0x0000 | +| * COAlarm | 0x0001 | +| * LowBattery | 0x0002 | +| * HardwareFault | 0x0003 | +| * EndOfService | 0x0004 | +| * SelfTestComplete | 0x0005 | +| * AlarmMuted | 0x0006 | +| * MuteEnded | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * AllClear | 0x000A | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Command SelfTestRequest */ -class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - ReadMicrowaveOvenModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + SmokeCoAlarmSelfTestRequest() + : ClusterCommand("self-test-request") { + ClusterCommand::AddArguments(); } - ~ReadMicrowaveOvenModeGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::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); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams 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 selfTestRequestWithParams: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 + +/* + * Attribute ExpressedState + */ +class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +public: + ReadSmokeCoAlarmExpressedState() + : ReadAttribute("expressed-state") + { + } + + ~ReadSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm ExpressedState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64109,25 +64168,25 @@ class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSmokeCoAlarmExpressedState() + : SubscribeAttribute("expressed-state") { } - ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64138,10 +64197,10 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeExpressedStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64158,34 +64217,34 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute SmokeState */ -class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmSmokeState : public ReadAttribute { public: - ReadMicrowaveOvenModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSmokeCoAlarmSmokeState() + : ReadAttribute("smoke-state") { } - ~ReadMicrowaveOvenModeAcceptedCommandList() + ~ReadSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm SmokeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64194,25 +64253,25 @@ class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSmokeCoAlarmSmokeState() + : SubscribeAttribute("smoke-state") { } - ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64223,10 +64282,10 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSmokeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64243,34 +64302,34 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute COState */ -class ReadMicrowaveOvenModeEventList : public ReadAttribute { +class ReadSmokeCoAlarmCOState : public ReadAttribute { public: - ReadMicrowaveOvenModeEventList() - : ReadAttribute("event-list") + ReadSmokeCoAlarmCOState() + : ReadAttribute("costate") { } - ~ReadMicrowaveOvenModeEventList() + ~ReadSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode EventList read Error", error); + LogNSError("SmokeCOAlarm COState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64279,25 +64338,25 @@ class ReadMicrowaveOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSmokeCoAlarmCOState() + : SubscribeAttribute("costate") { } - ~SubscribeAttributeMicrowaveOvenModeEventList() + ~SubscribeAttributeSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64308,10 +64367,10 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCOStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64328,34 +64387,34 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute BatteryAlert */ -class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { public: - ReadMicrowaveOvenModeAttributeList() - : ReadAttribute("attribute-list") + ReadSmokeCoAlarmBatteryAlert() + : ReadAttribute("battery-alert") { } - ~ReadMicrowaveOvenModeAttributeList() + ~ReadSmokeCoAlarmBatteryAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AttributeList read Error", error); + LogNSError("SmokeCOAlarm BatteryAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64364,25 +64423,25 @@ class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeSmokeCoAlarmBatteryAlert() + : SubscribeAttribute("battery-alert") { } - ~SubscribeAttributeMicrowaveOvenModeAttributeList() + ~SubscribeAttributeSmokeCoAlarmBatteryAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64393,10 +64452,10 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeBatteryAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64413,34 +64472,34 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute DeviceMuted */ -class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { public: - ReadMicrowaveOvenModeFeatureMap() - : ReadAttribute("feature-map") + ReadSmokeCoAlarmDeviceMuted() + : ReadAttribute("device-muted") { } - ~ReadMicrowaveOvenModeFeatureMap() + ~ReadSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode FeatureMap read Error", error); + LogNSError("SmokeCOAlarm DeviceMuted read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64449,25 +64508,25 @@ class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeSmokeCoAlarmDeviceMuted() + : SubscribeAttribute("device-muted") { } - ~SubscribeAttributeMicrowaveOvenModeFeatureMap() + ~SubscribeAttributeSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64478,10 +64537,10 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDeviceMutedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64498,34 +64557,34 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute TestInProgress */ -class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { public: - ReadMicrowaveOvenModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadSmokeCoAlarmTestInProgress() + : ReadAttribute("test-in-progress") { } - ~ReadMicrowaveOvenModeClusterRevision() + ~ReadSmokeCoAlarmTestInProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm TestInProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64534,25 +64593,25 @@ class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeSmokeCoAlarmTestInProgress() + : SubscribeAttribute("test-in-progress") { } - ~SubscribeAttributeMicrowaveOvenModeClusterRevision() + ~SubscribeAttributeSmokeCoAlarmTestInProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64563,10 +64622,10 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeTestInProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64580,193 +64639,37 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenControl | 0x005F | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetCookingParameters | 0x00 | -| * AddMoreTime | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CookTime | 0x0001 | -| * PowerSetting | 0x0002 | -| * MinPower | 0x0003 | -| * MaxPower | 0x0004 | -| * PowerStep | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetCookingParameters - */ -class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { -public: - MicrowaveOvenControlSetCookingParameters() - : ClusterCommand("set-cooking-parameters") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookMode.HasValue()) { - params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; - } else { - params.cookMode = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookTime.HasValue()) { - params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; - } else { - params.cookTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.powerSetting.HasValue()) { - params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; - } else { - params.powerSetting = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCookingParametersWithParams: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::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command AddMoreTime - */ -class MicrowaveOvenControlAddMoreTime : public ClusterCommand { -public: - MicrowaveOvenControlAddMoreTime() - : ClusterCommand("add-more-time") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addMoreTimeWithParams: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::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute CookTime + * Attribute HardwareFaultAlert */ -class ReadMicrowaveOvenControlCookTime : public ReadAttribute { +class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { public: - ReadMicrowaveOvenControlCookTime() - : ReadAttribute("cook-time") + ReadSmokeCoAlarmHardwareFaultAlert() + : ReadAttribute("hardware-fault-alert") { } - ~ReadMicrowaveOvenControlCookTime() + ~ReadSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl CookTime read Error", error); + LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64775,25 +64678,25 @@ class ReadMicrowaveOvenControlCookTime : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlCookTime() - : SubscribeAttribute("cook-time") + SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + : SubscribeAttribute("hardware-fault-alert") { } - ~SubscribeAttributeMicrowaveOvenControlCookTime() + ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64804,10 +64707,10 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCookTimeWithParams:params + [cluster subscribeAttributeHardwareFaultAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64824,34 +64727,34 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute PowerSetting + * Attribute EndOfServiceAlert */ -class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { +class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerSetting() - : ReadAttribute("power-setting") + ReadSmokeCoAlarmEndOfServiceAlert() + : ReadAttribute("end-of-service-alert") { } - ~ReadMicrowaveOvenControlPowerSetting() + ~ReadSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl PowerSetting read Error", error); + LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64860,25 +64763,25 @@ class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerSetting() - : SubscribeAttribute("power-setting") + SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + : SubscribeAttribute("end-of-service-alert") { } - ~SubscribeAttributeMicrowaveOvenControlPowerSetting() + ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64889,10 +64792,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerSettingWithParams:params + [cluster subscribeAttributeEndOfServiceAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64909,34 +64812,34 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinPower + * Attribute InterconnectSmokeAlarm */ -class ReadMicrowaveOvenControlMinPower : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { public: - ReadMicrowaveOvenControlMinPower() - : ReadAttribute("min-power") + ReadSmokeCoAlarmInterconnectSmokeAlarm() + : ReadAttribute("interconnect-smoke-alarm") { } - ~ReadMicrowaveOvenControlMinPower() + ~ReadSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MinPower read Error", error); + LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64945,25 +64848,25 @@ class ReadMicrowaveOvenControlMinPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMinPower() - : SubscribeAttribute("min-power") + SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + : SubscribeAttribute("interconnect-smoke-alarm") { } - ~SubscribeAttributeMicrowaveOvenControlMinPower() + ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64974,10 +64877,10 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPowerWithParams:params + [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64994,34 +64897,34 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxPower + * Attribute InterconnectCOAlarm */ -class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { public: - ReadMicrowaveOvenControlMaxPower() - : ReadAttribute("max-power") + ReadSmokeCoAlarmInterconnectCOAlarm() + : ReadAttribute("interconnect-coalarm") { } - ~ReadMicrowaveOvenControlMaxPower() + ~ReadSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MaxPower read Error", error); + LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65030,25 +64933,25 @@ class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMaxPower() - : SubscribeAttribute("max-power") + SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + : SubscribeAttribute("interconnect-coalarm") { } - ~SubscribeAttributeMicrowaveOvenControlMaxPower() + ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65059,10 +64962,10 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPowerWithParams:params + [cluster subscribeAttributeInterconnectCOAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65079,34 +64982,34 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute PowerStep + * Attribute ContaminationState */ -class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { +class ReadSmokeCoAlarmContaminationState : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerStep() - : ReadAttribute("power-step") + ReadSmokeCoAlarmContaminationState() + : ReadAttribute("contamination-state") { } - ~ReadMicrowaveOvenControlPowerStep() + ~ReadSmokeCoAlarmContaminationState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl PowerStep read Error", error); + LogNSError("SmokeCOAlarm ContaminationState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65115,25 +65018,25 @@ class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerStep() - : SubscribeAttribute("power-step") + SubscribeAttributeSmokeCoAlarmContaminationState() + : SubscribeAttribute("contamination-state") { } - ~SubscribeAttributeMicrowaveOvenControlPowerStep() + ~SubscribeAttributeSmokeCoAlarmContaminationState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65144,10 +65047,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerStepWithParams:params + [cluster subscribeAttributeContaminationStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65164,34 +65067,245 @@ class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute SmokeSensitivityLevel */ -class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { public: - ReadMicrowaveOvenControlGeneratedCommandList() + ReadSmokeCoAlarmSmokeSensitivityLevel() + : ReadAttribute("smoke-sensitivity-level") + { + } + + ~ReadSmokeCoAlarmSmokeSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { +public: + WriteSmokeCoAlarmSmokeSensitivityLevel() + : WriteAttribute("smoke-sensitivity-level") + { + AddArgument("attr-name", "smoke-sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteSmokeCoAlarmSmokeSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + : SubscribeAttribute("smoke-sensitivity-level") + { + } + + ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm 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 subscribeAttributeSmokeSensitivityLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel 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 ExpiryDate + */ +class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +public: + ReadSmokeCoAlarmExpiryDate() + : ReadAttribute("expiry-date") + { + } + + ~ReadSmokeCoAlarmExpiryDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::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); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmExpiryDate() + : SubscribeAttribute("expiry-date") + { + } + + ~SubscribeAttributeSmokeCoAlarmExpiryDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::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); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm 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 subscribeAttributeExpiryDateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate 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 + */ +class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +public: + ReadSmokeCoAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadMicrowaveOvenControlGeneratedCommandList() + ~ReadSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65200,25 +65314,25 @@ class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + SubscribeAttributeSmokeCoAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65232,7 +65346,7 @@ class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public Subscr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65251,32 +65365,32 @@ class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public Subscr /* * Attribute AcceptedCommandList */ -class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenControlAcceptedCommandList() + ReadSmokeCoAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadMicrowaveOvenControlAcceptedCommandList() + ~ReadSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65285,25 +65399,25 @@ class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + SubscribeAttributeSmokeCoAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65317,7 +65431,7 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65336,32 +65450,32 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri /* * Attribute EventList */ -class ReadMicrowaveOvenControlEventList : public ReadAttribute { +class ReadSmokeCoAlarmEventList : public ReadAttribute { public: - ReadMicrowaveOvenControlEventList() + ReadSmokeCoAlarmEventList() : ReadAttribute("event-list") { } - ~ReadMicrowaveOvenControlEventList() + ~ReadSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl EventList read Error", error); + LogNSError("SmokeCOAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65370,25 +65484,25 @@ class ReadMicrowaveOvenControlEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlEventList() + SubscribeAttributeSmokeCoAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMicrowaveOvenControlEventList() + ~SubscribeAttributeSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65402,7 +65516,7 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65421,32 +65535,32 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut /* * Attribute AttributeList */ -class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmAttributeList : public ReadAttribute { public: - ReadMicrowaveOvenControlAttributeList() + ReadSmokeCoAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadMicrowaveOvenControlAttributeList() + ~ReadSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AttributeList read Error", error); + LogNSError("SmokeCOAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65455,25 +65569,25 @@ class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAttributeList() + SubscribeAttributeSmokeCoAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMicrowaveOvenControlAttributeList() + ~SubscribeAttributeSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65487,7 +65601,7 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65506,32 +65620,32 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr /* * Attribute FeatureMap */ -class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenControlFeatureMap() + ReadSmokeCoAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenControlFeatureMap() + ~ReadSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl FeatureMap read Error", error); + LogNSError("SmokeCOAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65540,25 +65654,25 @@ class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlFeatureMap() + SubscribeAttributeSmokeCoAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenControlFeatureMap() + ~SubscribeAttributeSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65572,7 +65686,7 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65591,32 +65705,32 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu /* * Attribute ClusterRevision */ -class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenControlClusterRevision() + ReadSmokeCoAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenControlClusterRevision() + ~ReadSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65625,25 +65739,25 @@ class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlClusterRevision() + SubscribeAttributeSmokeCoAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenControlClusterRevision() + ~SubscribeAttributeSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65657,7 +65771,7 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65674,21 +65788,17 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | +| Cluster DishwasherAlarm | 0x005D | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * Reset | 0x00 | +| * ModifyEnabledAlarms | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * Mask | 0x0000 | +| * Latch | 0x0001 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -65697,153 +65807,48 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command Pause + * Command Reset */ -class OperationalStatePause : public ClusterCommand { +class DishwasherAlarmReset : public ClusterCommand { public: - OperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + DishwasherAlarmReset() + : ClusterCommand("reset") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterPauseParams 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 pauseWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class OperationalStateStop : public ClusterCommand { -public: - OperationalStateStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStopParams 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 stopWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - + AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class OperationalStateStart : public ClusterCommand { -public: - OperationalStateStart() - : ClusterCommand("start") - { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } + [cluster resetWithParams:params completion: + ^(NSError * _Nullable error) { responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65854,58 +65859,60 @@ class OperationalStateStart : public ClusterCommand { } private: + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command Resume + * Command ModifyEnabledAlarms */ -class OperationalStateResume : public ClusterCommand { +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { public: - OperationalStateResume() - : ClusterCommand("resume") + DishwasherAlarmModifyEnabledAlarms() + : ClusterCommand("modify-enabled-alarms") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster modifyEnabledAlarmsWithParams: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::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -65913,34 +65920,34 @@ class OperationalStateResume : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute PhaseList + * Attribute Mask */ -class ReadOperationalStatePhaseList : public ReadAttribute { +class ReadDishwasherAlarmMask : public ReadAttribute { public: - ReadOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadDishwasherAlarmMask() + : ReadAttribute("mask") { } - ~ReadOperationalStatePhaseList() + ~ReadDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState PhaseList read Error", error); + LogNSError("DishwasherAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65949,25 +65956,25 @@ class ReadOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeDishwasherAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeOperationalStatePhaseList() + ~SubscribeAttributeDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65978,10 +65985,10 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65998,34 +66005,34 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPhase + * Attribute Latch */ -class ReadOperationalStateCurrentPhase : public ReadAttribute { +class ReadDishwasherAlarmLatch : public ReadAttribute { public: - ReadOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadDishwasherAlarmLatch() + : ReadAttribute("latch") { } - ~ReadOperationalStateCurrentPhase() + ~ReadDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CurrentPhase read Error", error); + LogNSError("DishwasherAlarm Latch read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66034,25 +66041,25 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeDishwasherAlarmLatch() + : SubscribeAttribute("latch") { } - ~SubscribeAttributeOperationalStateCurrentPhase() + ~SubscribeAttributeDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66063,10 +66070,10 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeLatchWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66083,34 +66090,34 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute CountdownTime + * Attribute State */ -class ReadOperationalStateCountdownTime : public ReadAttribute { +class ReadDishwasherAlarmState : public ReadAttribute { public: - ReadOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadDishwasherAlarmState() + : ReadAttribute("state") { } - ~ReadOperationalStateCountdownTime() + ~ReadDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CountdownTime read Error", error); + LogNSError("DishwasherAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66119,25 +66126,25 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeDishwasherAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeOperationalStateCountdownTime() + ~SubscribeAttributeDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66148,10 +66155,10 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66168,34 +66175,34 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalStateList + * Attribute Supported */ -class ReadOperationalStateOperationalStateList : public ReadAttribute { +class ReadDishwasherAlarmSupported : public ReadAttribute { public: - ReadOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadDishwasherAlarmSupported() + : ReadAttribute("supported") { } - ~ReadOperationalStateOperationalStateList() + ~ReadDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalStateList read Error", error); + LogNSError("DishwasherAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66204,25 +66211,25 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeDishwasherAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeOperationalStateOperationalStateList() + ~SubscribeAttributeDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66233,10 +66240,10 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66253,34 +66260,34 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalState + * Attribute GeneratedCommandList */ -class ReadOperationalStateOperationalState : public ReadAttribute { +class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { public: - ReadOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadDishwasherAlarmGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalStateOperationalState() + ~ReadDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalState read Error", error); + LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66289,25 +66296,25 @@ class ReadOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeDishwasherAlarmGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalStateOperationalState() + ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66318,10 +66325,10 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66338,34 +66345,34 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalError + * Attribute AcceptedCommandList */ -class ReadOperationalStateOperationalError : public ReadAttribute { +class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { public: - ReadOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadDishwasherAlarmAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalStateOperationalError() + ~ReadDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalError read Error", error); + LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66374,25 +66381,25 @@ class ReadOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeDishwasherAlarmAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalStateOperationalError() + ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66403,10 +66410,10 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66423,34 +66430,34 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadDishwasherAlarmEventList : public ReadAttribute { public: - ReadOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDishwasherAlarmEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalStateGeneratedCommandList() + ~ReadDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState GeneratedCommandList read Error", error); + LogNSError("DishwasherAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66459,25 +66466,25 @@ class ReadOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDishwasherAlarmEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalStateGeneratedCommandList() + ~SubscribeAttributeDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66488,10 +66495,10 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66508,34 +66515,34 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadDishwasherAlarmAttributeList : public ReadAttribute { public: - ReadOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDishwasherAlarmAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalStateAcceptedCommandList() + ~ReadDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState AcceptedCommandList read Error", error); + LogNSError("DishwasherAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66544,25 +66551,25 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDishwasherAlarmAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalStateAcceptedCommandList() + ~SubscribeAttributeDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66573,10 +66580,10 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66593,34 +66600,34 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadOperationalStateEventList : public ReadAttribute { +class ReadDishwasherAlarmFeatureMap : public ReadAttribute { public: - ReadOperationalStateEventList() - : ReadAttribute("event-list") + ReadDishwasherAlarmFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalStateEventList() + ~ReadDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState EventList read Error", error); + LogNSError("DishwasherAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66629,25 +66636,25 @@ class ReadOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDishwasherAlarmFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalStateEventList() + ~SubscribeAttributeDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66658,10 +66665,10 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66678,34 +66685,34 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadOperationalStateAttributeList : public ReadAttribute { +class ReadDishwasherAlarmClusterRevision : public ReadAttribute { public: - ReadOperationalStateAttributeList() - : ReadAttribute("attribute-list") + ReadDishwasherAlarmClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalStateAttributeList() + ~ReadDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState AttributeList read Error", error); + LogNSError("DishwasherAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66714,25 +66721,25 @@ class ReadOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDishwasherAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalStateAttributeList() + ~SubscribeAttributeDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66743,10 +66750,10 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66759,38 +66766,58 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - -/* - * Attribute FeatureMap - */ -class ReadOperationalStateFeatureMap : public ReadAttribute { -public: - ReadOperationalStateFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadOperationalStateFeatureMap() +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenMode | 0x005E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { +public: + ReadMicrowaveOvenModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState FeatureMap read Error", error); + LogNSError("MicrowaveOvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66799,25 +66826,25 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMicrowaveOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeOperationalStateFeatureMap() + ~SubscribeAttributeMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66828,10 +66855,10 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66848,34 +66875,34 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute CurrentMode */ -class ReadOperationalStateClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { public: - ReadOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadMicrowaveOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadOperationalStateClusterRevision() + ~ReadMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState ClusterRevision read Error", error); + LogNSError("MicrowaveOvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66884,25 +66911,25 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeMicrowaveOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeOperationalStateClusterRevision() + ~SubscribeAttributeMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::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); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66913,10 +66940,10 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66929,277 +66956,123 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster RvcOperationalState | 0x0061 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command Pause + * Attribute GeneratedCommandList */ -class RvcOperationalStatePause : public ClusterCommand { +class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { public: - RvcOperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadMicrowaveOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams 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 pauseWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class RvcOperationalStateStop : public ClusterCommand { -public: - RvcOperationalStateStop() - : ClusterCommand("stop") + ~ReadMicrowaveOvenModeGeneratedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStopParams 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 stopWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class RvcOperationalStateStart : public ClusterCommand { +class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { public: - RvcOperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStartParams 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 startWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Resume - */ -class RvcOperationalStateResume : public ClusterCommand { -public: - RvcOperationalStateResume() - : ClusterCommand("resume") + ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams 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 resumeWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.GeneratedCommandList 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; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute PhaseList + * Attribute AcceptedCommandList */ -class ReadRvcOperationalStatePhaseList : public ReadAttribute { +class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadRvcOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadMicrowaveOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRvcOperationalStatePhaseList() + ~ReadMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState PhaseList read Error", error); + LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67208,25 +67081,25 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcOperationalStatePhaseList() + ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67237,10 +67110,10 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67257,34 +67130,34 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPhase + * Attribute EventList */ -class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { +class ReadMicrowaveOvenModeEventList : public ReadAttribute { public: - ReadRvcOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadMicrowaveOvenModeEventList() + : ReadAttribute("event-list") { } - ~ReadRvcOperationalStateCurrentPhase() + ~ReadMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CurrentPhase read Error", error); + LogNSError("MicrowaveOvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67293,25 +67166,25 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeMicrowaveOvenModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcOperationalStateCurrentPhase() + ~SubscribeAttributeMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67322,10 +67195,10 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67342,34 +67215,34 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CountdownTime + * Attribute AttributeList */ -class ReadRvcOperationalStateCountdownTime : public ReadAttribute { +class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { public: - ReadRvcOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadMicrowaveOvenModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRvcOperationalStateCountdownTime() + ~ReadMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CountdownTime read Error", error); + LogNSError("MicrowaveOvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67378,25 +67251,25 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeMicrowaveOvenModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcOperationalStateCountdownTime() + ~SubscribeAttributeMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67407,10 +67280,10 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67427,34 +67300,34 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalStateList + * Attribute FeatureMap */ -class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { +class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { public: - ReadRvcOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadMicrowaveOvenModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRvcOperationalStateOperationalStateList() + ~ReadMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalStateList read Error", error); + LogNSError("MicrowaveOvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67463,25 +67336,25 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeMicrowaveOvenModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcOperationalStateOperationalStateList() + ~SubscribeAttributeMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67492,10 +67365,10 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67512,34 +67385,34 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalState + * Attribute ClusterRevision */ -class ReadRvcOperationalStateOperationalState : public ReadAttribute { +class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { public: - ReadRvcOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadMicrowaveOvenModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRvcOperationalStateOperationalState() + ~ReadMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalState read Error", error); + LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67548,25 +67421,25 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeMicrowaveOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcOperationalStateOperationalState() + ~SubscribeAttributeMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67577,10 +67450,10 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67593,38 +67466,194 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenControl | 0x005F | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalError + * Command SetCookingParameters */ -class ReadRvcOperationalStateOperationalError : public ReadAttribute { +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - ReadRvcOperationalStateOperationalError() - : ReadAttribute("operational-error") + MicrowaveOvenControlSetCookingParameters() + : ClusterCommand("set-cooking-parameters") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadRvcOperationalStateOperationalError() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::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); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.cookMode.HasValue()) { + params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; + } else { + params.cookMode = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.cookTime.HasValue()) { + params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; + } else { + params.cookTime = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.powerSetting.HasValue()) { + params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; + } else { + params.powerSetting = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setCookingParametersWithParams: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::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddMoreTime + */ +class MicrowaveOvenControlAddMoreTime : public ClusterCommand { +public: + MicrowaveOvenControlAddMoreTime() + : ClusterCommand("add-more-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::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); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addMoreTimeWithParams: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::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute CookTime + */ +class ReadMicrowaveOvenControlCookTime : public ReadAttribute { +public: + ReadMicrowaveOvenControlCookTime() + : ReadAttribute("cook-time") + { + } + + ~ReadMicrowaveOvenControlCookTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalError read Error", error); + LogNSError("MicrowaveOvenControl CookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67633,25 +67662,25 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeMicrowaveOvenControlCookTime() + : SubscribeAttribute("cook-time") { } - ~SubscribeAttributeRvcOperationalStateOperationalError() + ~SubscribeAttributeMicrowaveOvenControlCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67662,10 +67691,10 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67682,34 +67711,34 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute PowerSetting */ -class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { public: - ReadRvcOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMicrowaveOvenControlPowerSetting() + : ReadAttribute("power-setting") { } - ~ReadRvcOperationalStateGeneratedCommandList() + ~ReadMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl PowerSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67718,25 +67747,25 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMicrowaveOvenControlPowerSetting() + : SubscribeAttribute("power-setting") { } - ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67747,10 +67776,10 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePowerSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67767,34 +67796,34 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute MinPower */ -class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlMinPower : public ReadAttribute { public: - ReadRvcOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMicrowaveOvenControlMinPower() + : ReadAttribute("min-power") { } - ~ReadRvcOperationalStateAcceptedCommandList() + ~ReadMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl MinPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67803,25 +67832,25 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMicrowaveOvenControlMinPower() + : SubscribeAttribute("min-power") { } - ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67832,10 +67861,10 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67852,34 +67881,34 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute MaxPower */ -class ReadRvcOperationalStateEventList : public ReadAttribute { +class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { public: - ReadRvcOperationalStateEventList() - : ReadAttribute("event-list") + ReadMicrowaveOvenControlMaxPower() + : ReadAttribute("max-power") { } - ~ReadRvcOperationalStateEventList() + ~ReadMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState EventList read Error", error); + LogNSError("MicrowaveOvenControl MaxPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67888,25 +67917,25 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMicrowaveOvenControlMaxPower() + : SubscribeAttribute("max-power") { } - ~SubscribeAttributeRvcOperationalStateEventList() + ~SubscribeAttributeMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67917,10 +67946,10 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67937,34 +67966,34 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute PowerStep */ -class ReadRvcOperationalStateAttributeList : public ReadAttribute { +class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { public: - ReadRvcOperationalStateAttributeList() - : ReadAttribute("attribute-list") + ReadMicrowaveOvenControlPowerStep() + : ReadAttribute("power-step") { } - ~ReadRvcOperationalStateAttributeList() + ~ReadMicrowaveOvenControlPowerStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AttributeList read Error", error); + LogNSError("MicrowaveOvenControl PowerStep read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67973,25 +68002,25 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeMicrowaveOvenControlPowerStep() + : SubscribeAttribute("power-step") { } - ~SubscribeAttributeRvcOperationalStateAttributeList() + ~SubscribeAttributeMicrowaveOvenControlPowerStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68002,10 +68031,10 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePowerStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68022,34 +68051,34 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadRvcOperationalStateFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateFeatureMap() - : ReadAttribute("feature-map") + ReadMicrowaveOvenControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRvcOperationalStateFeatureMap() + ~ReadMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState FeatureMap read Error", error); + LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68058,25 +68087,25 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcOperationalStateFeatureMap() + ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68087,10 +68116,10 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68107,34 +68136,34 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadRvcOperationalStateClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadMicrowaveOvenControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRvcOperationalStateClusterRevision() + ~ReadMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState ClusterRevision read Error", error); + LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68143,25 +68172,25 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcOperationalStateClusterRevision() + ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68172,10 +68201,10 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68188,110 +68217,38 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster HepaFilterMonitoring | 0x0071 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * LastChangedTime | 0x0004 | -| * ReplacementProductList | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResetCondition - */ -class HepaFilterMonitoringResetCondition : public ClusterCommand { -public: - HepaFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRHEPAFilterMonitoringClusterResetConditionParams 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 resetConditionWithParams: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 /* - * Attribute Condition + * Attribute EventList */ -class ReadHepaFilterMonitoringCondition : public ReadAttribute { +class ReadMicrowaveOvenControlEventList : public ReadAttribute { public: - ReadHepaFilterMonitoringCondition() - : ReadAttribute("condition") + ReadMicrowaveOvenControlEventList() + : ReadAttribute("event-list") { } - ~ReadHepaFilterMonitoringCondition() + ~ReadMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring Condition read Error", error); + LogNSError("MicrowaveOvenControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68300,25 +68257,25 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringCondition() - : SubscribeAttribute("condition") + SubscribeAttributeMicrowaveOvenControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeHepaFilterMonitoringCondition() + ~SubscribeAttributeMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68329,10 +68286,10 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68349,34 +68306,34 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute DegradationDirection + * Attribute AttributeList */ -class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { public: - ReadHepaFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadMicrowaveOvenControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadHepaFilterMonitoringDegradationDirection() + ~ReadMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + LogNSError("MicrowaveOvenControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68385,25 +68342,25 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + SubscribeAttributeMicrowaveOvenControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeHepaFilterMonitoringDegradationDirection() + ~SubscribeAttributeMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68414,10 +68371,10 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68434,34 +68391,34 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute ChangeIndication + * Attribute FeatureMap */ -class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { +class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { public: - ReadHepaFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadMicrowaveOvenControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadHepaFilterMonitoringChangeIndication() + ~ReadMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + LogNSError("MicrowaveOvenControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68470,25 +68427,25 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeMicrowaveOvenControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeHepaFilterMonitoringChangeIndication() + ~SubscribeAttributeMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68499,10 +68456,10 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68519,34 +68476,34 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute InPlaceIndicator + * Attribute ClusterRevision */ -class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { public: - ReadHepaFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadMicrowaveOvenControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadHepaFilterMonitoringInPlaceIndicator() + ~ReadMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68555,25 +68512,25 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeMicrowaveOvenControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() + ~SubscribeAttributeMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68584,10 +68541,10 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68601,108 +68558,291 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OperationalState | 0x0060 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ /* - * Attribute LastChangedTime + * Command Pause */ -class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { +class OperationalStatePause : public ClusterCommand { public: - ReadHepaFilterMonitoringLastChangedTime() - : ReadAttribute("last-changed-time") + OperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } - ~ReadHepaFilterMonitoringLastChangedTime() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::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); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterPauseParams 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 pauseWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Stop + */ +class OperationalStateStop : public ClusterCommand { +public: + OperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStopParams 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 stopWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { +/* + * Command Start + */ +class OperationalStateStart : public ClusterCommand { public: - WriteHepaFilterMonitoringLastChangedTime() - : WriteAttribute("last-changed-time") + OperationalStateStart() + : ClusterCommand("start") { - AddArgument("attr-name", "last-changed-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteHepaFilterMonitoringLastChangedTime() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::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); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStartParams 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 startWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Resume + */ +class OperationalStateResume : public ClusterCommand { +public: + OperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterResumeParams 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 resumeWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } + return CHIP_NO_ERROR; + } - [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); +private: +}; + +/* + * Attribute PhaseList + */ +class ReadOperationalStatePhaseList : public ReadAttribute { +public: + ReadOperationalStatePhaseList() + : ReadAttribute("phase-list") + { + } + + ~ReadOperationalStatePhaseList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::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); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { +class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringLastChangedTime() - : SubscribeAttribute("last-changed-time") + SubscribeAttributeOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeHepaFilterMonitoringLastChangedTime() + ~SubscribeAttributeOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68713,10 +68853,10 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastChangedTimeWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68729,38 +68869,35 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ReplacementProductList + * Attribute CurrentPhase */ -class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { +class ReadOperationalStateCurrentPhase : public ReadAttribute { public: - ReadHepaFilterMonitoringReplacementProductList() - : ReadAttribute("replacement-product-list") + ReadOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadHepaFilterMonitoringReplacementProductList() + ~ReadOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); + LogNSError("OperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68769,25 +68906,25 @@ class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringReplacementProductList() - : SubscribeAttribute("replacement-product-list") + SubscribeAttributeOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeHepaFilterMonitoringReplacementProductList() + ~SubscribeAttributeOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68798,10 +68935,10 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReplacementProductListWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68814,38 +68951,35 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute CountdownTime */ -class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadOperationalStateCountdownTime : public ReadAttribute { public: - ReadHepaFilterMonitoringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadHepaFilterMonitoringGeneratedCommandList() + ~ReadOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("OperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68854,25 +68988,25 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() + ~SubscribeAttributeOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68883,10 +69017,10 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68899,38 +69033,35 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute OperationalStateList */ -class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadOperationalStateOperationalStateList : public ReadAttribute { public: - ReadHepaFilterMonitoringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadHepaFilterMonitoringAcceptedCommandList() + ~ReadOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("OperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68939,25 +69070,25 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() + ~SubscribeAttributeOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68968,10 +69099,10 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68984,38 +69115,35 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute OperationalState */ -class ReadHepaFilterMonitoringEventList : public ReadAttribute { +class ReadOperationalStateOperationalState : public ReadAttribute { public: - ReadHepaFilterMonitoringEventList() - : ReadAttribute("event-list") + ReadOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadHepaFilterMonitoringEventList() + ~ReadOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring EventList read Error", error); + LogNSError("OperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69024,25 +69152,25 @@ class ReadHepaFilterMonitoringEventList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeHepaFilterMonitoringEventList() + ~SubscribeAttributeOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69053,10 +69181,10 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69069,38 +69197,35 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute OperationalError */ -class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { +class ReadOperationalStateOperationalError : public ReadAttribute { public: - ReadHepaFilterMonitoringAttributeList() - : ReadAttribute("attribute-list") + ReadOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadHepaFilterMonitoringAttributeList() + ~ReadOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring AttributeList read Error", error); + LogNSError("OperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69109,25 +69234,25 @@ class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeHepaFilterMonitoringAttributeList() + ~SubscribeAttributeOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69138,10 +69263,10 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69154,38 +69279,35 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { +class ReadOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadHepaFilterMonitoringFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadHepaFilterMonitoringFeatureMap() + ~ReadOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + LogNSError("OperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69194,25 +69316,25 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeHepaFilterMonitoringFeatureMap() + ~SubscribeAttributeOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69223,10 +69345,10 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69239,38 +69361,35 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { +class ReadOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadHepaFilterMonitoringClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadHepaFilterMonitoringClusterRevision() + ~ReadOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); + LogNSError("OperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69279,25 +69398,25 @@ class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeHepaFilterMonitoringClusterRevision() + ~SubscribeAttributeOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69308,10 +69427,10 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69324,110 +69443,37 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCondition | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * LastChangedTime | 0x0004 | -| * ReplacementProductList | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResetCondition - */ -class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { -public: - ActivatedCarbonFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams 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 resetConditionWithParams: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 /* - * Attribute Condition + * Attribute EventList */ -class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { +class ReadOperationalStateEventList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringCondition() - : ReadAttribute("condition") + ReadOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadActivatedCarbonFilterMonitoringCondition() + ~ReadOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + LogNSError("OperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69436,25 +69482,25 @@ class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public SubscribeAttribute { +class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringCondition() - : SubscribeAttribute("condition") + SubscribeAttributeOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringCondition() + ~SubscribeAttributeOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69465,10 +69511,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69482,37 +69528,36 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute DegradationDirection + * Attribute AttributeList */ -class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadOperationalStateAttributeList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadActivatedCarbonFilterMonitoringDegradationDirection() + ~ReadOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + LogNSError("OperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69521,25 +69566,25 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + SubscribeAttributeOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() + ~SubscribeAttributeOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69550,10 +69595,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69566,38 +69611,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ChangeIndication + * Attribute FeatureMap */ -class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute { +class ReadOperationalStateFeatureMap : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadActivatedCarbonFilterMonitoringChangeIndication() + ~ReadOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + LogNSError("OperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69606,25 +69648,25 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() + ~SubscribeAttributeOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69635,10 +69677,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69651,38 +69693,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute InPlaceIndicator + * Attribute ClusterRevision */ -class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadOperationalStateClusterRevision : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadActivatedCarbonFilterMonitoringInPlaceIndicator() + ~ReadOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("OperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69691,25 +69730,25 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() + ~SubscribeAttributeOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69720,10 +69759,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69736,38 +69775,267 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster RvcOperationalState | 0x0061 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ + +/* + * Command Pause + */ +class RvcOperationalStatePause : public ClusterCommand { +public: + RvcOperationalStatePause() + : ClusterCommand("pause") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams 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 pauseWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class RvcOperationalStateStop : public ClusterCommand { +public: + RvcOperationalStateStop() + : ClusterCommand("stop") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterStopParams 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 stopWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Command Start + */ +class RvcOperationalStateStart : public ClusterCommand { +public: + RvcOperationalStateStart() + : ClusterCommand("start") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterStartParams 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 startWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute LastChangedTime + * Command Resume */ -class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute { +class RvcOperationalStateResume : public ClusterCommand { public: - ReadActivatedCarbonFilterMonitoringLastChangedTime() - : ReadAttribute("last-changed-time") + RvcOperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } - ~ReadActivatedCarbonFilterMonitoringLastChangedTime() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams 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 resumeWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute PhaseList + */ +class ReadRvcOperationalStatePhaseList : public ReadAttribute { +public: + ReadRvcOperationalStatePhaseList() + : ReadAttribute("phase-list") + { + } + + ~ReadRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); + LogNSError("RVCOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69776,69 +70044,107 @@ class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute } }; -class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribute { +class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { public: - WriteActivatedCarbonFilterMonitoringLastChangedTime() - : WriteAttribute("last-changed-time") + SubscribeAttributeRvcOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { - AddArgument("attr-name", "last-changed-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteActivatedCarbonFilterMonitoringLastChangedTime() + ~SubscribeAttributeRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState 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 subscribeAttributePhaseListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute CurrentPhase + */ +class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { +public: + ReadRvcOperationalStateCurrentPhase() + : ReadAttribute("current-phase") + { + } + + ~ReadRvcOperationalStateCurrentPhase() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() - : SubscribeAttribute("last-changed-time") + SubscribeAttributeRvcOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + ~SubscribeAttributeRvcOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69849,10 +70155,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastChangedTimeWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69865,38 +70171,117 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/* + * Attribute CountdownTime + */ +class ReadRvcOperationalStateCountdownTime : public ReadAttribute { +public: + ReadRvcOperationalStateCountdownTime() + : ReadAttribute("countdown-time") + { + } + + ~ReadRvcOperationalStateCountdownTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState CountdownTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { +public: + SubscribeAttributeRvcOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") + { + } + + ~SubscribeAttributeRvcOperationalStateCountdownTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState 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 subscribeAttributeCountdownTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime 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; + } +}; /* - * Attribute ReplacementProductList + * Attribute OperationalStateList */ -class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAttribute { +class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringReplacementProductList() - : ReadAttribute("replacement-product-list") + ReadRvcOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadActivatedCarbonFilterMonitoringReplacementProductList() + ~ReadRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); + LogNSError("RVCOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69905,25 +70290,25 @@ class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAtt } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() - : SubscribeAttribute("replacement-product-list") + SubscribeAttributeRvcOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() + ~SubscribeAttributeRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69934,10 +70319,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReplacementProductListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69950,38 +70335,199 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/* + * Attribute OperationalState + */ +class ReadRvcOperationalStateOperationalState : public ReadAttribute { +public: + ReadRvcOperationalStateOperationalState() + : ReadAttribute("operational-state") + { + } + + ~ReadRvcOperationalStateOperationalState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState OperationalState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { +public: + SubscribeAttributeRvcOperationalStateOperationalState() + : SubscribeAttribute("operational-state") + { + } + + ~SubscribeAttributeRvcOperationalStateOperationalState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState 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 subscribeAttributeOperationalStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalState 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; + } +}; + +/* + * Attribute OperationalError + */ +class ReadRvcOperationalStateOperationalError : public ReadAttribute { +public: + ReadRvcOperationalStateOperationalError() + : ReadAttribute("operational-error") + { + } + + ~ReadRvcOperationalStateOperationalError() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { +public: + SubscribeAttributeRvcOperationalStateOperationalError() + : SubscribeAttribute("operational-error") + { + } + + ~SubscribeAttributeRvcOperationalStateOperationalError() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::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); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState 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 subscribeAttributeOperationalErrorWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError 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; + } +}; /* * Attribute GeneratedCommandList */ -class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringGeneratedCommandList() + ReadRvcOperationalStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadActivatedCarbonFilterMonitoringGeneratedCommandList() + ~ReadRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("RVCOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69990,25 +70536,25 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() + SubscribeAttributeRvcOperationalStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() + ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70022,7 +70568,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70035,38 +70581,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAcceptedCommandList() + ReadRvcOperationalStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadActivatedCarbonFilterMonitoringAcceptedCommandList() + ~ReadRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("RVCOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70075,25 +70618,25 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() + SubscribeAttributeRvcOperationalStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() + ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70107,7 +70650,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70120,38 +70663,37 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { +class ReadRvcOperationalStateEventList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringEventList() + ReadRvcOperationalStateEventList() : ReadAttribute("event-list") { } - ~ReadActivatedCarbonFilterMonitoringEventList() + ~ReadRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + LogNSError("RVCOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70160,25 +70702,25 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringEventList() + SubscribeAttributeRvcOperationalStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringEventList() + ~SubscribeAttributeRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70192,7 +70734,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70206,37 +70748,36 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { +class ReadRvcOperationalStateAttributeList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAttributeList() + ReadRvcOperationalStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadActivatedCarbonFilterMonitoringAttributeList() + ~ReadRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + LogNSError("RVCOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70245,25 +70786,25 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + SubscribeAttributeRvcOperationalStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + ~SubscribeAttributeRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70277,7 +70818,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70290,38 +70831,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { +class ReadRvcOperationalStateFeatureMap : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringFeatureMap() + ReadRvcOperationalStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadActivatedCarbonFilterMonitoringFeatureMap() + ~ReadRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + LogNSError("RVCOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70330,25 +70868,25 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + SubscribeAttributeRvcOperationalStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + ~SubscribeAttributeRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70362,7 +70900,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70375,38 +70913,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute { +class ReadRvcOperationalStateClusterRevision : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringClusterRevision() + ReadRvcOperationalStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadActivatedCarbonFilterMonitoringClusterRevision() + ~ReadRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + LogNSError("RVCOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70415,25 +70950,25 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + SubscribeAttributeRvcOperationalStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + ~SubscribeAttributeRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70447,7 +70982,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70460,69 +70995,20 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | +| Cluster HepaFilterMonitoring | 0x0071 | |------------------------------------------------------------------------------| | Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -| * UnboltDoor | 0x27 | +| * ResetCondition | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * LastChangedTime | 0x0004 | +| * ReplacementProductList | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -70531,1098 +71017,15853 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command LockDoor + * Command ResetCondition */ -class DoorLockLockDoor : public ClusterCommand { +class HepaFilterMonitoringResetCondition : public ClusterCommand { public: - DoorLockLockDoor() - : ClusterCommand("lock-door") + HepaFilterMonitoringResetCondition() + : ClusterCommand("reset-condition") { - AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster lockDoorWithParams: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); - } - }]; + [cluster resetConditionWithParams: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::DoorLock::Commands::LockDoor::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Command UnlockDoor + * Attribute Condition */ -class DoorLockUnlockDoor : public ClusterCommand { +class ReadHepaFilterMonitoringCondition : public ReadAttribute { public: - DoorLockUnlockDoor() - : ClusterCommand("unlock-door") + ReadHepaFilterMonitoringCondition() + : ReadAttribute("condition") + { + } + + ~ReadHepaFilterMonitoringCondition() { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringCondition() + : SubscribeAttribute("condition") + { + } + + ~SubscribeAttributeHepaFilterMonitoringCondition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeConditionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.Condition 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 DegradationDirection + */ +class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { +public: + ReadHepaFilterMonitoringDegradationDirection() + : ReadAttribute("degradation-direction") + { + } + + ~ReadHepaFilterMonitoringDegradationDirection() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringDegradationDirection() + : SubscribeAttribute("degradation-direction") + { + } + + ~SubscribeAttributeHepaFilterMonitoringDegradationDirection() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeDegradationDirectionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.DegradationDirection 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 ChangeIndication + */ +class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { +public: + ReadHepaFilterMonitoringChangeIndication() + : ReadAttribute("change-indication") + { + } + + ~ReadHepaFilterMonitoringChangeIndication() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringChangeIndication() + : SubscribeAttribute("change-indication") + { + } + + ~SubscribeAttributeHepaFilterMonitoringChangeIndication() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeChangeIndicationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ChangeIndication 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 InPlaceIndicator + */ +class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { +public: + ReadHepaFilterMonitoringInPlaceIndicator() + : ReadAttribute("in-place-indicator") + { + } + + ~ReadHepaFilterMonitoringInPlaceIndicator() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() + : SubscribeAttribute("in-place-indicator") + { + } + + ~SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeInPlaceIndicatorWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.InPlaceIndicator 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 LastChangedTime + */ +class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { +public: + ReadHepaFilterMonitoringLastChangedTime() + : ReadAttribute("last-changed-time") + { + } + + ~ReadHepaFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { +public: + WriteHepaFilterMonitoringLastChangedTime() + : WriteAttribute("last-changed-time") + { + AddArgument("attr-name", "last-changed-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteHepaFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringLastChangedTime() + : SubscribeAttribute("last-changed-time") + { + } + + ~SubscribeAttributeHepaFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeLastChangedTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.LastChangedTime 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 ReplacementProductList + */ +class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { +public: + ReadHepaFilterMonitoringReplacementProductList() + : ReadAttribute("replacement-product-list") + { + } + + ~ReadHepaFilterMonitoringReplacementProductList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringReplacementProductList() + : SubscribeAttribute("replacement-product-list") + { + } + + ~SubscribeAttributeHepaFilterMonitoringReplacementProductList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeReplacementProductListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ReplacementProductList 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 + */ +class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { +public: + ReadHepaFilterMonitoringGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadHepaFilterMonitoringGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { +public: + ReadHepaFilterMonitoringAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadHepaFilterMonitoringAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.AcceptedCommandList 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 EventList + */ +class ReadHepaFilterMonitoringEventList : public ReadAttribute { +public: + ReadHepaFilterMonitoringEventList() + : ReadAttribute("event-list") + { + } + + ~ReadHepaFilterMonitoringEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeHepaFilterMonitoringEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.EventList 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 AttributeList + */ +class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { +public: + ReadHepaFilterMonitoringAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadHepaFilterMonitoringAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeHepaFilterMonitoringAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.AttributeList 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 FeatureMap + */ +class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { +public: + ReadHepaFilterMonitoringFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadHepaFilterMonitoringFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeHepaFilterMonitoringFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.FeatureMap 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 ClusterRevision + */ +class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { +public: + ReadHepaFilterMonitoringClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadHepaFilterMonitoringClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeHepaFilterMonitoringClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * LastChangedTime | 0x0004 | +| * ReplacementProductList | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResetCondition + */ +class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { +public: + ActivatedCarbonFilterMonitoringResetCondition() + : ClusterCommand("reset-condition") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams 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 resetConditionWithParams: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 + +/* + * Attribute Condition + */ +class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringCondition() + : ReadAttribute("condition") + { + } + + ~ReadActivatedCarbonFilterMonitoringCondition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringCondition() + : SubscribeAttribute("condition") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringCondition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeConditionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.Condition 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 DegradationDirection + */ +class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringDegradationDirection() + : ReadAttribute("degradation-direction") + { + } + + ~ReadActivatedCarbonFilterMonitoringDegradationDirection() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() + : SubscribeAttribute("degradation-direction") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeDegradationDirectionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection 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 ChangeIndication + */ +class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringChangeIndication() + : ReadAttribute("change-indication") + { + } + + ~ReadActivatedCarbonFilterMonitoringChangeIndication() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() + : SubscribeAttribute("change-indication") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeChangeIndicationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication 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 InPlaceIndicator + */ +class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringInPlaceIndicator() + : ReadAttribute("in-place-indicator") + { + } + + ~ReadActivatedCarbonFilterMonitoringInPlaceIndicator() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() + : SubscribeAttribute("in-place-indicator") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeInPlaceIndicatorWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator 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 LastChangedTime + */ +class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringLastChangedTime() + : ReadAttribute("last-changed-time") + { + } + + ~ReadActivatedCarbonFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribute { +public: + WriteActivatedCarbonFilterMonitoringLastChangedTime() + : WriteAttribute("last-changed-time") + { + AddArgument("attr-name", "last-changed-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteActivatedCarbonFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + : SubscribeAttribute("last-changed-time") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeLastChangedTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime 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 ReplacementProductList + */ +class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringReplacementProductList() + : ReadAttribute("replacement-product-list") + { + } + + ~ReadActivatedCarbonFilterMonitoringReplacementProductList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() + : SubscribeAttribute("replacement-product-list") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeReplacementProductListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList 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 + */ +class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadActivatedCarbonFilterMonitoringGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadActivatedCarbonFilterMonitoringAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList 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 EventList + */ +class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringEventList() + : ReadAttribute("event-list") + { + } + + ~ReadActivatedCarbonFilterMonitoringEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.EventList 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 AttributeList + */ +class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadActivatedCarbonFilterMonitoringAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList 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 FeatureMap + */ +class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadActivatedCarbonFilterMonitoringFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap 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 ClusterRevision + */ +class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute { +public: + ReadActivatedCarbonFilterMonitoringClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadActivatedCarbonFilterMonitoringClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster BooleanStateConfiguration | 0x0080 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SuppressAlarm | 0x00 | +| * EnableDisableAlarm | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentSensitivityLevel | 0x0000 | +| * SupportedSensitivityLevels | 0x0001 | +| * DefaultSensitivityLevel | 0x0002 | +| * AlarmsActive | 0x0003 | +| * AlarmsSuppressed | 0x0004 | +| * AlarmsEnabled | 0x0005 | +| * AlarmsSupported | 0x0006 | +| * SensorFault | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AlarmsStateChanged | 0x0000 | +| * SensorFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SuppressAlarm + */ +class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { +public: + BooleanStateConfigurationSuppressAlarm() + : ClusterCommand("suppress-alarm") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster suppressAlarmWithParams: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::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command EnableDisableAlarm + */ +class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { +public: + BooleanStateConfigurationEnableDisableAlarm() + : ClusterCommand("enable-disable-alarm") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarmsToEnableDisable = [NSNumber numberWithUnsignedChar:mRequest.alarmsToEnableDisable.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableDisableAlarmWithParams: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::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute CurrentSensitivityLevel + */ +class ReadBooleanStateConfigurationCurrentSensitivityLevel : public ReadAttribute { +public: + ReadBooleanStateConfigurationCurrentSensitivityLevel() + : ReadAttribute("current-sensitivity-level") + { + } + + ~ReadBooleanStateConfigurationCurrentSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBooleanStateConfigurationCurrentSensitivityLevel : public WriteAttribute { +public: + WriteBooleanStateConfigurationCurrentSensitivityLevel() + : WriteAttribute("current-sensitivity-level") + { + AddArgument("attr-name", "current-sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBooleanStateConfigurationCurrentSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeCurrentSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() + : SubscribeAttribute("current-sensitivity-level") + { + } + + ~SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeCurrentSensitivityLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel 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 SupportedSensitivityLevels + */ +class ReadBooleanStateConfigurationSupportedSensitivityLevels : public ReadAttribute { +public: + ReadBooleanStateConfigurationSupportedSensitivityLevels() + : ReadAttribute("supported-sensitivity-levels") + { + } + + ~ReadBooleanStateConfigurationSupportedSensitivityLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedSensitivityLevelsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration SupportedSensitivityLevels read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() + : SubscribeAttribute("supported-sensitivity-levels") + { + } + + ~SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeSupportedSensitivityLevelsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels 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 DefaultSensitivityLevel + */ +class ReadBooleanStateConfigurationDefaultSensitivityLevel : public ReadAttribute { +public: + ReadBooleanStateConfigurationDefaultSensitivityLevel() + : ReadAttribute("default-sensitivity-level") + { + } + + ~ReadBooleanStateConfigurationDefaultSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration DefaultSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() + : SubscribeAttribute("default-sensitivity-level") + { + } + + ~SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeDefaultSensitivityLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel 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 AlarmsActive + */ +class ReadBooleanStateConfigurationAlarmsActive : public ReadAttribute { +public: + ReadBooleanStateConfigurationAlarmsActive() + : ReadAttribute("alarms-active") + { + } + + ~ReadBooleanStateConfigurationAlarmsActive() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsActive read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsActive() + : SubscribeAttribute("alarms-active") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsActive() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAlarmsActiveWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsActive 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 AlarmsSuppressed + */ +class ReadBooleanStateConfigurationAlarmsSuppressed : public ReadAttribute { +public: + ReadBooleanStateConfigurationAlarmsSuppressed() + : ReadAttribute("alarms-suppressed") + { + } + + ~ReadBooleanStateConfigurationAlarmsSuppressed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSuppressedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsSuppressed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() + : SubscribeAttribute("alarms-suppressed") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAlarmsSuppressedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed 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 AlarmsEnabled + */ +class ReadBooleanStateConfigurationAlarmsEnabled : public ReadAttribute { +public: + ReadBooleanStateConfigurationAlarmsEnabled() + : ReadAttribute("alarms-enabled") + { + } + + ~ReadBooleanStateConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() + : SubscribeAttribute("alarms-enabled") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAlarmsEnabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsEnabled 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 AlarmsSupported + */ +class ReadBooleanStateConfigurationAlarmsSupported : public ReadAttribute { +public: + ReadBooleanStateConfigurationAlarmsSupported() + : ReadAttribute("alarms-supported") + { + } + + ~ReadBooleanStateConfigurationAlarmsSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsSupported() + : SubscribeAttribute("alarms-supported") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAlarmsSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSupported 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 SensorFault + */ +class ReadBooleanStateConfigurationSensorFault : public ReadAttribute { +public: + ReadBooleanStateConfigurationSensorFault() + : ReadAttribute("sensor-fault") + { + } + + ~ReadBooleanStateConfigurationSensorFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSensorFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration SensorFault read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationSensorFault() + : SubscribeAttribute("sensor-fault") + { + } + + ~SubscribeAttributeBooleanStateConfigurationSensorFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeSensorFaultWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SensorFault 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 + */ +class ReadBooleanStateConfigurationGeneratedCommandList : public ReadAttribute { +public: + ReadBooleanStateConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadBooleanStateConfigurationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadBooleanStateConfigurationAcceptedCommandList : public ReadAttribute { +public: + ReadBooleanStateConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadBooleanStateConfigurationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AcceptedCommandList 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 EventList + */ +class ReadBooleanStateConfigurationEventList : public ReadAttribute { +public: + ReadBooleanStateConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBooleanStateConfigurationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBooleanStateConfigurationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.EventList 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 AttributeList + */ +class ReadBooleanStateConfigurationAttributeList : public ReadAttribute { +public: + ReadBooleanStateConfigurationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadBooleanStateConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AttributeList 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 FeatureMap + */ +class ReadBooleanStateConfigurationFeatureMap : public ReadAttribute { +public: + ReadBooleanStateConfigurationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadBooleanStateConfigurationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeBooleanStateConfigurationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.FeatureMap 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 ClusterRevision + */ +class ReadBooleanStateConfigurationClusterRevision : public ReadAttribute { +public: + ReadBooleanStateConfigurationClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadBooleanStateConfigurationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeBooleanStateConfigurationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ValveConfigurationAndControl | 0x0081 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Open | 0x00 | +| * Close | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OpenDuration | 0x0000 | +| * DefaultOpenDuration | 0x0001 | +| * AutoCloseTime | 0x0002 | +| * RemainingDuration | 0x0003 | +| * CurrentState | 0x0004 | +| * TargetState | 0x0005 | +| * CurrentLevel | 0x0006 | +| * TargetLevel | 0x0007 | +| * DefaultOpenLevel | 0x0008 | +| * ValveFault | 0x0009 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ValveStateChanged | 0x0000 | +| * ValveFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command Open + */ +class ValveConfigurationAndControlOpen : public ClusterCommand { +public: + ValveConfigurationAndControlOpen() + : ClusterCommand("open") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetLevel", 0, UINT8_MAX, &mRequest.targetLevel); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.openDuration.HasValue()) { + if (mRequest.openDuration.Value().IsNull()) { + params.openDuration = nil; + } else { + params.openDuration = [NSNumber numberWithUnsignedInt:mRequest.openDuration.Value().Value()]; + } + } else { + params.openDuration = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetLevel.HasValue()) { + params.targetLevel = [NSNumber numberWithUnsignedChar:mRequest.targetLevel.Value()]; + } else { + params.targetLevel = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openWithParams: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::ValveConfigurationAndControl::Commands::Open::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Close + */ +class ValveConfigurationAndControlClose : public ClusterCommand { +public: + ValveConfigurationAndControlClose() + : ClusterCommand("close") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterCloseParams 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 closeWithParams: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 + +/* + * Attribute OpenDuration + */ +class ReadValveConfigurationAndControlOpenDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlOpenDuration() + : ReadAttribute("open-duration") + { + } + + ~ReadValveConfigurationAndControlOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl OpenDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlOpenDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlOpenDuration() + : SubscribeAttribute("open-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeOpenDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenDuration 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 DefaultOpenDuration + */ +class ReadValveConfigurationAndControlDefaultOpenDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlDefaultOpenDuration() + : ReadAttribute("default-open-duration") + { + } + + ~ReadValveConfigurationAndControlDefaultOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl DefaultOpenDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteValveConfigurationAndControlDefaultOpenDuration : public WriteAttribute { +public: + WriteValveConfigurationAndControlDefaultOpenDuration() + : WriteAttribute("default-open-duration") + { + AddArgument("attr-name", "default-open-duration"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteValveConfigurationAndControlDefaultOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeDefaultOpenDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl DefaultOpenDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() + : SubscribeAttribute("default-open-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeDefaultOpenDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration 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 AutoCloseTime + */ +class ReadValveConfigurationAndControlAutoCloseTime : public ReadAttribute { +public: + ReadValveConfigurationAndControlAutoCloseTime() + : ReadAttribute("auto-close-time") + { + } + + ~ReadValveConfigurationAndControlAutoCloseTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAutoCloseTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AutoCloseTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + : SubscribeAttribute("auto-close-time") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAutoCloseTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AutoCloseTime 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 RemainingDuration + */ +class ReadValveConfigurationAndControlRemainingDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlRemainingDuration() + : ReadAttribute("remaining-duration") + { + } + + ~ReadValveConfigurationAndControlRemainingDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl RemainingDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlRemainingDuration() + : SubscribeAttribute("remaining-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlRemainingDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeRemainingDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.RemainingDuration 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 CurrentState + */ +class ReadValveConfigurationAndControlCurrentState : public ReadAttribute { +public: + ReadValveConfigurationAndControlCurrentState() + : ReadAttribute("current-state") + { + } + + ~ReadValveConfigurationAndControlCurrentState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl CurrentState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlCurrentState : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlCurrentState() + : SubscribeAttribute("current-state") + { + } + + ~SubscribeAttributeValveConfigurationAndControlCurrentState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeCurrentStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentState 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 TargetState + */ +class ReadValveConfigurationAndControlTargetState : public ReadAttribute { +public: + ReadValveConfigurationAndControlTargetState() + : ReadAttribute("target-state") + { + } + + ~ReadValveConfigurationAndControlTargetState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl TargetState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlTargetState : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlTargetState() + : SubscribeAttribute("target-state") + { + } + + ~SubscribeAttributeValveConfigurationAndControlTargetState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeTargetStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState 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 CurrentLevel + */ +class ReadValveConfigurationAndControlCurrentLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlCurrentLevel() + : ReadAttribute("current-level") + { + } + + ~ReadValveConfigurationAndControlCurrentLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl CurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlCurrentLevel() + : SubscribeAttribute("current-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlCurrentLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeCurrentLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel 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 TargetLevel + */ +class ReadValveConfigurationAndControlTargetLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlTargetLevel() + : ReadAttribute("target-level") + { + } + + ~ReadValveConfigurationAndControlTargetLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl TargetLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlTargetLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlTargetLevel() + : SubscribeAttribute("target-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlTargetLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeTargetLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel 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 DefaultOpenLevel + */ +class ReadValveConfigurationAndControlDefaultOpenLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlDefaultOpenLevel() + : ReadAttribute("default-open-level") + { + } + + ~ReadValveConfigurationAndControlDefaultOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultOpenLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl DefaultOpenLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteValveConfigurationAndControlDefaultOpenLevel : public WriteAttribute { +public: + WriteValveConfigurationAndControlDefaultOpenLevel() + : WriteAttribute("default-open-level") + { + AddArgument("attr-name", "default-open-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteValveConfigurationAndControlDefaultOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultOpenLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl DefaultOpenLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::Percent mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() + : SubscribeAttribute("default-open-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeDefaultOpenLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel 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 ValveFault + */ +class ReadValveConfigurationAndControlValveFault : public ReadAttribute { +public: + ReadValveConfigurationAndControlValveFault() + : ReadAttribute("valve-fault") + { + } + + ~ReadValveConfigurationAndControlValveFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeValveFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl ValveFault read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlValveFault : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlValveFault() + : SubscribeAttribute("valve-fault") + { + } + + ~SubscribeAttributeValveConfigurationAndControlValveFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeValveFaultWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault 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 + */ +class ReadValveConfigurationAndControlGeneratedCommandList : public ReadAttribute { +public: + ReadValveConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadValveConfigurationAndControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadValveConfigurationAndControlAcceptedCommandList : public ReadAttribute { +public: + ReadValveConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadValveConfigurationAndControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList 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 EventList + */ +class ReadValveConfigurationAndControlEventList : public ReadAttribute { +public: + ReadValveConfigurationAndControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadValveConfigurationAndControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList 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 AttributeList + */ +class ReadValveConfigurationAndControlAttributeList : public ReadAttribute { +public: + ReadValveConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadValveConfigurationAndControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList 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 FeatureMap + */ +class ReadValveConfigurationAndControlFeatureMap : public ReadAttribute { +public: + ReadValveConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadValveConfigurationAndControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeValveConfigurationAndControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.FeatureMap 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 ClusterRevision + */ +class ReadValveConfigurationAndControlClusterRevision : public ReadAttribute { +public: + ReadValveConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadValveConfigurationAndControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeValveConfigurationAndControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalEnergyMeasurement | 0x0091 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Accuracy | 0x0000 | +| * CumulativeEnergyImported | 0x0001 | +| * CumulativeEnergyExported | 0x0002 | +| * PeriodicEnergyImported | 0x0003 | +| * PeriodicEnergyExported | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * CumulativeEnergyMeasured | 0x0000 | +| * PeriodicEnergyMeasured | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute Accuracy + */ +class ReadElectricalEnergyMeasurementAccuracy : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementAccuracy() + : ReadAttribute("accuracy") + { + } + + ~ReadElectricalEnergyMeasurementAccuracy() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAccuracyWithCompletion:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.Accuracy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement Accuracy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementAccuracy : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementAccuracy() + : SubscribeAttribute("accuracy") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementAccuracy() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeAccuracyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.Accuracy 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 CumulativeEnergyImported + */ +class ReadElectricalEnergyMeasurementCumulativeEnergyImported : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementCumulativeEnergyImported() + : ReadAttribute("cumulative-energy-imported") + { + } + + ~ReadElectricalEnergyMeasurementCumulativeEnergyImported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCumulativeEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement CumulativeEnergyImported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() + : SubscribeAttribute("cumulative-energy-imported") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeCumulativeEnergyImportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported 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 CumulativeEnergyExported + */ +class ReadElectricalEnergyMeasurementCumulativeEnergyExported : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementCumulativeEnergyExported() + : ReadAttribute("cumulative-energy-exported") + { + } + + ~ReadElectricalEnergyMeasurementCumulativeEnergyExported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCumulativeEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement CumulativeEnergyExported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() + : SubscribeAttribute("cumulative-energy-exported") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeCumulativeEnergyExportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported 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 PeriodicEnergyImported + */ +class ReadElectricalEnergyMeasurementPeriodicEnergyImported : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementPeriodicEnergyImported() + : ReadAttribute("periodic-energy-imported") + { + } + + ~ReadElectricalEnergyMeasurementPeriodicEnergyImported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeriodicEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement PeriodicEnergyImported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() + : SubscribeAttribute("periodic-energy-imported") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributePeriodicEnergyImportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported 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 PeriodicEnergyExported + */ +class ReadElectricalEnergyMeasurementPeriodicEnergyExported : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementPeriodicEnergyExported() + : ReadAttribute("periodic-energy-exported") + { + } + + ~ReadElectricalEnergyMeasurementPeriodicEnergyExported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeriodicEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement PeriodicEnergyExported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() + : SubscribeAttribute("periodic-energy-exported") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributePeriodicEnergyExportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported 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 + */ +class ReadElectricalEnergyMeasurementGeneratedCommandList : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadElectricalEnergyMeasurementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadElectricalEnergyMeasurementAcceptedCommandList : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadElectricalEnergyMeasurementAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList 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 EventList + */ +class ReadElectricalEnergyMeasurementEventList : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementEventList() + : ReadAttribute("event-list") + { + } + + ~ReadElectricalEnergyMeasurementEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementEventList : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.EventList 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 AttributeList + */ +class ReadElectricalEnergyMeasurementAttributeList : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadElectricalEnergyMeasurementAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AttributeList 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 FeatureMap + */ +class ReadElectricalEnergyMeasurementFeatureMap : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadElectricalEnergyMeasurementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.FeatureMap 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 ClusterRevision + */ +class ReadElectricalEnergyMeasurementClusterRevision : public ReadAttribute { +public: + ReadElectricalEnergyMeasurementClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadElectricalEnergyMeasurementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ElectricalEnergyMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeElectricalEnergyMeasurementClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeElectricalEnergyMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeElectricalEnergyMeasurementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster DemandResponseLoadControl | 0x0096 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterLoadControlProgramRequest | 0x00 | +| * UnregisterLoadControlProgramRequest | 0x01 | +| * AddLoadControlEventRequest | 0x02 | +| * RemoveLoadControlEventRequest | 0x03 | +| * ClearLoadControlEventsRequest | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LoadControlPrograms | 0x0000 | +| * NumberOfLoadControlPrograms | 0x0001 | +| * Events | 0x0002 | +| * ActiveEvents | 0x0003 | +| * NumberOfEventsPerProgram | 0x0004 | +| * NumberOfTransitions | 0x0005 | +| * DefaultRandomStart | 0x0006 | +| * DefaultRandomDuration | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * LoadControlEventStatusChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command RegisterLoadControlProgramRequest + */ +class DemandResponseLoadControlRegisterLoadControlProgramRequest : public ClusterCommand { +public: + DemandResponseLoadControlRegisterLoadControlProgramRequest() + : ClusterCommand("register-load-control-program-request") + , mComplex_LoadControlProgram(&mRequest.loadControlProgram) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("LoadControlProgram", &mComplex_LoadControlProgram); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; + params.loadControlProgram.programID = [NSData dataWithBytes:mRequest.loadControlProgram.programID.data() length:mRequest.loadControlProgram.programID.size()]; + params.loadControlProgram.name = [[NSString alloc] initWithBytes:mRequest.loadControlProgram.name.data() length:mRequest.loadControlProgram.name.size() encoding:NSUTF8StringEncoding]; + if (mRequest.loadControlProgram.enrollmentGroup.IsNull()) { + params.loadControlProgram.enrollmentGroup = nil; + } else { + params.loadControlProgram.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.enrollmentGroup.Value()]; + } + if (mRequest.loadControlProgram.randomStartMinutes.IsNull()) { + params.loadControlProgram.randomStartMinutes = nil; + } else { + params.loadControlProgram.randomStartMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomStartMinutes.Value()]; + } + if (mRequest.loadControlProgram.randomDurationMinutes.IsNull()) { + params.loadControlProgram.randomDurationMinutes = nil; + } else { + params.loadControlProgram.randomDurationMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomDurationMinutes.Value()]; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster registerLoadControlProgramRequestWithParams: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::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type mRequest; + TypedComplexArgument mComplex_LoadControlProgram; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnregisterLoadControlProgramRequest + */ +class DemandResponseLoadControlUnregisterLoadControlProgramRequest : public ClusterCommand { +public: + DemandResponseLoadControlUnregisterLoadControlProgramRequest() + : ClusterCommand("unregister-load-control-program-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("LoadControlProgramID", &mRequest.loadControlProgramID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.loadControlProgramID = [NSData dataWithBytes:mRequest.loadControlProgramID.data() length:mRequest.loadControlProgramID.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unregisterLoadControlProgramRequestWithParams: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::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddLoadControlEventRequest + */ +class DemandResponseLoadControlAddLoadControlEventRequest : public ClusterCommand { +public: + DemandResponseLoadControlAddLoadControlEventRequest() + : ClusterCommand("add-load-control-event-request") + , mComplex_Event(&mRequest.event) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Event", &mComplex_Event); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; + params.event.eventID = [NSData dataWithBytes:mRequest.event.eventID.data() length:mRequest.event.eventID.size()]; + if (mRequest.event.programID.IsNull()) { + params.event.programID = nil; + } else { + params.event.programID = [NSData dataWithBytes:mRequest.event.programID.Value().data() length:mRequest.event.programID.Value().size()]; + } + params.event.control = [NSNumber numberWithUnsignedShort:mRequest.event.control.Raw()]; + params.event.deviceClass = [NSNumber numberWithUnsignedInt:mRequest.event.deviceClass.Raw()]; + if (mRequest.event.enrollmentGroup.HasValue()) { + params.event.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.event.enrollmentGroup.Value()]; + } else { + params.event.enrollmentGroup = nil; + } + params.event.criticality = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.event.criticality)]; + if (mRequest.event.startTime.IsNull()) { + params.event.startTime = nil; + } else { + params.event.startTime = [NSNumber numberWithUnsignedInt:mRequest.event.startTime.Value()]; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.event.transitions) { + MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct * newElement_1; + newElement_1 = [MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct new]; + newElement_1.duration = [NSNumber numberWithUnsignedShort:entry_1.duration]; + newElement_1.control = [NSNumber numberWithUnsignedShort:entry_1.control.Raw()]; + if (entry_1.temperatureControl.HasValue()) { + newElement_1.temperatureControl = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; + if (entry_1.temperatureControl.Value().coolingTempOffset.HasValue()) { + if (entry_1.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { + newElement_1.temperatureControl.coolingTempOffset = nil; + } else { + newElement_1.temperatureControl.coolingTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().coolingTempOffset.Value().Value()]; + } + } else { + newElement_1.temperatureControl.coolingTempOffset = nil; + } + if (entry_1.temperatureControl.Value().heatingtTempOffset.HasValue()) { + if (entry_1.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { + newElement_1.temperatureControl.heatingtTempOffset = nil; + } else { + newElement_1.temperatureControl.heatingtTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().heatingtTempOffset.Value().Value()]; + } + } else { + newElement_1.temperatureControl.heatingtTempOffset = nil; + } + if (entry_1.temperatureControl.Value().coolingTempSetpoint.HasValue()) { + if (entry_1.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { + newElement_1.temperatureControl.coolingTempSetpoint = nil; + } else { + newElement_1.temperatureControl.coolingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().coolingTempSetpoint.Value().Value()]; + } + } else { + newElement_1.temperatureControl.coolingTempSetpoint = nil; + } + if (entry_1.temperatureControl.Value().heatingTempSetpoint.HasValue()) { + if (entry_1.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { + newElement_1.temperatureControl.heatingTempSetpoint = nil; + } else { + newElement_1.temperatureControl.heatingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().heatingTempSetpoint.Value().Value()]; + } + } else { + newElement_1.temperatureControl.heatingTempSetpoint = nil; + } + } else { + newElement_1.temperatureControl = nil; + } + if (entry_1.averageLoadControl.HasValue()) { + newElement_1.averageLoadControl = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; + newElement_1.averageLoadControl.loadAdjustment = [NSNumber numberWithChar:entry_1.averageLoadControl.Value().loadAdjustment]; + } else { + newElement_1.averageLoadControl = nil; + } + if (entry_1.dutyCycleControl.HasValue()) { + newElement_1.dutyCycleControl = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; + newElement_1.dutyCycleControl.dutyCycle = [NSNumber numberWithUnsignedChar:entry_1.dutyCycleControl.Value().dutyCycle]; + } else { + newElement_1.dutyCycleControl = nil; + } + if (entry_1.powerSavingsControl.HasValue()) { + newElement_1.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; + newElement_1.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_1.powerSavingsControl.Value().powerSavings]; + } else { + newElement_1.powerSavingsControl = nil; + } + if (entry_1.heatingSourceControl.HasValue()) { + newElement_1.heatingSourceControl = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; + newElement_1.heatingSourceControl.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.heatingSourceControl.Value().heatingSource)]; + } else { + newElement_1.heatingSourceControl = nil; + } + [array_1 addObject:newElement_1]; + } + params.event.transitions = array_1; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addLoadControlEventRequestWithParams: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::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type mRequest; + TypedComplexArgument mComplex_Event; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveLoadControlEventRequest + */ +class DemandResponseLoadControlRemoveLoadControlEventRequest : public ClusterCommand { +public: + DemandResponseLoadControlRemoveLoadControlEventRequest() + : ClusterCommand("remove-load-control-event-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("EventID", &mRequest.eventID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("CancelControl", 0, UINT16_MAX, &mRequest.cancelControl); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.eventID = [NSData dataWithBytes:mRequest.eventID.data() length:mRequest.eventID.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cancelControl = [NSNumber numberWithUnsignedShort:mRequest.cancelControl.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeLoadControlEventRequestWithParams: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::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ClearLoadControlEventsRequest + */ +class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCommand { +public: + DemandResponseLoadControlClearLoadControlEventsRequest() + : ClusterCommand("clear-load-control-events-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams 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 clearLoadControlEventsRequestWithParams: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 + +/* + * Attribute LoadControlPrograms + */ +class ReadDemandResponseLoadControlLoadControlPrograms : public ReadAttribute { +public: + ReadDemandResponseLoadControlLoadControlPrograms() + : ReadAttribute("load-control-programs") + { + } + + ~ReadDemandResponseLoadControlLoadControlPrograms() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLoadControlProgramsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.LoadControlPrograms response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl LoadControlPrograms read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlLoadControlPrograms : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() + : SubscribeAttribute("load-control-programs") + { + } + + ~SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeLoadControlProgramsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.LoadControlPrograms 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 NumberOfLoadControlPrograms + */ +class ReadDemandResponseLoadControlNumberOfLoadControlPrograms : public ReadAttribute { +public: + ReadDemandResponseLoadControlNumberOfLoadControlPrograms() + : ReadAttribute("number-of-load-control-programs") + { + } + + ~ReadDemandResponseLoadControlNumberOfLoadControlPrograms() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfLoadControlProgramsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl NumberOfLoadControlPrograms read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() + : SubscribeAttribute("number-of-load-control-programs") + { + } + + ~SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeNumberOfLoadControlProgramsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms 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 Events + */ +class ReadDemandResponseLoadControlEvents : public ReadAttribute { +public: + ReadDemandResponseLoadControlEvents() + : ReadAttribute("events") + { + } + + ~ReadDemandResponseLoadControlEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.Events response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl Events read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlEvents : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlEvents() + : SubscribeAttribute("events") + { + } + + ~SubscribeAttributeDemandResponseLoadControlEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeEventsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.Events 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 ActiveEvents + */ +class ReadDemandResponseLoadControlActiveEvents : public ReadAttribute { +public: + ReadDemandResponseLoadControlActiveEvents() + : ReadAttribute("active-events") + { + } + + ~ReadDemandResponseLoadControlActiveEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ActiveEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl ActiveEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlActiveEvents : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlActiveEvents() + : SubscribeAttribute("active-events") + { + } + + ~SubscribeAttributeDemandResponseLoadControlActiveEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeActiveEventsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ActiveEvents 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 NumberOfEventsPerProgram + */ +class ReadDemandResponseLoadControlNumberOfEventsPerProgram : public ReadAttribute { +public: + ReadDemandResponseLoadControlNumberOfEventsPerProgram() + : ReadAttribute("number-of-events-per-program") + { + } + + ~ReadDemandResponseLoadControlNumberOfEventsPerProgram() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfEventsPerProgramWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl NumberOfEventsPerProgram read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() + : SubscribeAttribute("number-of-events-per-program") + { + } + + ~SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeNumberOfEventsPerProgramWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram 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 NumberOfTransitions + */ +class ReadDemandResponseLoadControlNumberOfTransitions : public ReadAttribute { +public: + ReadDemandResponseLoadControlNumberOfTransitions() + : ReadAttribute("number-of-transitions") + { + } + + ~ReadDemandResponseLoadControlNumberOfTransitions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl NumberOfTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() + : SubscribeAttribute("number-of-transitions") + { + } + + ~SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeNumberOfTransitionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfTransitions 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 DefaultRandomStart + */ +class ReadDemandResponseLoadControlDefaultRandomStart : public ReadAttribute { +public: + ReadDemandResponseLoadControlDefaultRandomStart() + : ReadAttribute("default-random-start") + { + } + + ~ReadDemandResponseLoadControlDefaultRandomStart() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultRandomStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomStart response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl DefaultRandomStart read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDemandResponseLoadControlDefaultRandomStart : public WriteAttribute { +public: + WriteDemandResponseLoadControlDefaultRandomStart() + : WriteAttribute("default-random-start") + { + AddArgument("attr-name", "default-random-start"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDemandResponseLoadControlDefaultRandomStart() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultRandomStartWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DemandResponseLoadControl DefaultRandomStart write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDemandResponseLoadControlDefaultRandomStart : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() + : SubscribeAttribute("default-random-start") + { + } + + ~SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeDefaultRandomStartWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomStart 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 DefaultRandomDuration + */ +class ReadDemandResponseLoadControlDefaultRandomDuration : public ReadAttribute { +public: + ReadDemandResponseLoadControlDefaultRandomDuration() + : ReadAttribute("default-random-duration") + { + } + + ~ReadDemandResponseLoadControlDefaultRandomDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultRandomDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl DefaultRandomDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDemandResponseLoadControlDefaultRandomDuration : public WriteAttribute { +public: + WriteDemandResponseLoadControlDefaultRandomDuration() + : WriteAttribute("default-random-duration") + { + AddArgument("attr-name", "default-random-duration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDemandResponseLoadControlDefaultRandomDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultRandomDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DemandResponseLoadControl DefaultRandomDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() + : SubscribeAttribute("default-random-duration") + { + } + + ~SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeDefaultRandomDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomDuration 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 + */ +class ReadDemandResponseLoadControlGeneratedCommandList : public ReadAttribute { +public: + ReadDemandResponseLoadControlGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadDemandResponseLoadControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadDemandResponseLoadControlAcceptedCommandList : public ReadAttribute { +public: + ReadDemandResponseLoadControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadDemandResponseLoadControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AcceptedCommandList 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 EventList + */ +class ReadDemandResponseLoadControlEventList : public ReadAttribute { +public: + ReadDemandResponseLoadControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadDemandResponseLoadControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeDemandResponseLoadControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.EventList 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 AttributeList + */ +class ReadDemandResponseLoadControlAttributeList : public ReadAttribute { +public: + ReadDemandResponseLoadControlAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadDemandResponseLoadControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeDemandResponseLoadControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AttributeList 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 FeatureMap + */ +class ReadDemandResponseLoadControlFeatureMap : public ReadAttribute { +public: + ReadDemandResponseLoadControlFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadDemandResponseLoadControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeDemandResponseLoadControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.FeatureMap 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 ClusterRevision + */ +class ReadDemandResponseLoadControlClusterRevision : public ReadAttribute { +public: + ReadDemandResponseLoadControlClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadDemandResponseLoadControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DemandResponseLoadControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDemandResponseLoadControlClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeDemandResponseLoadControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster DeviceEnergyManagement | 0x0098 | +|------------------------------------------------------------------------------| +| Commands: | | +| * PowerAdjustRequest | 0x00 | +| * CancelPowerAdjustRequest | 0x01 | +| * StartTimeAdjustRequest | 0x02 | +| * PauseRequest | 0x03 | +| * ResumeRequest | 0x04 | +| * ModifyForecastRequest | 0x05 | +| * RequestConstraintBasedForecast | 0x06 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ESAType | 0x0000 | +| * ESACanGenerate | 0x0001 | +| * ESAState | 0x0002 | +| * AbsMinPower | 0x0003 | +| * AbsMaxPower | 0x0004 | +| * PowerAdjustmentCapability | 0x0005 | +| * Forecast | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * PowerAdjustStart | 0x0000 | +| * PowerAdjustEnd | 0x0001 | +| * Paused | 0x0002 | +| * Resumed | 0x0003 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command PowerAdjustRequest + */ +class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { +public: + DeviceEnergyManagementPowerAdjustRequest() + : ClusterCommand("power-adjust-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Power", INT64_MIN, INT64_MAX, &mRequest.power); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.power = [NSNumber numberWithLongLong:mRequest.power]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster powerAdjustRequestWithParams: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::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelPowerAdjustRequest + */ +class DeviceEnergyManagementCancelPowerAdjustRequest : public ClusterCommand { +public: + DeviceEnergyManagementCancelPowerAdjustRequest() + : ClusterCommand("cancel-power-adjust-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams 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 cancelPowerAdjustRequestWithParams: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 +/* + * Command StartTimeAdjustRequest + */ +class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { +public: + DeviceEnergyManagementStartTimeAdjustRequest() + : ClusterCommand("start-time-adjust-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.requestedStartTime = [NSNumber numberWithUnsignedInt:mRequest.requestedStartTime]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startTimeAdjustRequestWithParams: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::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command PauseRequest + */ +class DeviceEnergyManagementPauseRequest : public ClusterCommand { +public: + DeviceEnergyManagementPauseRequest() + : ClusterCommand("pause-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseRequestWithParams: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::DeviceEnergyManagement::Commands::PauseRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResumeRequest + */ +class DeviceEnergyManagementResumeRequest : public ClusterCommand { +public: + DeviceEnergyManagementResumeRequest() + : ClusterCommand("resume-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterResumeRequestParams 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 resumeRequestWithParams: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 +/* + * Command ModifyForecastRequest + */ +class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { +public: + DeviceEnergyManagementModifyForecastRequest() + : ClusterCommand("modify-forecast-request") + , mComplex_SlotAdjustments(&mRequest.slotAdjustments) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ForecastId", 0, UINT32_MAX, &mRequest.forecastId); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.forecastId = [NSNumber numberWithUnsignedInt:mRequest.forecastId]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.slotAdjustments) { + MTRDeviceEnergyManagementClusterSlotAdjustmentStruct * newElement_0; + newElement_0 = [MTRDeviceEnergyManagementClusterSlotAdjustmentStruct new]; + newElement_0.slotIndex = [NSNumber numberWithUnsignedChar:entry_0.slotIndex]; + newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower]; + newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; + [array_0 addObject:newElement_0]; + } + params.slotAdjustments = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster modifyForecastRequestWithParams: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::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type mRequest; + TypedComplexArgument> mComplex_SlotAdjustments; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RequestConstraintBasedForecast + */ +class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterCommand { +public: + DeviceEnergyManagementRequestConstraintBasedForecast() + : ClusterCommand("request-constraint-based-forecast") + , mComplex_Constraints(&mRequest.constraints) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Constraints", &mComplex_Constraints); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.constraints) { + MTRDeviceEnergyManagementClusterConstraintsStruct * newElement_0; + newElement_0 = [MTRDeviceEnergyManagementClusterConstraintsStruct new]; + newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime]; + newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; + if (entry_0.nominalPower.HasValue()) { + newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower.Value()]; + } else { + newElement_0.nominalPower = nil; + } + if (entry_0.maximumEnergy.HasValue()) { + newElement_0.maximumEnergy = [NSNumber numberWithLongLong:entry_0.maximumEnergy.Value()]; + } else { + newElement_0.maximumEnergy = nil; + } + if (entry_0.loadControl.HasValue()) { + newElement_0.loadControl = [NSNumber numberWithChar:entry_0.loadControl.Value()]; + } else { + newElement_0.loadControl = nil; + } + [array_0 addObject:newElement_0]; + } + params.constraints = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster requestConstraintBasedForecastWithParams: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::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type mRequest; + TypedComplexArgument> mComplex_Constraints; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute ESAType + */ +class ReadDeviceEnergyManagementESAType : public ReadAttribute { +public: + ReadDeviceEnergyManagementESAType() + : ReadAttribute("esatype") + { + } + + ~ReadDeviceEnergyManagementESAType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESATypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement ESAType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementESAType : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementESAType() + : SubscribeAttribute("esatype") + { + } + + ~SubscribeAttributeDeviceEnergyManagementESAType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeESATypeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAType 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 ESACanGenerate + */ +class ReadDeviceEnergyManagementESACanGenerate : public ReadAttribute { +public: + ReadDeviceEnergyManagementESACanGenerate() + : ReadAttribute("esacan-generate") + { + } + + ~ReadDeviceEnergyManagementESACanGenerate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESACanGenerateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESACanGenerate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement ESACanGenerate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementESACanGenerate : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementESACanGenerate() + : SubscribeAttribute("esacan-generate") + { + } + + ~SubscribeAttributeDeviceEnergyManagementESACanGenerate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeESACanGenerateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESACanGenerate 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 ESAState + */ +class ReadDeviceEnergyManagementESAState : public ReadAttribute { +public: + ReadDeviceEnergyManagementESAState() + : ReadAttribute("esastate") + { + } + + ~ReadDeviceEnergyManagementESAState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESAStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement ESAState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementESAState : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementESAState() + : SubscribeAttribute("esastate") + { + } + + ~SubscribeAttributeDeviceEnergyManagementESAState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeESAStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAState 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 AbsMinPower + */ +class ReadDeviceEnergyManagementAbsMinPower : public ReadAttribute { +public: + ReadDeviceEnergyManagementAbsMinPower() + : ReadAttribute("abs-min-power") + { + } + + ~ReadDeviceEnergyManagementAbsMinPower() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMinPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement AbsMinPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementAbsMinPower : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementAbsMinPower() + : SubscribeAttribute("abs-min-power") + { + } + + ~SubscribeAttributeDeviceEnergyManagementAbsMinPower() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeAbsMinPowerWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMinPower 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 AbsMaxPower + */ +class ReadDeviceEnergyManagementAbsMaxPower : public ReadAttribute { +public: + ReadDeviceEnergyManagementAbsMaxPower() + : ReadAttribute("abs-max-power") + { + } + + ~ReadDeviceEnergyManagementAbsMaxPower() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMaxPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement AbsMaxPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementAbsMaxPower : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementAbsMaxPower() + : SubscribeAttribute("abs-max-power") + { + } + + ~SubscribeAttributeDeviceEnergyManagementAbsMaxPower() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeAbsMaxPowerWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMaxPower 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 PowerAdjustmentCapability + */ +class ReadDeviceEnergyManagementPowerAdjustmentCapability : public ReadAttribute { +public: + ReadDeviceEnergyManagementPowerAdjustmentCapability() + : ReadAttribute("power-adjustment-capability") + { + } + + ~ReadDeviceEnergyManagementPowerAdjustmentCapability() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerAdjustmentCapabilityWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement PowerAdjustmentCapability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() + : SubscribeAttribute("power-adjustment-capability") + { + } + + ~SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributePowerAdjustmentCapabilityWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability 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 Forecast + */ +class ReadDeviceEnergyManagementForecast : public ReadAttribute { +public: + ReadDeviceEnergyManagementForecast() + : ReadAttribute("forecast") + { + } + + ~ReadDeviceEnergyManagementForecast() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeForecastWithCompletion:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.Forecast response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement Forecast read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementForecast() + : SubscribeAttribute("forecast") + { + } + + ~SubscribeAttributeDeviceEnergyManagementForecast() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeForecastWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.Forecast 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 + */ +class ReadDeviceEnergyManagementGeneratedCommandList : public ReadAttribute { +public: + ReadDeviceEnergyManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadDeviceEnergyManagementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadDeviceEnergyManagementAcceptedCommandList : public ReadAttribute { +public: + ReadDeviceEnergyManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadDeviceEnergyManagementAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AcceptedCommandList 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 EventList + */ +class ReadDeviceEnergyManagementEventList : public ReadAttribute { +public: + ReadDeviceEnergyManagementEventList() + : ReadAttribute("event-list") + { + } + + ~ReadDeviceEnergyManagementEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementEventList : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeDeviceEnergyManagementEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.EventList 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 AttributeList + */ +class ReadDeviceEnergyManagementAttributeList : public ReadAttribute { +public: + ReadDeviceEnergyManagementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadDeviceEnergyManagementAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeDeviceEnergyManagementAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AttributeList 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 FeatureMap + */ +class ReadDeviceEnergyManagementFeatureMap : public ReadAttribute { +public: + ReadDeviceEnergyManagementFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadDeviceEnergyManagementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeDeviceEnergyManagementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.FeatureMap 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 ClusterRevision + */ +class ReadDeviceEnergyManagementClusterRevision : public ReadAttribute { +public: + ReadDeviceEnergyManagementClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadDeviceEnergyManagementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DeviceEnergyManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDeviceEnergyManagementClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeDeviceEnergyManagementClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeDeviceEnergyManagementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster EnergyEvse | 0x0099 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Disable | 0x01 | +| * EnableCharging | 0x02 | +| * EnableDischarging | 0x03 | +| * StartDiagnostics | 0x04 | +| * SetTargets | 0x05 | +| * GetTargets | 0x06 | +| * ClearTargets | 0x07 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * State | 0x0000 | +| * SupplyState | 0x0001 | +| * FaultState | 0x0002 | +| * ChargingEnabledUntil | 0x0003 | +| * DischargingEnabledUntil | 0x0004 | +| * CircuitCapacity | 0x0005 | +| * MinimumChargeCurrent | 0x0006 | +| * MaximumChargeCurrent | 0x0007 | +| * MaximumDischargeCurrent | 0x0008 | +| * UserMaximumChargeCurrent | 0x0009 | +| * RandomizationDelayWindow | 0x000A | +| * NumberOfWeeklyTargets | 0x0021 | +| * NumberOfDailyTargets | 0x0022 | +| * NextChargeStartTime | 0x0023 | +| * NextChargeTargetTime | 0x0024 | +| * NextChargeRequiredEnergy | 0x0025 | +| * NextChargeTargetSoC | 0x0026 | +| * ApproximateEVEfficiency | 0x0027 | +| * StateOfCharge | 0x0030 | +| * BatteryCapacity | 0x0031 | +| * VehicleID | 0x0032 | +| * SessionID | 0x0040 | +| * SessionDuration | 0x0041 | +| * SessionEnergyCharged | 0x0042 | +| * SessionEnergyDischarged | 0x0043 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * EVConnected | 0x0000 | +| * EVNotDetected | 0x0001 | +| * EnergyTransferStarted | 0x0002 | +| * EnergyTransferStopped | 0x0003 | +| * Fault | 0x0004 | +| * Rfid | 0x0005 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command Disable + */ +class EnergyEvseDisable : public ClusterCommand { +public: + EnergyEvseDisable() + : ClusterCommand("disable") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::Disable::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterDisableParams 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 disableWithParams: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 +/* + * Command EnableCharging + */ +class EnergyEvseEnableCharging : public ClusterCommand { +public: + EnergyEvseEnableCharging() + : ClusterCommand("enable-charging") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ChargingEnabledUntil", 0, UINT32_MAX, &mRequest.chargingEnabledUntil); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MinimumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.minimumChargeCurrent); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MaximumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumChargeCurrent); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableCharging::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.chargingEnabledUntil.IsNull()) { + params.chargingEnabledUntil = nil; + } else { + params.chargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.chargingEnabledUntil.Value()]; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.minimumChargeCurrent = [NSNumber numberWithLongLong:mRequest.minimumChargeCurrent]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.maximumChargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumChargeCurrent]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableChargingWithParams: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::EnergyEvse::Commands::EnableCharging::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command EnableDischarging + */ +class EnergyEvseEnableDischarging : public ClusterCommand { +public: + EnergyEvseEnableDischarging() + : ClusterCommand("enable-discharging") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DischargingEnabledUntil", 0, UINT32_MAX, &mRequest.dischargingEnabledUntil); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MaximumDischargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumDischargeCurrent); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.dischargingEnabledUntil.IsNull()) { + params.dischargingEnabledUntil = nil; + } else { + params.dischargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.dischargingEnabledUntil.Value()]; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.maximumDischargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumDischargeCurrent]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableDischargingWithParams: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::EnergyEvse::Commands::EnableDischarging::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StartDiagnostics + */ +class EnergyEvseStartDiagnostics : public ClusterCommand { +public: + EnergyEvseStartDiagnostics() + : ClusterCommand("start-diagnostics") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterStartDiagnosticsParams 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 startDiagnosticsWithParams: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 +/* + * Command SetTargets + */ +class EnergyEvseSetTargets : public ClusterCommand { +public: + EnergyEvseSetTargets() + : ClusterCommand("set-targets") + , mComplex_ChargingTargets(&mRequest.chargingTargets) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ChargingTargets", &mComplex_ChargingTargets); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::SetTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekforSequence.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.chargingTargets) { + MTREnergyEVSEClusterChargingTargetStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; + if (entry_0.targetSoC.HasValue()) { + newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; + } else { + newElement_0.targetSoC = nil; + } + if (entry_0.addedEnergy.HasValue()) { + newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; + } else { + newElement_0.addedEnergy = nil; + } + [array_0 addObject:newElement_0]; + } + params.chargingTargets = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTargetsWithParams: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::EnergyEvse::Commands::SetTargets::Type mRequest; + TypedComplexArgument> mComplex_ChargingTargets; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetTargets + */ +class EnergyEvseGetTargets : public ClusterCommand { +public: + EnergyEvseGetTargets() + : ClusterCommand("get-targets") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::GetTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getTargetsWithParams:params completion: + ^(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ClearTargets + */ +class EnergyEvseClearTargets : public ClusterCommand { +public: + EnergyEvseClearTargets() + : ClusterCommand("clear-targets") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::ClearTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterClearTargetsParams 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 clearTargetsWithParams: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 + +/* + * Attribute State + */ +class ReadEnergyEvseState : public ReadAttribute { +public: + ReadEnergyEvseState() + : ReadAttribute("state") + { + } + + ~ReadEnergyEvseState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.State response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE State read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseState : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseState() + : SubscribeAttribute("state") + { + } + + ~SubscribeAttributeEnergyEvseState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.State 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 SupplyState + */ +class ReadEnergyEvseSupplyState : public ReadAttribute { +public: + ReadEnergyEvseSupplyState() + : ReadAttribute("supply-state") + { + } + + ~ReadEnergyEvseSupplyState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupplyStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SupplyState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE SupplyState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseSupplyState : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseSupplyState() + : SubscribeAttribute("supply-state") + { + } + + ~SubscribeAttributeEnergyEvseSupplyState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeSupplyStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SupplyState 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 FaultState + */ +class ReadEnergyEvseFaultState : public ReadAttribute { +public: + ReadEnergyEvseFaultState() + : ReadAttribute("fault-state") + { + } + + ~ReadEnergyEvseFaultState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFaultStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FaultState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE FaultState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseFaultState : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseFaultState() + : SubscribeAttribute("fault-state") + { + } + + ~SubscribeAttributeEnergyEvseFaultState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeFaultStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FaultState 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 ChargingEnabledUntil + */ +class ReadEnergyEvseChargingEnabledUntil : public ReadAttribute { +public: + ReadEnergyEvseChargingEnabledUntil() + : ReadAttribute("charging-enabled-until") + { + } + + ~ReadEnergyEvseChargingEnabledUntil() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ChargingEnabledUntil response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE ChargingEnabledUntil read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseChargingEnabledUntil : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseChargingEnabledUntil() + : SubscribeAttribute("charging-enabled-until") + { + } + + ~SubscribeAttributeEnergyEvseChargingEnabledUntil() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeChargingEnabledUntilWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ChargingEnabledUntil 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 DischargingEnabledUntil + */ +class ReadEnergyEvseDischargingEnabledUntil : public ReadAttribute { +public: + ReadEnergyEvseDischargingEnabledUntil() + : ReadAttribute("discharging-enabled-until") + { + } + + ~ReadEnergyEvseDischargingEnabledUntil() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDischargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.DischargingEnabledUntil response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE DischargingEnabledUntil read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseDischargingEnabledUntil : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseDischargingEnabledUntil() + : SubscribeAttribute("discharging-enabled-until") + { + } + + ~SubscribeAttributeEnergyEvseDischargingEnabledUntil() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeDischargingEnabledUntilWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.DischargingEnabledUntil 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 CircuitCapacity + */ +class ReadEnergyEvseCircuitCapacity : public ReadAttribute { +public: + ReadEnergyEvseCircuitCapacity() + : ReadAttribute("circuit-capacity") + { + } + + ~ReadEnergyEvseCircuitCapacity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCircuitCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.CircuitCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE CircuitCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseCircuitCapacity : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseCircuitCapacity() + : SubscribeAttribute("circuit-capacity") + { + } + + ~SubscribeAttributeEnergyEvseCircuitCapacity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeCircuitCapacityWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.CircuitCapacity 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 MinimumChargeCurrent + */ +class ReadEnergyEvseMinimumChargeCurrent : public ReadAttribute { +public: + ReadEnergyEvseMinimumChargeCurrent() + : ReadAttribute("minimum-charge-current") + { + } + + ~ReadEnergyEvseMinimumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinimumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MinimumChargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE MinimumChargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseMinimumChargeCurrent : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseMinimumChargeCurrent() + : SubscribeAttribute("minimum-charge-current") + { + } + + ~SubscribeAttributeEnergyEvseMinimumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeMinimumChargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MinimumChargeCurrent 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 MaximumChargeCurrent + */ +class ReadEnergyEvseMaximumChargeCurrent : public ReadAttribute { +public: + ReadEnergyEvseMaximumChargeCurrent() + : ReadAttribute("maximum-charge-current") + { + } + + ~ReadEnergyEvseMaximumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumChargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE MaximumChargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseMaximumChargeCurrent : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseMaximumChargeCurrent() + : SubscribeAttribute("maximum-charge-current") + { + } + + ~SubscribeAttributeEnergyEvseMaximumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeMaximumChargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumChargeCurrent 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 MaximumDischargeCurrent + */ +class ReadEnergyEvseMaximumDischargeCurrent : public ReadAttribute { +public: + ReadEnergyEvseMaximumDischargeCurrent() + : ReadAttribute("maximum-discharge-current") + { + } + + ~ReadEnergyEvseMaximumDischargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaximumDischargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumDischargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE MaximumDischargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseMaximumDischargeCurrent : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseMaximumDischargeCurrent() + : SubscribeAttribute("maximum-discharge-current") + { + } + + ~SubscribeAttributeEnergyEvseMaximumDischargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeMaximumDischargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumDischargeCurrent 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 UserMaximumChargeCurrent + */ +class ReadEnergyEvseUserMaximumChargeCurrent : public ReadAttribute { +public: + ReadEnergyEvseUserMaximumChargeCurrent() + : ReadAttribute("user-maximum-charge-current") + { + } + + ~ReadEnergyEvseUserMaximumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.UserMaximumChargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE UserMaximumChargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteEnergyEvseUserMaximumChargeCurrent : public WriteAttribute { +public: + WriteEnergyEvseUserMaximumChargeCurrent() + : WriteAttribute("user-maximum-charge-current") + { + AddArgument("attr-name", "user-maximum-charge-current"); + AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteEnergyEvseUserMaximumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithLongLong:mValue]; + + [cluster writeAttributeUserMaximumChargeCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE UserMaximumChargeCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int64_t mValue; +}; + +class SubscribeAttributeEnergyEvseUserMaximumChargeCurrent : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() + : SubscribeAttribute("user-maximum-charge-current") + { + } + + ~SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeUserMaximumChargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.UserMaximumChargeCurrent 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 RandomizationDelayWindow + */ +class ReadEnergyEvseRandomizationDelayWindow : public ReadAttribute { +public: + ReadEnergyEvseRandomizationDelayWindow() + : ReadAttribute("randomization-delay-window") + { + } + + ~ReadEnergyEvseRandomizationDelayWindow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRandomizationDelayWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.RandomizationDelayWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE RandomizationDelayWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteEnergyEvseRandomizationDelayWindow : public WriteAttribute { +public: + WriteEnergyEvseRandomizationDelayWindow() + : WriteAttribute("randomization-delay-window") + { + AddArgument("attr-name", "randomization-delay-window"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteEnergyEvseRandomizationDelayWindow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeRandomizationDelayWindowWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE RandomizationDelayWindow write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseRandomizationDelayWindow() + : SubscribeAttribute("randomization-delay-window") + { + } + + ~SubscribeAttributeEnergyEvseRandomizationDelayWindow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeRandomizationDelayWindowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.RandomizationDelayWindow 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 NumberOfWeeklyTargets + */ +class ReadEnergyEvseNumberOfWeeklyTargets : public ReadAttribute { +public: + ReadEnergyEvseNumberOfWeeklyTargets() + : ReadAttribute("number-of-weekly-targets") + { + } + + ~ReadEnergyEvseNumberOfWeeklyTargets() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeeklyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NumberOfWeeklyTargets response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NumberOfWeeklyTargets read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNumberOfWeeklyTargets : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNumberOfWeeklyTargets() + : SubscribeAttribute("number-of-weekly-targets") + { + } + + ~SubscribeAttributeEnergyEvseNumberOfWeeklyTargets() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNumberOfWeeklyTargetsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NumberOfWeeklyTargets 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 NumberOfDailyTargets + */ +class ReadEnergyEvseNumberOfDailyTargets : public ReadAttribute { +public: + ReadEnergyEvseNumberOfDailyTargets() + : ReadAttribute("number-of-daily-targets") + { + } + + ~ReadEnergyEvseNumberOfDailyTargets() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfDailyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NumberOfDailyTargets response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NumberOfDailyTargets read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNumberOfDailyTargets : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNumberOfDailyTargets() + : SubscribeAttribute("number-of-daily-targets") + { + } + + ~SubscribeAttributeEnergyEvseNumberOfDailyTargets() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNumberOfDailyTargetsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NumberOfDailyTargets 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 NextChargeStartTime + */ +class ReadEnergyEvseNextChargeStartTime : public ReadAttribute { +public: + ReadEnergyEvseNextChargeStartTime() + : ReadAttribute("next-charge-start-time") + { + } + + ~ReadEnergyEvseNextChargeStartTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeStartTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NextChargeStartTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNextChargeStartTime : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNextChargeStartTime() + : SubscribeAttribute("next-charge-start-time") + { + } + + ~SubscribeAttributeEnergyEvseNextChargeStartTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNextChargeStartTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeStartTime 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 NextChargeTargetTime + */ +class ReadEnergyEvseNextChargeTargetTime : public ReadAttribute { +public: + ReadEnergyEvseNextChargeTargetTime() + : ReadAttribute("next-charge-target-time") + { + } + + ~ReadEnergyEvseNextChargeTargetTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeTargetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NextChargeTargetTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNextChargeTargetTime : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNextChargeTargetTime() + : SubscribeAttribute("next-charge-target-time") + { + } + + ~SubscribeAttributeEnergyEvseNextChargeTargetTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNextChargeTargetTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetTime 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 NextChargeRequiredEnergy + */ +class ReadEnergyEvseNextChargeRequiredEnergy : public ReadAttribute { +public: + ReadEnergyEvseNextChargeRequiredEnergy() + : ReadAttribute("next-charge-required-energy") + { + } + + ~ReadEnergyEvseNextChargeRequiredEnergy() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeRequiredEnergyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeRequiredEnergy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NextChargeRequiredEnergy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNextChargeRequiredEnergy : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() + : SubscribeAttribute("next-charge-required-energy") + { + } + + ~SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNextChargeRequiredEnergyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeRequiredEnergy 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 NextChargeTargetSoC + */ +class ReadEnergyEvseNextChargeTargetSoC : public ReadAttribute { +public: + ReadEnergyEvseNextChargeTargetSoC() + : ReadAttribute("next-charge-target-so-c") + { + } + + ~ReadEnergyEvseNextChargeTargetSoC() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeTargetSoCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetSoC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE NextChargeTargetSoC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseNextChargeTargetSoC : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseNextChargeTargetSoC() + : SubscribeAttribute("next-charge-target-so-c") + { + } + + ~SubscribeAttributeEnergyEvseNextChargeTargetSoC() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeNextChargeTargetSoCWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetSoC 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 ApproximateEVEfficiency + */ +class ReadEnergyEvseApproximateEVEfficiency : public ReadAttribute { +public: + ReadEnergyEvseApproximateEVEfficiency() + : ReadAttribute("approximate-evefficiency") + { + } + + ~ReadEnergyEvseApproximateEVEfficiency() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApproximateEVEfficiencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ApproximateEVEfficiency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE ApproximateEVEfficiency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteEnergyEvseApproximateEVEfficiency : public WriteAttribute { +public: + WriteEnergyEvseApproximateEVEfficiency() + : WriteAttribute("approximate-evefficiency") + { + AddArgument("attr-name", "approximate-evefficiency"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteEnergyEvseApproximateEVEfficiency() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } + + [cluster writeAttributeApproximateEVEfficiencyWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE ApproximateEVEfficiency write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeEnergyEvseApproximateEVEfficiency : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseApproximateEVEfficiency() + : SubscribeAttribute("approximate-evefficiency") + { + } + + ~SubscribeAttributeEnergyEvseApproximateEVEfficiency() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeApproximateEVEfficiencyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ApproximateEVEfficiency 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 StateOfCharge + */ +class ReadEnergyEvseStateOfCharge : public ReadAttribute { +public: + ReadEnergyEvseStateOfCharge() + : ReadAttribute("state-of-charge") + { + } + + ~ReadEnergyEvseStateOfCharge() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateOfChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.StateOfCharge response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE StateOfCharge read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseStateOfCharge : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseStateOfCharge() + : SubscribeAttribute("state-of-charge") + { + } + + ~SubscribeAttributeEnergyEvseStateOfCharge() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeStateOfChargeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.StateOfCharge 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 BatteryCapacity + */ +class ReadEnergyEvseBatteryCapacity : public ReadAttribute { +public: + ReadEnergyEvseBatteryCapacity() + : ReadAttribute("battery-capacity") + { + } + + ~ReadEnergyEvseBatteryCapacity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatteryCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.BatteryCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE BatteryCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseBatteryCapacity : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseBatteryCapacity() + : SubscribeAttribute("battery-capacity") + { + } + + ~SubscribeAttributeEnergyEvseBatteryCapacity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeBatteryCapacityWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.BatteryCapacity 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 VehicleID + */ +class ReadEnergyEvseVehicleID : public ReadAttribute { +public: + ReadEnergyEvseVehicleID() + : ReadAttribute("vehicle-id") + { + } + + ~ReadEnergyEvseVehicleID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVehicleIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.VehicleID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE VehicleID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseVehicleID : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseVehicleID() + : SubscribeAttribute("vehicle-id") + { + } + + ~SubscribeAttributeEnergyEvseVehicleID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeVehicleIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.VehicleID 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 SessionID + */ +class ReadEnergyEvseSessionID : public ReadAttribute { +public: + ReadEnergyEvseSessionID() + : ReadAttribute("session-id") + { + } + + ~ReadEnergyEvseSessionID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE SessionID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseSessionID : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseSessionID() + : SubscribeAttribute("session-id") + { + } + + ~SubscribeAttributeEnergyEvseSessionID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeSessionIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionID 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 SessionDuration + */ +class ReadEnergyEvseSessionDuration : public ReadAttribute { +public: + ReadEnergyEvseSessionDuration() + : ReadAttribute("session-duration") + { + } + + ~ReadEnergyEvseSessionDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE SessionDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseSessionDuration : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseSessionDuration() + : SubscribeAttribute("session-duration") + { + } + + ~SubscribeAttributeEnergyEvseSessionDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeSessionDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionDuration 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 SessionEnergyCharged + */ +class ReadEnergyEvseSessionEnergyCharged : public ReadAttribute { +public: + ReadEnergyEvseSessionEnergyCharged() + : ReadAttribute("session-energy-charged") + { + } + + ~ReadEnergyEvseSessionEnergyCharged() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionEnergyChargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyCharged response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE SessionEnergyCharged read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseSessionEnergyCharged : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseSessionEnergyCharged() + : SubscribeAttribute("session-energy-charged") + { + } + + ~SubscribeAttributeEnergyEvseSessionEnergyCharged() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeSessionEnergyChargedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyCharged 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 SessionEnergyDischarged + */ +class ReadEnergyEvseSessionEnergyDischarged : public ReadAttribute { +public: + ReadEnergyEvseSessionEnergyDischarged() + : ReadAttribute("session-energy-discharged") + { + } + + ~ReadEnergyEvseSessionEnergyDischarged() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionEnergyDischargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyDischarged response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE SessionEnergyDischarged read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseSessionEnergyDischarged : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseSessionEnergyDischarged() + : SubscribeAttribute("session-energy-discharged") + { + } + + ~SubscribeAttributeEnergyEvseSessionEnergyDischarged() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeSessionEnergyDischargedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyDischarged 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 + */ +class ReadEnergyEvseGeneratedCommandList : public ReadAttribute { +public: + ReadEnergyEvseGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadEnergyEvseGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeEnergyEvseGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadEnergyEvseAcceptedCommandList : public ReadAttribute { +public: + ReadEnergyEvseAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadEnergyEvseAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeEnergyEvseAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AcceptedCommandList 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 EventList + */ +class ReadEnergyEvseEventList : public ReadAttribute { +public: + ReadEnergyEvseEventList() + : ReadAttribute("event-list") + { + } + + ~ReadEnergyEvseEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseEventList : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeEnergyEvseEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.EventList 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 AttributeList + */ +class ReadEnergyEvseAttributeList : public ReadAttribute { +public: + ReadEnergyEvseAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadEnergyEvseAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeEnergyEvseAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AttributeList 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 FeatureMap + */ +class ReadEnergyEvseFeatureMap : public ReadAttribute { +public: + ReadEnergyEvseFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadEnergyEvseFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeEnergyEvseFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FeatureMap 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 ClusterRevision + */ +class ReadEnergyEvseClusterRevision : public ReadAttribute { +public: + ReadEnergyEvseClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadEnergyEvseClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEnergyEvseClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeEnergyEvseClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster DoorLock | 0x0101 | +|------------------------------------------------------------------------------| +| Commands: | | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +| * UnboltDoor | 0x27 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | +\*----------------------------------------------------------------------------*/ + +/* + * Command LockDoor + */ +class DoorLockLockDoor : public ClusterCommand { +public: + DoorLockLockDoor() + : ClusterCommand("lock-door") + { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster lockDoorWithParams: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::DoorLock::Commands::LockDoor::Type mRequest; +}; + +/* + * Command UnlockDoor + */ +class DoorLockUnlockDoor : public ClusterCommand { +public: + DoorLockUnlockDoor() + : ClusterCommand("unlock-door") + { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockDoorWithParams: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::DoorLock::Commands::UnlockDoor::Type mRequest; +}; + +/* + * Command UnlockWithTimeout + */ +class DoorLockUnlockWithTimeout : public ClusterCommand { +public: + DoorLockUnlockWithTimeout() + : ClusterCommand("unlock-with-timeout") + { + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockWithTimeoutWithParams: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::DoorLock::Commands::UnlockWithTimeout::Type mRequest; +}; + +/* + * Command SetWeekDaySchedule + */ +class DoorLockSetWeekDaySchedule : public ClusterCommand { +public: + DoorLockSetWeekDaySchedule() + : ClusterCommand("set-week-day-schedule") + { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; + params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; + params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; + params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; + params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeekDayScheduleWithParams: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::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; +}; + +/* + * Command GetWeekDaySchedule + */ +class DoorLockGetWeekDaySchedule : public ClusterCommand { +public: + DoorLockGetWeekDaySchedule() + : ClusterCommand("get-week-day-schedule") + { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeekDayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; +}; + +/* + * Command ClearWeekDaySchedule + */ +class DoorLockClearWeekDaySchedule : public ClusterCommand { +public: + DoorLockClearWeekDaySchedule() + : ClusterCommand("clear-week-day-schedule") + { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeekDayScheduleWithParams: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::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; +}; + +/* + * Command SetYearDaySchedule + */ +class DoorLockSetYearDaySchedule : public ClusterCommand { +public: + DoorLockSetYearDaySchedule() + : ClusterCommand("set-year-day-schedule") + { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setYearDayScheduleWithParams: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::DoorLock::Commands::SetYearDaySchedule::Type mRequest; +}; + +/* + * Command GetYearDaySchedule + */ +class DoorLockGetYearDaySchedule : public ClusterCommand { +public: + DoorLockGetYearDaySchedule() + : ClusterCommand("get-year-day-schedule") + { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getYearDayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; +}; + +/* + * Command ClearYearDaySchedule + */ +class DoorLockClearYearDaySchedule : public ClusterCommand { +public: + DoorLockClearYearDaySchedule() + : ClusterCommand("clear-year-day-schedule") + { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearYearDayScheduleWithParams: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::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; +}; + +/* + * Command SetHolidaySchedule + */ +class DoorLockSetHolidaySchedule : public ClusterCommand { +public: + DoorLockSetHolidaySchedule() + : ClusterCommand("set-holiday-schedule") + { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setHolidayScheduleWithParams: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::DoorLock::Commands::SetHolidaySchedule::Type mRequest; +}; + +/* + * Command GetHolidaySchedule + */ +class DoorLockGetHolidaySchedule : public ClusterCommand { +public: + DoorLockGetHolidaySchedule() + : ClusterCommand("get-holiday-schedule") + { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getHolidayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; +}; + +/* + * Command ClearHolidaySchedule + */ +class DoorLockClearHolidaySchedule : public ClusterCommand { +public: + DoorLockClearHolidaySchedule() + : ClusterCommand("clear-holiday-schedule") + { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearHolidayScheduleWithParams: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::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; +}; + +/* + * Command SetUser + */ +class DoorLockSetUser : public ClusterCommand { +public: + DoorLockSetUser() + : ClusterCommand("set-user") + { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + if (mRequest.userName.IsNull()) { + params.userName = nil; + } else { + params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() length:mRequest.userName.Value().size() encoding:NSUTF8StringEncoding]; + } + if (mRequest.userUniqueID.IsNull()) { + params.userUniqueID = nil; + } else { + params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; + } + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + if (mRequest.credentialRule.IsNull()) { + params.credentialRule = nil; + } else { + params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setUserWithParams: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::DoorLock::Commands::SetUser::Type mRequest; +}; + +/* + * Command GetUser + */ +class DoorLockGetUser : public ClusterCommand { +public: + DoorLockGetUser() + : ClusterCommand("get-user") + { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getUserWithParams:params completion: + ^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; +}; + +/* + * Command ClearUser + */ +class DoorLockClearUser : public ClusterCommand { +public: + DoorLockClearUser() + : ClusterCommand("clear-user") + { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearUserWithParams: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::DoorLock::Commands::ClearUser::Type mRequest; +}; + +/* + * Command SetCredential + */ +class DoorLockSetCredential : public ClusterCommand { +public: + DoorLockSetCredential() + : ClusterCommand("set-credential") + , mComplex_Credential(&mRequest.credential) + { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; + if (mRequest.userIndex.IsNull()) { + params.userIndex = nil; + } else { + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; + } + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setCredentialWithParams:params completion: + ^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; +}; + +/* + * Command GetCredentialStatus + */ +class DoorLockGetCredentialStatus : public ClusterCommand { +public: + DoorLockGetCredentialStatus() + : ClusterCommand("get-credential-status") + , mComplex_Credential(&mRequest.credential) + { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getCredentialStatusWithParams:params completion: + ^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; +}; + +/* + * Command ClearCredential + */ +class DoorLockClearCredential : public ClusterCommand { +public: + DoorLockClearCredential() + : ClusterCommand("clear-credential") + , mComplex_Credential(&mRequest.credential) + { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.credential.IsNull()) { + params.credential = nil; + } else { + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearCredentialWithParams: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::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> mComplex_Credential; +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnboltDoor + */ +class DoorLockUnboltDoor : public ClusterCommand { +public: + DoorLockUnboltDoor() + : ClusterCommand("unbolt-door") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PINCode", &mRequest.PINCode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; } else { params.pinCode = nil; } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockDoorWithParams: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); - } - }]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unboltDoorWithParams: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::DoorLock::Commands::UnboltDoor::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute LockState + */ +class ReadDoorLockLockState : public ReadAttribute { +public: + ReadDoorLockLockState() + : ReadAttribute("lock-state") + { + } + + ~ReadDoorLockLockState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock LockState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockLockState() + : SubscribeAttribute("lock-state") + { + } + + ~SubscribeAttributeDoorLockLockState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeLockStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState 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; + } +}; + +/* + * Attribute LockType + */ +class ReadDoorLockLockType : public ReadAttribute { +public: + ReadDoorLockLockType() + : ReadAttribute("lock-type") + { + } + + ~ReadDoorLockLockType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock LockType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockLockType() + : SubscribeAttribute("lock-type") + { + } + + ~SubscribeAttributeDoorLockLockType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeLockTypeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType 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; + } +}; + +/* + * Attribute ActuatorEnabled + */ +class ReadDoorLockActuatorEnabled : public ReadAttribute { +public: + ReadDoorLockActuatorEnabled() + : ReadAttribute("actuator-enabled") + { + } + + ~ReadDoorLockActuatorEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock ActuatorEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockActuatorEnabled() + : SubscribeAttribute("actuator-enabled") + { + } + + ~SubscribeAttributeDoorLockActuatorEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeActuatorEnabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ActuatorEnabled 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; + } +}; + +/* + * Attribute DoorState + */ +class ReadDoorLockDoorState : public ReadAttribute { +public: + ReadDoorLockDoorState() + : ReadAttribute("door-state") + { + } + + ~ReadDoorLockDoorState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock DoorState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorState() + : SubscribeAttribute("door-state") + { + } + + ~SubscribeAttributeDoorLockDoorState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeDoorStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorState 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; + } +}; + +/* + * Attribute DoorOpenEvents + */ +class ReadDoorLockDoorOpenEvents : public ReadAttribute { +public: + ReadDoorLockDoorOpenEvents() + : ReadAttribute("door-open-events") + { + } + + ~ReadDoorLockDoorOpenEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock DoorOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDoorLockDoorOpenEvents : public WriteAttribute { +public: + WriteDoorLockDoorOpenEvents() + : WriteAttribute("door-open-events") + { + AddArgument("attr-name", "door-open-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockDoorOpenEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorOpenEvents() + : SubscribeAttribute("door-open-events") + { + } + + ~SubscribeAttributeDoorLockDoorOpenEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeDoorOpenEventsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents 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; + } +}; + +/* + * Attribute DoorClosedEvents + */ +class ReadDoorLockDoorClosedEvents : public ReadAttribute { +public: + ReadDoorLockDoorClosedEvents() + : ReadAttribute("door-closed-events") + { + } + + ~ReadDoorLockDoorClosedEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock DoorClosedEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDoorLockDoorClosedEvents : public WriteAttribute { +public: + WriteDoorLockDoorClosedEvents() + : WriteAttribute("door-closed-events") + { + AddArgument("attr-name", "door-closed-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockDoorClosedEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorClosedEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorClosedEvents() + : SubscribeAttribute("door-closed-events") + { + } + + ~SubscribeAttributeDoorLockDoorClosedEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeDoorClosedEventsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorClosedEvents 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; + } +}; + +/* + * Attribute OpenPeriod + */ +class ReadDoorLockOpenPeriod : public ReadAttribute { +public: + ReadDoorLockOpenPeriod() + : ReadAttribute("open-period") + { + } + + ~ReadDoorLockOpenPeriod() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock OpenPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDoorLockOpenPeriod : public WriteAttribute { +public: + WriteDoorLockOpenPeriod() + : WriteAttribute("open-period") + { + AddArgument("attr-name", "open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockOpenPeriod() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOpenPeriod() + : SubscribeAttribute("open-period") + { + } + + ~SubscribeAttributeDoorLockOpenPeriod() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeOpenPeriodWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod 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; + } }; /* - * Command UnlockWithTimeout + * Attribute NumberOfTotalUsersSupported */ -class DoorLockUnlockWithTimeout : public ClusterCommand { +class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { public: - DoorLockUnlockWithTimeout() - : ClusterCommand("unlock-with-timeout") + ReadDoorLockNumberOfTotalUsersSupported() + : ReadAttribute("number-of-total-users-supported") + { + } + + ~ReadDoorLockNumberOfTotalUsersSupported() { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + : SubscribeAttribute("number-of-total-users-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockWithTimeoutWithParams: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); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported 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; } +}; -private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; +/* + * Attribute NumberOfPINUsersSupported + */ +class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { +public: + ReadDoorLockNumberOfPINUsersSupported() + : ReadAttribute("number-of-pinusers-supported") + { + } + + ~ReadDoorLockNumberOfPINUsersSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfPINUsersSupported() + : SubscribeAttribute("number-of-pinusers-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfPINUsersSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported 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; + } }; /* - * Command SetWeekDaySchedule + * Attribute NumberOfRFIDUsersSupported */ -class DoorLockSetWeekDaySchedule : public ClusterCommand { +class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { public: - DoorLockSetWeekDaySchedule() - : ClusterCommand("set-week-day-schedule") + ReadDoorLockNumberOfRFIDUsersSupported() + : ReadAttribute("number-of-rfidusers-supported") + { + } + + ~ReadDoorLockNumberOfRFIDUsersSupported() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; - params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; - params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; - params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; - params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeekDayScheduleWithParams: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); - } - }]; + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + : SubscribeAttribute("number-of-rfidusers-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported 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; } +}; + +/* + * Attribute NumberOfWeekDaySchedulesSupportedPerUser + */ +class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { +public: + ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-week-day-schedules-supported-per-user") + { + } -private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; + ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") + { + } + + ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser 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; + } }; /* - * Command GetWeekDaySchedule + * Attribute NumberOfYearDaySchedulesSupportedPerUser */ -class DoorLockGetWeekDaySchedule : public ClusterCommand { +class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { public: - DoorLockGetWeekDaySchedule() - : ClusterCommand("get-week-day-schedule") + ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-year-day-schedules-supported-per-user") + { + } + + ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeekDayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") + { + } + + ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser 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; + } +}; + +/* + * Attribute NumberOfHolidaySchedulesSupported + */ +class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { +public: + ReadDoorLockNumberOfHolidaySchedulesSupported() + : ReadAttribute("number-of-holiday-schedules-supported") + { + } + + ~ReadDoorLockNumberOfHolidaySchedulesSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + : SubscribeAttribute("number-of-holiday-schedules-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported 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; + } +}; + +/* + * Attribute MaxPINCodeLength + */ +class ReadDoorLockMaxPINCodeLength : public ReadAttribute { +public: + ReadDoorLockMaxPINCodeLength() + : ReadAttribute("max-pincode-length") + { + } + + ~ReadDoorLockMaxPINCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MaxPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockMaxPINCodeLength() + : SubscribeAttribute("max-pincode-length") + { + } + + ~SubscribeAttributeDoorLockMaxPINCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeMaxPINCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength 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; + } +}; + +/* + * Attribute MinPINCodeLength + */ +class ReadDoorLockMinPINCodeLength : public ReadAttribute { +public: + ReadDoorLockMinPINCodeLength() + : ReadAttribute("min-pincode-length") + { + } + + ~ReadDoorLockMinPINCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MinPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockMinPINCodeLength() + : SubscribeAttribute("min-pincode-length") + { + } + + ~SubscribeAttributeDoorLockMinPINCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeMinPINCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength 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; + } +}; + +/* + * Attribute MaxRFIDCodeLength + */ +class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { +public: + ReadDoorLockMaxRFIDCodeLength() + : ReadAttribute("max-rfidcode-length") + { + } + + ~ReadDoorLockMaxRFIDCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockMaxRFIDCodeLength() + : SubscribeAttribute("max-rfidcode-length") + { + } + + ~SubscribeAttributeDoorLockMaxRFIDCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeMaxRFIDCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength 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; + } +}; + +/* + * Attribute MinRFIDCodeLength + */ +class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { +public: + ReadDoorLockMinRFIDCodeLength() + : ReadAttribute("min-rfidcode-length") + { + } + + ~ReadDoorLockMinRFIDCodeLength() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MinRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; -/* - * Command ClearWeekDaySchedule - */ -class DoorLockClearWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { public: - DoorLockClearWeekDaySchedule() - : ClusterCommand("clear-week-day-schedule") + SubscribeAttributeDoorLockMinRFIDCodeLength() + : SubscribeAttribute("min-rfidcode-length") + { + } + + ~SubscribeAttributeDoorLockMinRFIDCodeLength() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeekDayScheduleWithParams: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); - } - }]; + __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 subscribeAttributeMinRFIDCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength 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; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; /* - * Command SetYearDaySchedule + * Attribute CredentialRulesSupport */ -class DoorLockSetYearDaySchedule : public ClusterCommand { +class ReadDoorLockCredentialRulesSupport : public ReadAttribute { public: - DoorLockSetYearDaySchedule() - : ClusterCommand("set-year-day-schedule") + ReadDoorLockCredentialRulesSupport() + : ReadAttribute("credential-rules-support") + { + } + + ~ReadDoorLockCredentialRulesSupport() { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setYearDayScheduleWithParams: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); - } - }]; - } + [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock CredentialRulesSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; -/* - * Command GetYearDaySchedule - */ -class DoorLockGetYearDaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { public: - DoorLockGetYearDaySchedule() - : ClusterCommand("get-year-day-schedule") + SubscribeAttributeDoorLockCredentialRulesSupport() + : SubscribeAttribute("credential-rules-support") + { + } + + ~SubscribeAttributeDoorLockCredentialRulesSupport() { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getYearDayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __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 subscribeAttributeCredentialRulesSupportWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport 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; } - -private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; /* - * Command ClearYearDaySchedule + * Attribute NumberOfCredentialsSupportedPerUser */ -class DoorLockClearYearDaySchedule : public ClusterCommand { +class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { public: - DoorLockClearYearDaySchedule() - : ClusterCommand("clear-year-day-schedule") + ReadDoorLockNumberOfCredentialsSupportedPerUser() + : ReadAttribute("number-of-credentials-supported-per-user") + { + } + + ~ReadDoorLockNumberOfCredentialsSupportedPerUser() { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearYearDayScheduleWithParams: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); - } - }]; - } + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; -/* - * Command SetHolidaySchedule - */ -class DoorLockSetHolidaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { public: - DoorLockSetHolidaySchedule() - : ClusterCommand("set-holiday-schedule") + SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + : SubscribeAttribute("number-of-credentials-supported-per-user") + { + } + + ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setHolidayScheduleWithParams: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); - } - }]; + __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 subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser 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; } - -private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; /* - * Command GetHolidaySchedule + * Attribute Language */ -class DoorLockGetHolidaySchedule : public ClusterCommand { +class ReadDoorLockLanguage : public ReadAttribute { public: - DoorLockGetHolidaySchedule() - : ClusterCommand("get-holiday-schedule") + ReadDoorLockLanguage() + : ReadAttribute("language") + { + } + + ~ReadDoorLockLanguage() { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getHolidayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock Language read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; -/* - * Command ClearHolidaySchedule - */ -class DoorLockClearHolidaySchedule : public ClusterCommand { +class WriteDoorLockLanguage : public WriteAttribute { public: - DoorLockClearHolidaySchedule() - : ClusterCommand("clear-holiday-schedule") + WriteDoorLockLanguage() + : WriteAttribute("language") + { + AddArgument("attr-name", "language"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockLanguage() { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearHolidayScheduleWithParams: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); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLanguageWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; + chip::ByteSpan mValue; }; -/* - * Command SetUser - */ -class DoorLockSetUser : public ClusterCommand { +class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { public: - DoorLockSetUser() - : ClusterCommand("set-user") + SubscribeAttributeDoorLockLanguage() + : SubscribeAttribute("language") + { + } + + ~SubscribeAttributeDoorLockLanguage() { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - if (mRequest.userName.IsNull()) { - params.userName = nil; - } else { - params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() length:mRequest.userName.Value().size() encoding:NSUTF8StringEncoding]; - } - if (mRequest.userUniqueID.IsNull()) { - params.userUniqueID = nil; - } else { - params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - if (mRequest.credentialRule.IsNull()) { - params.credentialRule = nil; - } else { - params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUserWithParams: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); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLanguageWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language 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; } - -private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command GetUser + * Attribute LEDSettings */ -class DoorLockGetUser : public ClusterCommand { +class ReadDoorLockLEDSettings : public ReadAttribute { public: - DoorLockGetUser() - : ClusterCommand("get-user") + ReadDoorLockLEDSettings() + : ReadAttribute("ledsettings") + { + } + + ~ReadDoorLockLEDSettings() { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getUserWithParams:params completion: - ^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock LEDSettings read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; -/* - * Command ClearUser - */ -class DoorLockClearUser : public ClusterCommand { +class WriteDoorLockLEDSettings : public WriteAttribute { public: - DoorLockClearUser() - : ClusterCommand("clear-user") + WriteDoorLockLEDSettings() + : WriteAttribute("ledsettings") + { + AddArgument("attr-name", "ledsettings"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockLEDSettings() { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearUserWithParams: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); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLEDSettingsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; + uint8_t mValue; }; -/* - * Command SetCredential - */ -class DoorLockSetCredential : public ClusterCommand { +class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { public: - DoorLockSetCredential() - : ClusterCommand("set-credential") - , mComplex_Credential(&mRequest.credential) + SubscribeAttributeDoorLockLEDSettings() + : SubscribeAttribute("ledsettings") + { + } + + ~SubscribeAttributeDoorLockLEDSettings() { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; - if (mRequest.userIndex.IsNull()) { - params.userIndex = nil; - } else { - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCredentialWithParams:params completion: - ^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLEDSettingsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings 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; } - -private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; }; /* - * Command GetCredentialStatus + * Attribute AutoRelockTime */ -class DoorLockGetCredentialStatus : public ClusterCommand { +class ReadDoorLockAutoRelockTime : public ReadAttribute { public: - DoorLockGetCredentialStatus() - : ClusterCommand("get-credential-status") - , mComplex_Credential(&mRequest.credential) + ReadDoorLockAutoRelockTime() + : ReadAttribute("auto-relock-time") + { + } + + ~ReadDoorLockAutoRelockTime() { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getCredentialStatusWithParams:params completion: - ^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AutoRelockTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; }; -/* - * Command ClearCredential - */ -class DoorLockClearCredential : public ClusterCommand { +class WriteDoorLockAutoRelockTime : public WriteAttribute { public: - DoorLockClearCredential() - : ClusterCommand("clear-credential") - , mComplex_Credential(&mRequest.credential) + WriteDoorLockAutoRelockTime() + : WriteAttribute("auto-relock-time") + { + AddArgument("attr-name", "auto-relock-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockAutoRelockTime() { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.credential.IsNull()) { - params.credential = nil; - } else { - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearCredentialWithParams: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); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeAutoRelockTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> mComplex_Credential; + uint32_t mValue; }; -#if MTR_ENABLE_PROVISIONAL -/* - * Command UnboltDoor - */ -class DoorLockUnboltDoor : public ClusterCommand { +class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { public: - DoorLockUnboltDoor() - : ClusterCommand("unbolt-door") + SubscribeAttributeDoorLockAutoRelockTime() + : SubscribeAttribute("auto-relock-time") + { + } + + ~SubscribeAttributeDoorLockAutoRelockTime() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("PINCode", &mRequest.PINCode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unboltDoorWithParams: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); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAutoRelockTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AutoRelockTime 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; } - -private: - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute LockState + * Attribute SoundVolume */ -class ReadDoorLockLockState : public ReadAttribute { +class ReadDoorLockSoundVolume : public ReadAttribute { public: - ReadDoorLockLockState() - : ReadAttribute("lock-state") + ReadDoorLockSoundVolume() + : ReadAttribute("sound-volume") { } - ~ReadDoorLockLockState() + ~ReadDoorLockSoundVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); + [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock LockState read Error", error); + LogNSError("DoorLock SoundVolume read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71631,21 +86872,62 @@ class ReadDoorLockLockState : public ReadAttribute { } }; -class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { +class WriteDoorLockSoundVolume : public WriteAttribute { public: - SubscribeAttributeDoorLockLockState() - : SubscribeAttribute("lock-state") + WriteDoorLockSoundVolume() + : WriteAttribute("sound-volume") { + AddArgument("attr-name", "sound-volume"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockLockState() + ~WriteDoorLockSoundVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSoundVolumeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSoundVolume() + : SubscribeAttribute("sound-volume") + { + } + + ~SubscribeAttributeDoorLockSoundVolume() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::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); @@ -71660,10 +86942,10 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockStateWithParams:params + [cluster subscribeAttributeSoundVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71677,57 +86959,98 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { }; /* - * Attribute LockType + * Attribute OperatingMode */ -class ReadDoorLockLockType : public ReadAttribute { +class ReadDoorLockOperatingMode : public ReadAttribute { +public: + ReadDoorLockOperatingMode() + : ReadAttribute("operating-mode") + { + } + + ~ReadDoorLockOperatingMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::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); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock OperatingMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteDoorLockOperatingMode : public WriteAttribute { public: - ReadDoorLockLockType() - : ReadAttribute("lock-type") + WriteDoorLockOperatingMode() + : WriteAttribute("operating-mode") { + AddArgument("attr-name", "operating-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadDoorLockLockType() + ~WriteDoorLockOperatingMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock LockType read Error", error); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperatingModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { +class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLockType() - : SubscribeAttribute("lock-type") + SubscribeAttributeDoorLockOperatingMode() + : SubscribeAttribute("operating-mode") { } - ~SubscribeAttributeDoorLockLockType() + ~SubscribeAttributeDoorLockOperatingMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::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); @@ -71742,10 +87065,10 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockTypeWithParams:params + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); + NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71759,34 +87082,34 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { }; /* - * Attribute ActuatorEnabled + * Attribute SupportedOperatingModes */ -class ReadDoorLockActuatorEnabled : public ReadAttribute { +class ReadDoorLockSupportedOperatingModes : public ReadAttribute { public: - ReadDoorLockActuatorEnabled() - : ReadAttribute("actuator-enabled") + ReadDoorLockSupportedOperatingModes() + : ReadAttribute("supported-operating-modes") { } - ~ReadDoorLockActuatorEnabled() + ~ReadDoorLockSupportedOperatingModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ActuatorEnabled read Error", error); + LogNSError("DoorLock SupportedOperatingModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71795,21 +87118,21 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { } }; -class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { +class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { public: - SubscribeAttributeDoorLockActuatorEnabled() - : SubscribeAttribute("actuator-enabled") + SubscribeAttributeDoorLockSupportedOperatingModes() + : SubscribeAttribute("supported-operating-modes") { } - ~SubscribeAttributeDoorLockActuatorEnabled() + ~SubscribeAttributeDoorLockSupportedOperatingModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::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); @@ -71824,10 +87147,10 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActuatorEnabledWithParams:params + [cluster subscribeAttributeSupportedOperatingModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71841,34 +87164,34 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { }; /* - * Attribute DoorState + * Attribute DefaultConfigurationRegister */ -class ReadDoorLockDoorState : public ReadAttribute { +class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { public: - ReadDoorLockDoorState() - : ReadAttribute("door-state") + ReadDoorLockDefaultConfigurationRegister() + : ReadAttribute("default-configuration-register") { } - ~ReadDoorLockDoorState() + ~ReadDoorLockDefaultConfigurationRegister() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorState read Error", error); + LogNSError("DoorLock DefaultConfigurationRegister read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71877,21 +87200,21 @@ class ReadDoorLockDoorState : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { +class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorState() - : SubscribeAttribute("door-state") + SubscribeAttributeDoorLockDefaultConfigurationRegister() + : SubscribeAttribute("default-configuration-register") { } - ~SubscribeAttributeDoorLockDoorState() + ~SubscribeAttributeDoorLockDefaultConfigurationRegister() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::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); @@ -71906,10 +87229,10 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorStateWithParams:params + [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71923,34 +87246,34 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { }; /* - * Attribute DoorOpenEvents + * Attribute EnableLocalProgramming */ -class ReadDoorLockDoorOpenEvents : public ReadAttribute { +class ReadDoorLockEnableLocalProgramming : public ReadAttribute { public: - ReadDoorLockDoorOpenEvents() - : ReadAttribute("door-open-events") + ReadDoorLockEnableLocalProgramming() + : ReadAttribute("enable-local-programming") { } - ~ReadDoorLockDoorOpenEvents() + ~ReadDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorOpenEvents read Error", error); + LogNSError("DoorLock EnableLocalProgramming read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71959,24 +87282,24 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { } }; -class WriteDoorLockDoorOpenEvents : public WriteAttribute { +class WriteDoorLockEnableLocalProgramming : public WriteAttribute { public: - WriteDoorLockDoorOpenEvents() - : WriteAttribute("door-open-events") + WriteDoorLockEnableLocalProgramming() + : WriteAttribute("enable-local-programming") { - AddArgument("attr-name", "door-open-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "enable-local-programming"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockDoorOpenEvents() + ~WriteDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -71984,11 +87307,11 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeDoorOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); + LogNSError("DoorLock EnableLocalProgramming write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71997,24 +87320,24 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { } private: - uint32_t mValue; + bool mValue; }; -class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorOpenEvents() - : SubscribeAttribute("door-open-events") + SubscribeAttributeDoorLockEnableLocalProgramming() + : SubscribeAttribute("enable-local-programming") { } - ~SubscribeAttributeDoorLockDoorOpenEvents() + ~SubscribeAttributeDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::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); @@ -72029,10 +87352,10 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorOpenEventsWithParams:params + [cluster subscribeAttributeEnableLocalProgrammingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72046,34 +87369,34 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { }; /* - * Attribute DoorClosedEvents + * Attribute EnableOneTouchLocking */ -class ReadDoorLockDoorClosedEvents : public ReadAttribute { +class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { public: - ReadDoorLockDoorClosedEvents() - : ReadAttribute("door-closed-events") + ReadDoorLockEnableOneTouchLocking() + : ReadAttribute("enable-one-touch-locking") { } - ~ReadDoorLockDoorClosedEvents() + ~ReadDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorClosedEvents read Error", error); + LogNSError("DoorLock EnableOneTouchLocking read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72082,24 +87405,24 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { } }; -class WriteDoorLockDoorClosedEvents : public WriteAttribute { +class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { public: - WriteDoorLockDoorClosedEvents() - : WriteAttribute("door-closed-events") + WriteDoorLockEnableOneTouchLocking() + : WriteAttribute("enable-one-touch-locking") { - AddArgument("attr-name", "door-closed-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "enable-one-touch-locking"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockDoorClosedEvents() + ~WriteDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -72107,11 +87430,11 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeDoorClosedEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); + LogNSError("DoorLock EnableOneTouchLocking write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72120,24 +87443,24 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { } private: - uint32_t mValue; + bool mValue; }; -class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorClosedEvents() - : SubscribeAttribute("door-closed-events") + SubscribeAttributeDoorLockEnableOneTouchLocking() + : SubscribeAttribute("enable-one-touch-locking") { } - ~SubscribeAttributeDoorLockDoorClosedEvents() + ~SubscribeAttributeDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::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); @@ -72152,10 +87475,10 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorClosedEventsWithParams:params + [cluster subscribeAttributeEnableOneTouchLockingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72169,34 +87492,34 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { }; /* - * Attribute OpenPeriod + * Attribute EnableInsideStatusLED */ -class ReadDoorLockOpenPeriod : public ReadAttribute { +class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { public: - ReadDoorLockOpenPeriod() - : ReadAttribute("open-period") + ReadDoorLockEnableInsideStatusLED() + : ReadAttribute("enable-inside-status-led") { } - ~ReadDoorLockOpenPeriod() + ~ReadDoorLockEnableInsideStatusLED() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock OpenPeriod read Error", error); + LogNSError("DoorLock EnableInsideStatusLED read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72205,24 +87528,24 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { } }; -class WriteDoorLockOpenPeriod : public WriteAttribute { +class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { public: - WriteDoorLockOpenPeriod() - : WriteAttribute("open-period") + WriteDoorLockEnableInsideStatusLED() + : WriteAttribute("enable-inside-status-led") { - AddArgument("attr-name", "open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "enable-inside-status-led"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockOpenPeriod() + ~WriteDoorLockEnableInsideStatusLED() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -72230,11 +87553,11 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); + LogNSError("DoorLock EnableInsideStatusLED write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72243,24 +87566,24 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { } private: - uint16_t mValue; + bool mValue; }; -class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { public: - SubscribeAttributeDoorLockOpenPeriod() - : SubscribeAttribute("open-period") + SubscribeAttributeDoorLockEnableInsideStatusLED() + : SubscribeAttribute("enable-inside-status-led") { } - ~SubscribeAttributeDoorLockOpenPeriod() + ~SubscribeAttributeDoorLockEnableInsideStatusLED() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::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); @@ -72275,10 +87598,10 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOpenPeriodWithParams:params + [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72292,34 +87615,34 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { }; /* - * Attribute NumberOfTotalUsersSupported + * Attribute EnablePrivacyModeButton */ -class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { +class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { public: - ReadDoorLockNumberOfTotalUsersSupported() - : ReadAttribute("number-of-total-users-supported") + ReadDoorLockEnablePrivacyModeButton() + : ReadAttribute("enable-privacy-mode-button") { } - ~ReadDoorLockNumberOfTotalUsersSupported() + ~ReadDoorLockEnablePrivacyModeButton() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + LogNSError("DoorLock EnablePrivacyModeButton read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72328,103 +87651,62 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { +class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfTotalUsersSupported() - : SubscribeAttribute("number-of-total-users-supported") + WriteDoorLockEnablePrivacyModeButton() + : WriteAttribute("enable-privacy-mode-button") { + AddArgument("attr-name", "enable-privacy-mode-button"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + ~WriteDoorLockEnablePrivacyModeButton() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfTotalUsersSupportedWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported 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; - } -}; - -/* - * Attribute NumberOfPINUsersSupported - */ -class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfPINUsersSupported() - : ReadAttribute("number-of-pinusers-supported") - { - } - - ~ReadDoorLockNumberOfPINUsersSupported() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + bool mValue; }; -class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfPINUsersSupported() - : SubscribeAttribute("number-of-pinusers-supported") + SubscribeAttributeDoorLockEnablePrivacyModeButton() + : SubscribeAttribute("enable-privacy-mode-button") { } - ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() + ~SubscribeAttributeDoorLockEnablePrivacyModeButton() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::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); @@ -72439,10 +87721,10 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params + [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72456,34 +87738,34 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr }; /* - * Attribute NumberOfRFIDUsersSupported + * Attribute LocalProgrammingFeatures */ -class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { +class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { public: - ReadDoorLockNumberOfRFIDUsersSupported() - : ReadAttribute("number-of-rfidusers-supported") + ReadDoorLockLocalProgrammingFeatures() + : ReadAttribute("local-programming-features") { } - ~ReadDoorLockNumberOfRFIDUsersSupported() + ~ReadDoorLockLocalProgrammingFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + LogNSError("DoorLock LocalProgrammingFeatures read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72492,103 +87774,62 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { +class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() - : SubscribeAttribute("number-of-rfidusers-supported") + WriteDoorLockLocalProgrammingFeatures() + : WriteAttribute("local-programming-features") { + AddArgument("attr-name", "local-programming-features"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + ~WriteDoorLockLocalProgrammingFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported 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; - } -}; - -/* - * Attribute NumberOfWeekDaySchedulesSupportedPerUser - */ -class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { -public: - ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-week-day-schedules-supported-per-user") - { - } - - ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") + SubscribeAttributeDoorLockLocalProgrammingFeatures() + : SubscribeAttribute("local-programming-features") { } - ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + ~SubscribeAttributeDoorLockLocalProgrammingFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::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); @@ -72603,10 +87844,10 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params + [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72620,34 +87861,34 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi }; /* - * Attribute NumberOfYearDaySchedulesSupportedPerUser + * Attribute WrongCodeEntryLimit */ -class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { +class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { public: - ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-year-day-schedules-supported-per-user") + ReadDoorLockWrongCodeEntryLimit() + : ReadAttribute("wrong-code-entry-limit") { } - ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + ~ReadDoorLockWrongCodeEntryLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + LogNSError("DoorLock WrongCodeEntryLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72656,103 +87897,62 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut } }; -class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { +class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") + WriteDoorLockWrongCodeEntryLimit() + : WriteAttribute("wrong-code-entry-limit") { + AddArgument("attr-name", "wrong-code-entry-limit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + ~WriteDoorLockWrongCodeEntryLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock 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 subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser 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; - } -}; - -/* - * Attribute NumberOfHolidaySchedulesSupported - */ -class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { -public: - ReadDoorLockNumberOfHolidaySchedulesSupported() - : ReadAttribute("number-of-holiday-schedules-supported") - { - } - - ~ReadDoorLockNumberOfHolidaySchedulesSupported() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { +class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() - : SubscribeAttribute("number-of-holiday-schedules-supported") + SubscribeAttributeDoorLockWrongCodeEntryLimit() + : SubscribeAttribute("wrong-code-entry-limit") { } - ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + ~SubscribeAttributeDoorLockWrongCodeEntryLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::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); @@ -72767,10 +87967,10 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params + [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72784,34 +87984,34 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc }; /* - * Attribute MaxPINCodeLength + * Attribute UserCodeTemporaryDisableTime */ -class ReadDoorLockMaxPINCodeLength : public ReadAttribute { +class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { public: - ReadDoorLockMaxPINCodeLength() - : ReadAttribute("max-pincode-length") + ReadDoorLockUserCodeTemporaryDisableTime() + : ReadAttribute("user-code-temporary-disable-time") { } - ~ReadDoorLockMaxPINCodeLength() + ~ReadDoorLockUserCodeTemporaryDisableTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MaxPINCodeLength read Error", error); + LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72820,21 +88020,62 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { +class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { public: - SubscribeAttributeDoorLockMaxPINCodeLength() - : SubscribeAttribute("max-pincode-length") + WriteDoorLockUserCodeTemporaryDisableTime() + : WriteAttribute("user-code-temporary-disable-time") { + AddArgument("attr-name", "user-code-temporary-disable-time"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockMaxPINCodeLength() + ~WriteDoorLockUserCodeTemporaryDisableTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + : SubscribeAttribute("user-code-temporary-disable-time") + { + } + + ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::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); @@ -72849,10 +88090,10 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPINCodeLengthWithParams:params + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72866,34 +88107,34 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { }; /* - * Attribute MinPINCodeLength + * Attribute SendPINOverTheAir */ -class ReadDoorLockMinPINCodeLength : public ReadAttribute { +class ReadDoorLockSendPINOverTheAir : public ReadAttribute { public: - ReadDoorLockMinPINCodeLength() - : ReadAttribute("min-pincode-length") + ReadDoorLockSendPINOverTheAir() + : ReadAttribute("send-pinover-the-air") { } - ~ReadDoorLockMinPINCodeLength() + ~ReadDoorLockSendPINOverTheAir() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MinPINCodeLength read Error", error); + LogNSError("DoorLock SendPINOverTheAir read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72902,21 +88143,62 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { +class WriteDoorLockSendPINOverTheAir : public WriteAttribute { public: - SubscribeAttributeDoorLockMinPINCodeLength() - : SubscribeAttribute("min-pincode-length") + WriteDoorLockSendPINOverTheAir() + : WriteAttribute("send-pinover-the-air") + { + AddArgument("attr-name", "send-pinover-the-air"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockSendPINOverTheAir() { } - ~SubscribeAttributeDoorLockMinPINCodeLength() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeSendPINOverTheAirWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSendPINOverTheAir() + : SubscribeAttribute("send-pinover-the-air") + { + } + + ~SubscribeAttributeDoorLockSendPINOverTheAir() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::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); @@ -72931,10 +88213,10 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPINCodeLengthWithParams:params + [cluster subscribeAttributeSendPINOverTheAirWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72948,34 +88230,34 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { }; /* - * Attribute MaxRFIDCodeLength + * Attribute RequirePINforRemoteOperation */ -class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { +class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { public: - ReadDoorLockMaxRFIDCodeLength() - : ReadAttribute("max-rfidcode-length") + ReadDoorLockRequirePINforRemoteOperation() + : ReadAttribute("require-pinfor-remote-operation") { } - ~ReadDoorLockMaxRFIDCodeLength() + ~ReadDoorLockRequirePINforRemoteOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72984,21 +88266,62 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { +class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { public: - SubscribeAttributeDoorLockMaxRFIDCodeLength() - : SubscribeAttribute("max-rfidcode-length") + WriteDoorLockRequirePINforRemoteOperation() + : WriteAttribute("require-pinfor-remote-operation") { + AddArgument("attr-name", "require-pinfor-remote-operation"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockMaxRFIDCodeLength() + ~WriteDoorLockRequirePINforRemoteOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockRequirePINforRemoteOperation() + : SubscribeAttribute("require-pinfor-remote-operation") + { + } + + ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::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); @@ -73013,10 +88336,10 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params + [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73030,34 +88353,34 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { }; /* - * Attribute MinRFIDCodeLength + * Attribute ExpiringUserTimeout */ -class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { +class ReadDoorLockExpiringUserTimeout : public ReadAttribute { public: - ReadDoorLockMinRFIDCodeLength() - : ReadAttribute("min-rfidcode-length") + ReadDoorLockExpiringUserTimeout() + : ReadAttribute("expiring-user-timeout") { } - ~ReadDoorLockMinRFIDCodeLength() + ~ReadDoorLockExpiringUserTimeout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MinRFIDCodeLength read Error", error); + LogNSError("DoorLock ExpiringUserTimeout read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73066,21 +88389,62 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { +class WriteDoorLockExpiringUserTimeout : public WriteAttribute { public: - SubscribeAttributeDoorLockMinRFIDCodeLength() - : SubscribeAttribute("min-rfidcode-length") + WriteDoorLockExpiringUserTimeout() + : WriteAttribute("expiring-user-timeout") { + AddArgument("attr-name", "expiring-user-timeout"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockMinRFIDCodeLength() + ~WriteDoorLockExpiringUserTimeout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockExpiringUserTimeout() + : SubscribeAttribute("expiring-user-timeout") + { + } + + ~SubscribeAttributeDoorLockExpiringUserTimeout() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::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); @@ -73095,10 +88459,10 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params + [cluster subscribeAttributeExpiringUserTimeoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73112,34 +88476,34 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { }; /* - * Attribute CredentialRulesSupport + * Attribute GeneratedCommandList */ -class ReadDoorLockCredentialRulesSupport : public ReadAttribute { +class ReadDoorLockGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockCredentialRulesSupport() - : ReadAttribute("credential-rules-support") + ReadDoorLockGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockCredentialRulesSupport() + ~ReadDoorLockGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock CredentialRulesSupport read Error", error); + LogNSError("DoorLock GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73148,21 +88512,21 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { } }; -class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { +class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockCredentialRulesSupport() - : SubscribeAttribute("credential-rules-support") + SubscribeAttributeDoorLockGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockCredentialRulesSupport() + ~SubscribeAttributeDoorLockGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::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); @@ -73177,10 +88541,10 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCredentialRulesSupportWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73194,34 +88558,34 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu }; /* - * Attribute NumberOfCredentialsSupportedPerUser + * Attribute AcceptedCommandList */ -class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { +class ReadDoorLockAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockNumberOfCredentialsSupportedPerUser() - : ReadAttribute("number-of-credentials-supported-per-user") + ReadDoorLockAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockNumberOfCredentialsSupportedPerUser() + ~ReadDoorLockAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + LogNSError("DoorLock AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73230,21 +88594,21 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() - : SubscribeAttribute("number-of-credentials-supported-per-user") + SubscribeAttributeDoorLockAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + ~SubscribeAttributeDoorLockAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::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); @@ -73259,10 +88623,10 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73275,99 +88639,60 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Language + * Attribute EventList */ -class ReadDoorLockLanguage : public ReadAttribute { +class ReadDoorLockEventList : public ReadAttribute { public: - ReadDoorLockLanguage() - : ReadAttribute("language") + ReadDoorLockEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockLanguage() + ~ReadDoorLockEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock Language read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLanguage : public WriteAttribute { -public: - WriteDoorLockLanguage() - : WriteAttribute("language") - { - AddArgument("attr-name", "language"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLanguage() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLanguageWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { +class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLanguage() - : SubscribeAttribute("language") + SubscribeAttributeDoorLockEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockLanguage() + ~SubscribeAttributeDoorLockEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::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); @@ -73382,10 +88707,10 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLanguageWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73398,99 +88723,60 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute LEDSettings + * Attribute AttributeList */ -class ReadDoorLockLEDSettings : public ReadAttribute { +class ReadDoorLockAttributeList : public ReadAttribute { public: - ReadDoorLockLEDSettings() - : ReadAttribute("ledsettings") + ReadDoorLockAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockLEDSettings() + ~ReadDoorLockAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock LEDSettings read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLEDSettings : public WriteAttribute { -public: - WriteDoorLockLEDSettings() - : WriteAttribute("ledsettings") - { - AddArgument("attr-name", "ledsettings"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLEDSettings() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLEDSettingsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); + LogNSError("DoorLock AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { +class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLEDSettings() - : SubscribeAttribute("ledsettings") + SubscribeAttributeDoorLockAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockLEDSettings() + ~SubscribeAttributeDoorLockAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::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); @@ -73505,10 +88791,10 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLEDSettingsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73522,98 +88808,57 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { }; /* - * Attribute AutoRelockTime + * Attribute FeatureMap */ -class ReadDoorLockAutoRelockTime : public ReadAttribute { +class ReadDoorLockFeatureMap : public ReadAttribute { public: - ReadDoorLockAutoRelockTime() - : ReadAttribute("auto-relock-time") + ReadDoorLockFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockAutoRelockTime() + ~ReadDoorLockFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AutoRelockTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockAutoRelockTime : public WriteAttribute { -public: - WriteDoorLockAutoRelockTime() - : WriteAttribute("auto-relock-time") - { - AddArgument("attr-name", "auto-relock-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockAutoRelockTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeAutoRelockTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); + LogNSError("DoorLock FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { +class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAutoRelockTime() - : SubscribeAttribute("auto-relock-time") + SubscribeAttributeDoorLockFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockAutoRelockTime() + ~SubscribeAttributeDoorLockFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::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); @@ -73628,10 +88873,10 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAutoRelockTimeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73645,98 +88890,57 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { }; /* - * Attribute SoundVolume + * Attribute ClusterRevision */ -class ReadDoorLockSoundVolume : public ReadAttribute { +class ReadDoorLockClusterRevision : public ReadAttribute { public: - ReadDoorLockSoundVolume() - : ReadAttribute("sound-volume") + ReadDoorLockClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockSoundVolume() + ~ReadDoorLockClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::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); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SoundVolume read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSoundVolume : public WriteAttribute { -public: - WriteDoorLockSoundVolume() - : WriteAttribute("sound-volume") - { - AddArgument("attr-name", "sound-volume"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSoundVolume() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSoundVolumeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); + LogNSError("DoorLock ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSoundVolume() - : SubscribeAttribute("sound-volume") + SubscribeAttributeDoorLockClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockSoundVolume() + ~SubscribeAttributeDoorLockClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::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); @@ -73751,10 +88955,10 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoundVolumeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73767,158 +88971,400 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute OperatingMode + * Command UpOrOpen */ -class ReadDoorLockOperatingMode : public ReadAttribute { +class WindowCoveringUpOrOpen : public ClusterCommand { public: - ReadDoorLockOperatingMode() - : ReadAttribute("operating-mode") + WindowCoveringUpOrOpen() + : ClusterCommand("up-or-open") { + ClusterCommand::AddArguments(); } - ~ReadDoorLockOperatingMode() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::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); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams 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 upOrOpenWithParams: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: +}; + +/* + * Command DownOrClose + */ +class WindowCoveringDownOrClose : public ClusterCommand { +public: + WindowCoveringDownOrClose() + : ClusterCommand("down-or-close") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock OperatingMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams 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 downOrCloseWithParams: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: }; -class WriteDoorLockOperatingMode : public WriteAttribute { +/* + * Command StopMotion + */ +class WindowCoveringStopMotion : public ClusterCommand { public: - WriteDoorLockOperatingMode() - : WriteAttribute("operating-mode") + WindowCoveringStopMotion() + : ClusterCommand("stop-motion") { - AddArgument("attr-name", "operating-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteDoorLockOperatingMode() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::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); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams 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 stopMotionWithParams: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: +}; + +/* + * Command GoToLiftValue + */ +class WindowCoveringGoToLiftValue : public ClusterCommand { +public: + WindowCoveringGoToLiftValue() + : ClusterCommand("go-to-lift-value") { + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeOperatingModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftValueWithParams: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: - uint8_t mValue; + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; -class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +/* + * Command GoToLiftPercentage + */ +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - SubscribeAttributeDoorLockOperatingMode() - : SubscribeAttribute("operating-mode") + WindowCoveringGoToLiftPercentage() + : ClusterCommand("go-to-lift-percentage") { + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeDoorLockOperatingMode() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::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); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftPercentageWithParams: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::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; +}; + +/* + * Command GoToTiltValue + */ +class WindowCoveringGoToTiltValue : public ClusterCommand { +public: + WindowCoveringGoToTiltValue() + : ClusterCommand("go-to-tilt-value") { + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterDoorLock 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(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltValueWithParams: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); + } + }]; } - [cluster subscribeAttributeOperatingModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode 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; + } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; +}; + +/* + * Command GoToTiltPercentage + */ +class WindowCoveringGoToTiltPercentage : public ClusterCommand { +public: + WindowCoveringGoToTiltPercentage() + : ClusterCommand("go-to-tilt-percentage") + { + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::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); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltPercentageWithParams: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::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; /* - * Attribute SupportedOperatingModes + * Attribute Type */ -class ReadDoorLockSupportedOperatingModes : public ReadAttribute { +class ReadWindowCoveringType : public ReadAttribute { public: - ReadDoorLockSupportedOperatingModes() - : ReadAttribute("supported-operating-modes") + ReadWindowCoveringType() + : ReadAttribute("type") { } - ~ReadDoorLockSupportedOperatingModes() + ~ReadWindowCoveringType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Type response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SupportedOperatingModes read Error", error); + LogNSError("WindowCovering Type read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73927,25 +89373,25 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { } }; -class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSupportedOperatingModes() - : SubscribeAttribute("supported-operating-modes") + SubscribeAttributeWindowCoveringType() + : SubscribeAttribute("type") { } - ~SubscribeAttributeDoorLockSupportedOperatingModes() + ~SubscribeAttributeWindowCoveringType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73956,10 +89402,10 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedOperatingModesWithParams:params + [cluster subscribeAttributeTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + NSLog(@"WindowCovering.Type response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73973,34 +89419,34 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib }; /* - * Attribute DefaultConfigurationRegister + * Attribute PhysicalClosedLimitLift */ -class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { public: - ReadDoorLockDefaultConfigurationRegister() - : ReadAttribute("default-configuration-register") + ReadWindowCoveringPhysicalClosedLimitLift() + : ReadAttribute("physical-closed-limit-lift") { } - ~ReadDoorLockDefaultConfigurationRegister() + ~ReadWindowCoveringPhysicalClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DefaultConfigurationRegister read Error", error); + LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74009,25 +89455,25 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDefaultConfigurationRegister() - : SubscribeAttribute("default-configuration-register") + SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + : SubscribeAttribute("physical-closed-limit-lift") { } - ~SubscribeAttributeDoorLockDefaultConfigurationRegister() + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74038,10 +89484,10 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params + [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74055,102 +89501,61 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA }; /* - * Attribute EnableLocalProgramming + * Attribute PhysicalClosedLimitTilt */ -class ReadDoorLockEnableLocalProgramming : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { public: - ReadDoorLockEnableLocalProgramming() - : ReadAttribute("enable-local-programming") + ReadWindowCoveringPhysicalClosedLimitTilt() + : ReadAttribute("physical-closed-limit-tilt") { } - ~ReadDoorLockEnableLocalProgramming() + ~ReadWindowCoveringPhysicalClosedLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableLocalProgramming read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableLocalProgramming : public WriteAttribute { -public: - WriteDoorLockEnableLocalProgramming() - : WriteAttribute("enable-local-programming") - { - AddArgument("attr-name", "enable-local-programming"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableLocalProgramming() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); + LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableLocalProgramming() - : SubscribeAttribute("enable-local-programming") + SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + : SubscribeAttribute("physical-closed-limit-tilt") { } - ~SubscribeAttributeDoorLockEnableLocalProgramming() + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74161,10 +89566,10 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableLocalProgrammingWithParams:params + [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74178,102 +89583,61 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu }; /* - * Attribute EnableOneTouchLocking + * Attribute CurrentPositionLift */ -class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { public: - ReadDoorLockEnableOneTouchLocking() - : ReadAttribute("enable-one-touch-locking") + ReadWindowCoveringCurrentPositionLift() + : ReadAttribute("current-position-lift") { } - ~ReadDoorLockEnableOneTouchLocking() + ~ReadWindowCoveringCurrentPositionLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableOneTouchLocking read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { -public: - WriteDoorLockEnableOneTouchLocking() - : WriteAttribute("enable-one-touch-locking") - { - AddArgument("attr-name", "enable-one-touch-locking"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableOneTouchLocking() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); + LogNSError("WindowCovering CurrentPositionLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableOneTouchLocking() - : SubscribeAttribute("enable-one-touch-locking") + SubscribeAttributeWindowCoveringCurrentPositionLift() + : SubscribeAttribute("current-position-lift") { } - ~SubscribeAttributeDoorLockEnableOneTouchLocking() + ~SubscribeAttributeWindowCoveringCurrentPositionLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74284,10 +89648,10 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableOneTouchLockingWithParams:params + [cluster subscribeAttributeCurrentPositionLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74301,102 +89665,61 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut }; /* - * Attribute EnableInsideStatusLED + * Attribute CurrentPositionTilt */ -class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { public: - ReadDoorLockEnableInsideStatusLED() - : ReadAttribute("enable-inside-status-led") + ReadWindowCoveringCurrentPositionTilt() + : ReadAttribute("current-position-tilt") { } - ~ReadDoorLockEnableInsideStatusLED() + ~ReadWindowCoveringCurrentPositionTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableInsideStatusLED read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { -public: - WriteDoorLockEnableInsideStatusLED() - : WriteAttribute("enable-inside-status-led") - { - AddArgument("attr-name", "enable-inside-status-led"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableInsideStatusLED() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); + LogNSError("WindowCovering CurrentPositionTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableInsideStatusLED() - : SubscribeAttribute("enable-inside-status-led") + SubscribeAttributeWindowCoveringCurrentPositionTilt() + : SubscribeAttribute("current-position-tilt") { } - ~SubscribeAttributeDoorLockEnableInsideStatusLED() + ~SubscribeAttributeWindowCoveringCurrentPositionTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74407,10 +89730,10 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params + [cluster subscribeAttributeCurrentPositionTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74424,102 +89747,61 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut }; /* - * Attribute EnablePrivacyModeButton + * Attribute NumberOfActuationsLift */ -class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { public: - ReadDoorLockEnablePrivacyModeButton() - : ReadAttribute("enable-privacy-mode-button") + ReadWindowCoveringNumberOfActuationsLift() + : ReadAttribute("number-of-actuations-lift") { } - ~ReadDoorLockEnablePrivacyModeButton() + ~ReadWindowCoveringNumberOfActuationsLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnablePrivacyModeButton read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { -public: - WriteDoorLockEnablePrivacyModeButton() - : WriteAttribute("enable-privacy-mode-button") - { - AddArgument("attr-name", "enable-privacy-mode-button"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnablePrivacyModeButton() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + LogNSError("WindowCovering NumberOfActuationsLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnablePrivacyModeButton() - : SubscribeAttribute("enable-privacy-mode-button") + SubscribeAttributeWindowCoveringNumberOfActuationsLift() + : SubscribeAttribute("number-of-actuations-lift") { } - ~SubscribeAttributeDoorLockEnablePrivacyModeButton() + ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74530,10 +89812,10 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params + [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74547,102 +89829,61 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib }; /* - * Attribute LocalProgrammingFeatures + * Attribute NumberOfActuationsTilt */ -class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { public: - ReadDoorLockLocalProgrammingFeatures() - : ReadAttribute("local-programming-features") + ReadWindowCoveringNumberOfActuationsTilt() + : ReadAttribute("number-of-actuations-tilt") { } - ~ReadDoorLockLocalProgrammingFeatures() + ~ReadWindowCoveringNumberOfActuationsTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock LocalProgrammingFeatures read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { -public: - WriteDoorLockLocalProgrammingFeatures() - : WriteAttribute("local-programming-features") - { - AddArgument("attr-name", "local-programming-features"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLocalProgrammingFeatures() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLocalProgrammingFeatures() - : SubscribeAttribute("local-programming-features") + SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + : SubscribeAttribute("number-of-actuations-tilt") { } - ~SubscribeAttributeDoorLockLocalProgrammingFeatures() + ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74653,10 +89894,10 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params + [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74670,102 +89911,61 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri }; /* - * Attribute WrongCodeEntryLimit + * Attribute ConfigStatus */ -class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { +class ReadWindowCoveringConfigStatus : public ReadAttribute { public: - ReadDoorLockWrongCodeEntryLimit() - : ReadAttribute("wrong-code-entry-limit") + ReadWindowCoveringConfigStatus() + : ReadAttribute("config-status") { } - ~ReadDoorLockWrongCodeEntryLimit() + ~ReadWindowCoveringConfigStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock WrongCodeEntryLimit read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { -public: - WriteDoorLockWrongCodeEntryLimit() - : WriteAttribute("wrong-code-entry-limit") - { - AddArgument("attr-name", "wrong-code-entry-limit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockWrongCodeEntryLimit() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + LogNSError("WindowCovering ConfigStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { public: - SubscribeAttributeDoorLockWrongCodeEntryLimit() - : SubscribeAttribute("wrong-code-entry-limit") + SubscribeAttributeWindowCoveringConfigStatus() + : SubscribeAttribute("config-status") { } - ~SubscribeAttributeDoorLockWrongCodeEntryLimit() + ~SubscribeAttributeWindowCoveringConfigStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74776,10 +89976,10 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params + [cluster subscribeAttributeConfigStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74793,102 +89993,61 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute }; /* - * Attribute UserCodeTemporaryDisableTime + * Attribute CurrentPositionLiftPercentage */ -class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { public: - ReadDoorLockUserCodeTemporaryDisableTime() - : ReadAttribute("user-code-temporary-disable-time") + ReadWindowCoveringCurrentPositionLiftPercentage() + : ReadAttribute("current-position-lift-percentage") { } - ~ReadDoorLockUserCodeTemporaryDisableTime() + ~ReadWindowCoveringCurrentPositionLiftPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { -public: - WriteDoorLockUserCodeTemporaryDisableTime() - : WriteAttribute("user-code-temporary-disable-time") - { - AddArgument("attr-name", "user-code-temporary-disable-time"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockUserCodeTemporaryDisableTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { public: - SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() - : SubscribeAttribute("user-code-temporary-disable-time") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + : SubscribeAttribute("current-position-lift-percentage") { } - ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74899,10 +90058,10 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74916,102 +90075,61 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA }; /* - * Attribute SendPINOverTheAir + * Attribute CurrentPositionTiltPercentage */ -class ReadDoorLockSendPINOverTheAir : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { public: - ReadDoorLockSendPINOverTheAir() - : ReadAttribute("send-pinover-the-air") + ReadWindowCoveringCurrentPositionTiltPercentage() + : ReadAttribute("current-position-tilt-percentage") { } - ~ReadDoorLockSendPINOverTheAir() + ~ReadWindowCoveringCurrentPositionTiltPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SendPINOverTheAir read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSendPINOverTheAir : public WriteAttribute { -public: - WriteDoorLockSendPINOverTheAir() - : WriteAttribute("send-pinover-the-air") - { - AddArgument("attr-name", "send-pinover-the-air"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSendPINOverTheAir() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeSendPINOverTheAirWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSendPINOverTheAir() - : SubscribeAttribute("send-pinover-the-air") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + : SubscribeAttribute("current-position-tilt-percentage") { } - ~SubscribeAttributeDoorLockSendPINOverTheAir() + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75022,10 +90140,10 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSendPINOverTheAirWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75039,102 +90157,61 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { }; /* - * Attribute RequirePINforRemoteOperation + * Attribute OperationalStatus */ -class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { +class ReadWindowCoveringOperationalStatus : public ReadAttribute { public: - ReadDoorLockRequirePINforRemoteOperation() - : ReadAttribute("require-pinfor-remote-operation") + ReadWindowCoveringOperationalStatus() + : ReadAttribute("operational-status") { } - ~ReadDoorLockRequirePINforRemoteOperation() + ~ReadWindowCoveringOperationalStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { -public: - WriteDoorLockRequirePINforRemoteOperation() - : WriteAttribute("require-pinfor-remote-operation") - { - AddArgument("attr-name", "require-pinfor-remote-operation"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockRequirePINforRemoteOperation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + LogNSError("WindowCovering OperationalStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { public: - SubscribeAttributeDoorLockRequirePINforRemoteOperation() - : SubscribeAttribute("require-pinfor-remote-operation") + SubscribeAttributeWindowCoveringOperationalStatus() + : SubscribeAttribute("operational-status") { } - ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() + ~SubscribeAttributeWindowCoveringOperationalStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75145,10 +90222,10 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75162,102 +90239,61 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA }; /* - * Attribute ExpiringUserTimeout + * Attribute TargetPositionLiftPercent100ths */ -class ReadDoorLockExpiringUserTimeout : public ReadAttribute { +class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { public: - ReadDoorLockExpiringUserTimeout() - : ReadAttribute("expiring-user-timeout") + ReadWindowCoveringTargetPositionLiftPercent100ths() + : ReadAttribute("target-position-lift-percent100ths") { } - ~ReadDoorLockExpiringUserTimeout() + ~ReadWindowCoveringTargetPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ExpiringUserTimeout read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockExpiringUserTimeout : public WriteAttribute { -public: - WriteDoorLockExpiringUserTimeout() - : WriteAttribute("expiring-user-timeout") - { - AddArgument("attr-name", "expiring-user-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockExpiringUserTimeout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); + LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockExpiringUserTimeout() - : SubscribeAttribute("expiring-user-timeout") + SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + : SubscribeAttribute("target-position-lift-percent100ths") { } - ~SubscribeAttributeDoorLockExpiringUserTimeout() + ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75268,10 +90304,10 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiringUserTimeoutWithParams:params + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75285,34 +90321,34 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute }; /* - * Attribute GeneratedCommandList + * Attribute TargetPositionTiltPercent100ths */ -class ReadDoorLockGeneratedCommandList : public ReadAttribute { +class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { public: - ReadDoorLockGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWindowCoveringTargetPositionTiltPercent100ths() + : ReadAttribute("target-position-tilt-percent100ths") { } - ~ReadDoorLockGeneratedCommandList() + ~ReadWindowCoveringTargetPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock GeneratedCommandList read Error", error); + LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75321,25 +90357,25 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + : SubscribeAttribute("target-position-tilt-percent100ths") { } - ~SubscribeAttributeDoorLockGeneratedCommandList() + ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75350,10 +90386,10 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75367,34 +90403,34 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute }; /* - * Attribute AcceptedCommandList + * Attribute EndProductType */ -class ReadDoorLockAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringEndProductType : public ReadAttribute { public: - ReadDoorLockAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWindowCoveringEndProductType() + : ReadAttribute("end-product-type") { } - ~ReadDoorLockAcceptedCommandList() + ~ReadWindowCoveringEndProductType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AcceptedCommandList read Error", error); + LogNSError("WindowCovering EndProductType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75403,25 +90439,25 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWindowCoveringEndProductType() + : SubscribeAttribute("end-product-type") { } - ~SubscribeAttributeDoorLockAcceptedCommandList() + ~SubscribeAttributeWindowCoveringEndProductType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75432,10 +90468,10 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEndProductTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75448,37 +90484,35 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CurrentPositionLiftPercent100ths */ -class ReadDoorLockEventList : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { public: - ReadDoorLockEventList() - : ReadAttribute("event-list") + ReadWindowCoveringCurrentPositionLiftPercent100ths() + : ReadAttribute("current-position-lift-percent100ths") { } - ~ReadDoorLockEventList() + ~ReadWindowCoveringCurrentPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EventList read Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75487,25 +90521,25 @@ class ReadDoorLockEventList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + : SubscribeAttribute("current-position-lift-percent100ths") { } - ~SubscribeAttributeDoorLockEventList() + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75516,10 +90550,10 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75532,37 +90566,35 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute CurrentPositionTiltPercent100ths */ -class ReadDoorLockAttributeList : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { public: - ReadDoorLockAttributeList() - : ReadAttribute("attribute-list") + ReadWindowCoveringCurrentPositionTiltPercent100ths() + : ReadAttribute("current-position-tilt-percent100ths") { } - ~ReadDoorLockAttributeList() + ~ReadWindowCoveringCurrentPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AttributeList read Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75571,25 +90603,25 @@ class ReadDoorLockAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + : SubscribeAttribute("current-position-tilt-percent100ths") { } - ~SubscribeAttributeDoorLockAttributeList() + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75600,10 +90632,10 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75617,34 +90649,34 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute InstalledOpenLimitLift */ -class ReadDoorLockFeatureMap : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { public: - ReadDoorLockFeatureMap() - : ReadAttribute("feature-map") + ReadWindowCoveringInstalledOpenLimitLift() + : ReadAttribute("installed-open-limit-lift") { } - ~ReadDoorLockFeatureMap() + ~ReadWindowCoveringInstalledOpenLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock FeatureMap read Error", error); + LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75653,25 +90685,25 @@ class ReadDoorLockFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + : SubscribeAttribute("installed-open-limit-lift") { } - ~SubscribeAttributeDoorLockFeatureMap() + ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75682,10 +90714,10 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75699,34 +90731,34 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute InstalledClosedLimitLift */ -class ReadDoorLockClusterRevision : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { public: - ReadDoorLockClusterRevision() - : ReadAttribute("cluster-revision") + ReadWindowCoveringInstalledClosedLimitLift() + : ReadAttribute("installed-closed-limit-lift") { } - ~ReadDoorLockClusterRevision() + ~ReadWindowCoveringInstalledClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ClusterRevision read Error", error); + LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75735,25 +90767,25 @@ class ReadDoorLockClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + : SubscribeAttribute("installed-closed-limit-lift") { } - ~SubscribeAttributeDoorLockClusterRevision() + ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::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); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75764,10 +90796,10 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75780,400 +90812,322 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command UpOrOpen + * Attribute InstalledOpenLimitTilt */ -class WindowCoveringUpOrOpen : public ClusterCommand { +class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { public: - WindowCoveringUpOrOpen() - : ClusterCommand("up-or-open") + ReadWindowCoveringInstalledOpenLimitTilt() + : ReadAttribute("installed-open-limit-tilt") + { + } + + ~ReadWindowCoveringInstalledOpenLimitTilt() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams 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 upOrOpenWithParams: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); - } - }]; - } + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command DownOrClose - */ -class WindowCoveringDownOrClose : public ClusterCommand { +class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { public: - WindowCoveringDownOrClose() - : ClusterCommand("down-or-close") + SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + : SubscribeAttribute("installed-open-limit-tilt") + { + } + + ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams 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 downOrCloseWithParams: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); - } - }]; + __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 subscribeAttributeInstalledOpenLimitTiltWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitTilt 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; } - -private: }; /* - * Command StopMotion + * Attribute InstalledClosedLimitTilt */ -class WindowCoveringStopMotion : public ClusterCommand { +class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { public: - WindowCoveringStopMotion() - : ClusterCommand("stop-motion") + ReadWindowCoveringInstalledClosedLimitTilt() + : ReadAttribute("installed-closed-limit-tilt") + { + } + + ~ReadWindowCoveringInstalledClosedLimitTilt() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams 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 stopMotionWithParams: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); - } - }]; - } + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command GoToLiftValue - */ -class WindowCoveringGoToLiftValue : public ClusterCommand { +class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { public: - WindowCoveringGoToLiftValue() - : ClusterCommand("go-to-lift-value") + SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + : SubscribeAttribute("installed-closed-limit-tilt") + { + } + + ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftValueWithParams: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); - } - }]; + __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 subscribeAttributeInstalledClosedLimitTiltWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt 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; } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; /* - * Command GoToLiftPercentage + * Attribute Mode */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand { +class ReadWindowCoveringMode : public ReadAttribute { public: - WindowCoveringGoToLiftPercentage() - : ClusterCommand("go-to-lift-percentage") + ReadWindowCoveringMode() + : ReadAttribute("mode") + { + } + + ~ReadWindowCoveringMode() { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftPercentageWithParams: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); - } - }]; - } + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering Mode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; -/* - * Command GoToTiltValue - */ -class WindowCoveringGoToTiltValue : public ClusterCommand { +class WriteWindowCoveringMode : public WriteAttribute { public: - WindowCoveringGoToTiltValue() - : ClusterCommand("go-to-tilt-value") + WriteWindowCoveringMode() + : WriteAttribute("mode") + { + AddArgument("attr-name", "mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteWindowCoveringMode() { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltValueWithParams: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); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; + uint8_t mValue; }; -/* - * Command GoToTiltPercentage - */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand { +class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { public: - WindowCoveringGoToTiltPercentage() - : ClusterCommand("go-to-tilt-percentage") + SubscribeAttributeWindowCoveringMode() + : SubscribeAttribute("mode") + { + } + + ~SubscribeAttributeWindowCoveringMode() { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltPercentageWithParams: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); - } - }]; + __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 subscribeAttributeModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode 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; } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; /* - * Attribute Type + * Attribute SafetyStatus */ -class ReadWindowCoveringType : public ReadAttribute { +class ReadWindowCoveringSafetyStatus : public ReadAttribute { public: - ReadWindowCoveringType() - : ReadAttribute("type") + ReadWindowCoveringSafetyStatus() + : ReadAttribute("safety-status") { } - ~ReadWindowCoveringType() + ~ReadWindowCoveringSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering Type read Error", error); + LogNSError("WindowCovering SafetyStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76182,21 +91136,21 @@ class ReadWindowCoveringType : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringType() - : SubscribeAttribute("type") + SubscribeAttributeWindowCoveringSafetyStatus() + : SubscribeAttribute("safety-status") { } - ~SubscribeAttributeWindowCoveringType() + ~SubscribeAttributeWindowCoveringSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::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); @@ -76211,10 +91165,10 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTypeWithParams:params + [cluster subscribeAttributeSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76228,34 +91182,34 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { }; /* - * Attribute PhysicalClosedLimitLift + * Attribute GeneratedCommandList */ -class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { +class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitLift() - : ReadAttribute("physical-closed-limit-lift") + ReadWindowCoveringGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadWindowCoveringPhysicalClosedLimitLift() + ~ReadWindowCoveringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + LogNSError("WindowCovering GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76264,21 +91218,21 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() - : SubscribeAttribute("physical-closed-limit-lift") + SubscribeAttributeWindowCoveringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + ~SubscribeAttributeWindowCoveringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::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); @@ -76293,10 +91247,10 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76310,34 +91264,34 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe }; /* - * Attribute PhysicalClosedLimitTilt + * Attribute AcceptedCommandList */ -class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { +class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitTilt() - : ReadAttribute("physical-closed-limit-tilt") + ReadWindowCoveringAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadWindowCoveringPhysicalClosedLimitTilt() + ~ReadWindowCoveringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + LogNSError("WindowCovering AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76346,21 +91300,21 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() - : SubscribeAttribute("physical-closed-limit-tilt") + SubscribeAttributeWindowCoveringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + ~SubscribeAttributeWindowCoveringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::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); @@ -76375,10 +91329,10 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76391,35 +91345,37 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionLift + * Attribute EventList */ -class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { +class ReadWindowCoveringEventList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLift() - : ReadAttribute("current-position-lift") + ReadWindowCoveringEventList() + : ReadAttribute("event-list") { } - ~ReadWindowCoveringCurrentPositionLift() + ~ReadWindowCoveringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLift read Error", error); + LogNSError("WindowCovering EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76428,21 +91384,21 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLift() - : SubscribeAttribute("current-position-lift") + SubscribeAttributeWindowCoveringEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLift() + ~SubscribeAttributeWindowCoveringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::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); @@ -76457,10 +91413,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76473,35 +91429,37 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionTilt + * Attribute AttributeList */ -class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { +class ReadWindowCoveringAttributeList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTilt() - : ReadAttribute("current-position-tilt") + ReadWindowCoveringAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWindowCoveringCurrentPositionTilt() + ~ReadWindowCoveringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTilt read Error", error); + LogNSError("WindowCovering AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76510,21 +91468,21 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTilt() - : SubscribeAttribute("current-position-tilt") + SubscribeAttributeWindowCoveringAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTilt() + ~SubscribeAttributeWindowCoveringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::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); @@ -76539,10 +91497,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76556,34 +91514,34 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr }; /* - * Attribute NumberOfActuationsLift + * Attribute FeatureMap */ -class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { +class ReadWindowCoveringFeatureMap : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsLift() - : ReadAttribute("number-of-actuations-lift") + ReadWindowCoveringFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWindowCoveringNumberOfActuationsLift() + ~ReadWindowCoveringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering NumberOfActuationsLift read Error", error); + LogNSError("WindowCovering FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76592,21 +91550,21 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsLift() - : SubscribeAttribute("number-of-actuations-lift") + SubscribeAttributeWindowCoveringFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() + ~SubscribeAttributeWindowCoveringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::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); @@ -76621,10 +91579,10 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76638,34 +91596,34 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA }; /* - * Attribute NumberOfActuationsTilt + * Attribute ClusterRevision */ -class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { +class ReadWindowCoveringClusterRevision : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsTilt() - : ReadAttribute("number-of-actuations-tilt") + ReadWindowCoveringClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWindowCoveringNumberOfActuationsTilt() + ~ReadWindowCoveringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::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); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); + LogNSError("WindowCovering ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76674,21 +91632,21 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsTilt() - : SubscribeAttribute("number-of-actuations-tilt") + SubscribeAttributeWindowCoveringClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + ~SubscribeAttributeWindowCoveringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::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); @@ -76703,10 +91661,10 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76719,35 +91677,154 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA } }; +/*----------------------------------------------------------------------------*\ +| Cluster BarrierControl | 0x0103 | +|------------------------------------------------------------------------------| +| Commands: | | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ConfigStatus + * Command BarrierControlGoToPercent */ -class ReadWindowCoveringConfigStatus : public ReadAttribute { +class BarrierControlBarrierControlGoToPercent : public ClusterCommand { public: - ReadWindowCoveringConfigStatus() - : ReadAttribute("config-status") + BarrierControlBarrierControlGoToPercent() + : ClusterCommand("barrier-control-go-to-percent") { + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); + ClusterCommand::AddArguments(); } - ~ReadWindowCoveringConfigStatus() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::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); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster barrierControlGoToPercentWithParams: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::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; +}; + +/* + * Command BarrierControlStop + */ +class BarrierControlBarrierControlStop : public ClusterCommand { +public: + BarrierControlBarrierControlStop() + : ClusterCommand("barrier-control-stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::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); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams 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 barrierControlStopWithParams: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: +}; + +/* + * Attribute BarrierMovingState + */ +class ReadBarrierControlBarrierMovingState : public ReadAttribute { +public: + ReadBarrierControlBarrierMovingState() + : ReadAttribute("barrier-moving-state") + { + } + + ~ReadBarrierControlBarrierMovingState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering ConfigStatus read Error", error); + LogNSError("BarrierControl BarrierMovingState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76756,25 +91833,25 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringConfigStatus() - : SubscribeAttribute("config-status") + SubscribeAttributeBarrierControlBarrierMovingState() + : SubscribeAttribute("barrier-moving-state") { } - ~SubscribeAttributeWindowCoveringConfigStatus() + ~SubscribeAttributeBarrierControlBarrierMovingState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76785,10 +91862,10 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConfigStatusWithParams:params + [cluster subscribeAttributeBarrierMovingStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76802,34 +91879,34 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { }; /* - * Attribute CurrentPositionLiftPercentage + * Attribute BarrierSafetyStatus */ -class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { +class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLiftPercentage() - : ReadAttribute("current-position-lift-percentage") + ReadBarrierControlBarrierSafetyStatus() + : ReadAttribute("barrier-safety-status") { } - ~ReadWindowCoveringCurrentPositionLiftPercentage() + ~ReadBarrierControlBarrierSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); + LogNSError("BarrierControl BarrierSafetyStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76838,25 +91915,25 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() - : SubscribeAttribute("current-position-lift-percentage") + SubscribeAttributeBarrierControlBarrierSafetyStatus() + : SubscribeAttribute("barrier-safety-status") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + ~SubscribeAttributeBarrierControlBarrierSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76867,10 +91944,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params + [cluster subscribeAttributeBarrierSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76884,34 +91961,34 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub }; /* - * Attribute CurrentPositionTiltPercentage + * Attribute BarrierCapabilities */ -class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { +class ReadBarrierControlBarrierCapabilities : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercentage() - : ReadAttribute("current-position-tilt-percentage") + ReadBarrierControlBarrierCapabilities() + : ReadAttribute("barrier-capabilities") { } - ~ReadWindowCoveringCurrentPositionTiltPercentage() + ~ReadBarrierControlBarrierCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); + LogNSError("BarrierControl BarrierCapabilities read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76920,25 +91997,25 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() - : SubscribeAttribute("current-position-tilt-percentage") + SubscribeAttributeBarrierControlBarrierCapabilities() + : SubscribeAttribute("barrier-capabilities") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + ~SubscribeAttributeBarrierControlBarrierCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76949,10 +92026,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params + [cluster subscribeAttributeBarrierCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76966,34 +92043,34 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub }; /* - * Attribute OperationalStatus + * Attribute BarrierOpenEvents */ -class ReadWindowCoveringOperationalStatus : public ReadAttribute { +class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { public: - ReadWindowCoveringOperationalStatus() - : ReadAttribute("operational-status") + ReadBarrierControlBarrierOpenEvents() + : ReadAttribute("barrier-open-events") { } - ~ReadWindowCoveringOperationalStatus() + ~ReadBarrierControlBarrierOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering OperationalStatus read Error", error); + LogNSError("BarrierControl BarrierOpenEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77002,25 +92079,66 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { +class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringOperationalStatus() - : SubscribeAttribute("operational-status") + WriteBarrierControlBarrierOpenEvents() + : WriteAttribute("barrier-open-events") { + AddArgument("attr-name", "barrier-open-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringOperationalStatus() + ~WriteBarrierControlBarrierOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierOpenEvents() + : SubscribeAttribute("barrier-open-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierOpenEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77031,10 +92149,10 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStatusWithParams:params + [cluster subscribeAttributeBarrierOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77048,34 +92166,34 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib }; /* - * Attribute TargetPositionLiftPercent100ths + * Attribute BarrierCloseEvents */ -class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { +class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { public: - ReadWindowCoveringTargetPositionLiftPercent100ths() - : ReadAttribute("target-position-lift-percent100ths") + ReadBarrierControlBarrierCloseEvents() + : ReadAttribute("barrier-close-events") { } - ~ReadWindowCoveringTargetPositionLiftPercent100ths() + ~ReadBarrierControlBarrierCloseEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + LogNSError("BarrierControl BarrierCloseEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77084,25 +92202,66 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { +class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() - : SubscribeAttribute("target-position-lift-percent100ths") + WriteBarrierControlBarrierCloseEvents() + : WriteAttribute("barrier-close-events") { + AddArgument("attr-name", "barrier-close-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + ~WriteBarrierControlBarrierCloseEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierCloseEvents() + : SubscribeAttribute("barrier-close-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierCloseEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77113,10 +92272,10 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeBarrierCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77130,34 +92289,34 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S }; /* - * Attribute TargetPositionTiltPercent100ths + * Attribute BarrierCommandOpenEvents */ -class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { +class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { public: - ReadWindowCoveringTargetPositionTiltPercent100ths() - : ReadAttribute("target-position-tilt-percent100ths") + ReadBarrierControlBarrierCommandOpenEvents() + : ReadAttribute("barrier-command-open-events") { } - ~ReadWindowCoveringTargetPositionTiltPercent100ths() + ~ReadBarrierControlBarrierCommandOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77166,25 +92325,66 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { +class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() - : SubscribeAttribute("target-position-tilt-percent100ths") + WriteBarrierControlBarrierCommandOpenEvents() + : WriteAttribute("barrier-command-open-events") { + AddArgument("attr-name", "barrier-command-open-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + ~WriteBarrierControlBarrierCommandOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + : SubscribeAttribute("barrier-command-open-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77195,10 +92395,10 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77212,34 +92412,34 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S }; /* - * Attribute EndProductType + * Attribute BarrierCommandCloseEvents */ -class ReadWindowCoveringEndProductType : public ReadAttribute { +class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { public: - ReadWindowCoveringEndProductType() - : ReadAttribute("end-product-type") + ReadBarrierControlBarrierCommandCloseEvents() + : ReadAttribute("barrier-command-close-events") { } - ~ReadWindowCoveringEndProductType() + ~ReadBarrierControlBarrierCommandCloseEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering EndProductType read Error", error); + LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77248,25 +92448,66 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { +class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringEndProductType() - : SubscribeAttribute("end-product-type") + WriteBarrierControlBarrierCommandCloseEvents() + : WriteAttribute("barrier-command-close-events") { + AddArgument("attr-name", "barrier-command-close-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringEndProductType() + ~WriteBarrierControlBarrierCommandCloseEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + : SubscribeAttribute("barrier-command-close-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77277,10 +92518,10 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndProductTypeWithParams:params + [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77294,34 +92535,34 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute }; /* - * Attribute CurrentPositionLiftPercent100ths + * Attribute BarrierOpenPeriod */ -class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { +class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLiftPercent100ths() - : ReadAttribute("current-position-lift-percent100ths") + ReadBarrierControlBarrierOpenPeriod() + : ReadAttribute("barrier-open-period") { } - ~ReadWindowCoveringCurrentPositionLiftPercent100ths() + ~ReadBarrierControlBarrierOpenPeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + LogNSError("BarrierControl BarrierOpenPeriod read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77330,25 +92571,66 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { +class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() - : SubscribeAttribute("current-position-lift-percent100ths") + WriteBarrierControlBarrierOpenPeriod() + : WriteAttribute("barrier-open-period") + { + AddArgument("attr-name", "barrier-open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBarrierControlBarrierOpenPeriod() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierOpenPeriod() + : SubscribeAttribute("barrier-open-period") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + ~SubscribeAttributeBarrierControlBarrierOpenPeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77359,10 +92641,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeBarrierOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77376,34 +92658,34 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public }; /* - * Attribute CurrentPositionTiltPercent100ths + * Attribute BarrierClosePeriod */ -class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { +class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercent100ths() - : ReadAttribute("current-position-tilt-percent100ths") + ReadBarrierControlBarrierClosePeriod() + : ReadAttribute("barrier-close-period") { } - ~ReadWindowCoveringCurrentPositionTiltPercent100ths() + ~ReadBarrierControlBarrierClosePeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + LogNSError("BarrierControl BarrierClosePeriod read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77412,25 +92694,66 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { +class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() - : SubscribeAttribute("current-position-tilt-percent100ths") + WriteBarrierControlBarrierClosePeriod() + : WriteAttribute("barrier-close-period") { + AddArgument("attr-name", "barrier-close-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + ~WriteBarrierControlBarrierClosePeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierClosePeriodWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierClosePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierClosePeriod() + : SubscribeAttribute("barrier-close-period") + { + } + + ~SubscribeAttributeBarrierControlBarrierClosePeriod() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77441,10 +92764,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeBarrierClosePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77458,34 +92781,34 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public }; /* - * Attribute InstalledOpenLimitLift + * Attribute BarrierPosition */ -class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { +class ReadBarrierControlBarrierPosition : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitLift() - : ReadAttribute("installed-open-limit-lift") + ReadBarrierControlBarrierPosition() + : ReadAttribute("barrier-position") { } - ~ReadWindowCoveringInstalledOpenLimitLift() + ~ReadBarrierControlBarrierPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); + LogNSError("BarrierControl BarrierPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77494,25 +92817,25 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitLift() - : SubscribeAttribute("installed-open-limit-lift") + SubscribeAttributeBarrierControlBarrierPosition() + : SubscribeAttribute("barrier-position") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + ~SubscribeAttributeBarrierControlBarrierPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77523,10 +92846,10 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params + [cluster subscribeAttributeBarrierPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77540,34 +92863,34 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA }; /* - * Attribute InstalledClosedLimitLift + * Attribute GeneratedCommandList */ -class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { +class ReadBarrierControlGeneratedCommandList : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitLift() - : ReadAttribute("installed-closed-limit-lift") + ReadBarrierControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadWindowCoveringInstalledClosedLimitLift() + ~ReadBarrierControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + LogNSError("BarrierControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77576,25 +92899,25 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitLift() - : SubscribeAttribute("installed-closed-limit-lift") + SubscribeAttributeBarrierControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + ~SubscribeAttributeBarrierControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77605,10 +92928,10 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77622,34 +92945,34 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib }; /* - * Attribute InstalledOpenLimitTilt + * Attribute AcceptedCommandList */ -class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { +class ReadBarrierControlAcceptedCommandList : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitTilt() - : ReadAttribute("installed-open-limit-tilt") + ReadBarrierControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadWindowCoveringInstalledOpenLimitTilt() + ~ReadBarrierControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + LogNSError("BarrierControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77658,25 +92981,25 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() - : SubscribeAttribute("installed-open-limit-tilt") + SubscribeAttributeBarrierControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + ~SubscribeAttributeBarrierControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77687,10 +93010,10 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77703,35 +93026,37 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InstalledClosedLimitTilt + * Attribute EventList */ -class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { +class ReadBarrierControlEventList : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitTilt() - : ReadAttribute("installed-closed-limit-tilt") + ReadBarrierControlEventList() + : ReadAttribute("event-list") { } - ~ReadWindowCoveringInstalledClosedLimitTilt() + ~ReadBarrierControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + LogNSError("BarrierControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77740,25 +93065,25 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { +class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() - : SubscribeAttribute("installed-closed-limit-tilt") + SubscribeAttributeBarrierControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + ~SubscribeAttributeBarrierControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77769,10 +93094,10 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77785,103 +93110,64 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute Mode + * Attribute AttributeList */ -class ReadWindowCoveringMode : public ReadAttribute { +class ReadBarrierControlAttributeList : public ReadAttribute { public: - ReadWindowCoveringMode() - : ReadAttribute("mode") + ReadBarrierControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWindowCoveringMode() + ~ReadBarrierControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering Mode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteWindowCoveringMode : public WriteAttribute { -public: - WriteWindowCoveringMode() - : WriteAttribute("mode") - { - AddArgument("attr-name", "mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWindowCoveringMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); + LogNSError("BarrierControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringMode() - : SubscribeAttribute("mode") + SubscribeAttributeBarrierControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWindowCoveringMode() + ~SubscribeAttributeBarrierControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77892,10 +93178,10 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeModeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77909,34 +93195,34 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { }; /* - * Attribute SafetyStatus + * Attribute FeatureMap */ -class ReadWindowCoveringSafetyStatus : public ReadAttribute { +class ReadBarrierControlFeatureMap : public ReadAttribute { public: - ReadWindowCoveringSafetyStatus() - : ReadAttribute("safety-status") + ReadBarrierControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWindowCoveringSafetyStatus() + ~ReadBarrierControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering SafetyStatus read Error", error); + LogNSError("BarrierControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77945,25 +93231,25 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { +class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringSafetyStatus() - : SubscribeAttribute("safety-status") + SubscribeAttributeBarrierControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWindowCoveringSafetyStatus() + ~SubscribeAttributeBarrierControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77974,10 +93260,10 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSafetyStatusWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77991,34 +93277,34 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { +class ReadBarrierControlClusterRevision : public ReadAttribute { public: - ReadWindowCoveringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBarrierControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWindowCoveringGeneratedCommandList() + ~ReadBarrierControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering GeneratedCommandList read Error", error); + LogNSError("BarrierControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78027,25 +93313,25 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBarrierControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWindowCoveringGeneratedCommandList() + ~SubscribeAttributeBarrierControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78056,10 +93342,10 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78072,35 +93358,91 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt } }; +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AcceptedCommandList + * Attribute MaxPressure */ -class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { public: - ReadWindowCoveringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPumpConfigurationAndControlMaxPressure() + : ReadAttribute("max-pressure") { } - ~ReadWindowCoveringAcceptedCommandList() + ~ReadPumpConfigurationAndControlMaxPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering AcceptedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78109,25 +93451,25 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePumpConfigurationAndControlMaxPressure() + : SubscribeAttribute("max-pressure") { } - ~SubscribeAttributeWindowCoveringAcceptedCommandList() + ~SubscribeAttributePumpConfigurationAndControlMaxPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78138,10 +93480,10 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78154,37 +93496,35 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxSpeed */ -class ReadWindowCoveringEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { public: - ReadWindowCoveringEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlMaxSpeed() + : ReadAttribute("max-speed") { } - ~ReadWindowCoveringEventList() + ~ReadPumpConfigurationAndControlMaxSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering EventList read Error", error); + LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78193,25 +93533,25 @@ class ReadWindowCoveringEventList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePumpConfigurationAndControlMaxSpeed() + : SubscribeAttribute("max-speed") { } - ~SubscribeAttributeWindowCoveringEventList() + ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78222,10 +93562,10 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78238,37 +93578,35 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute MaxFlow */ -class ReadWindowCoveringAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { public: - ReadWindowCoveringAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlMaxFlow() + : ReadAttribute("max-flow") { } - ~ReadWindowCoveringAttributeList() + ~ReadPumpConfigurationAndControlMaxFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78277,25 +93615,25 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePumpConfigurationAndControlMaxFlow() + : SubscribeAttribute("max-flow") { } - ~SubscribeAttributeWindowCoveringAttributeList() + ~SubscribeAttributePumpConfigurationAndControlMaxFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78306,10 +93644,10 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMaxFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78323,34 +93661,34 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute MinConstPressure */ -class ReadWindowCoveringFeatureMap : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { public: - ReadWindowCoveringFeatureMap() - : ReadAttribute("feature-map") + ReadPumpConfigurationAndControlMinConstPressure() + : ReadAttribute("min-const-pressure") { } - ~ReadWindowCoveringFeatureMap() + ~ReadPumpConfigurationAndControlMinConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering FeatureMap read Error", error); + LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78359,25 +93697,25 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePumpConfigurationAndControlMinConstPressure() + : SubscribeAttribute("min-const-pressure") { } - ~SubscribeAttributeWindowCoveringFeatureMap() + ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78388,10 +93726,10 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMinConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78405,34 +93743,34 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MaxConstPressure */ -class ReadWindowCoveringClusterRevision : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { public: - ReadWindowCoveringClusterRevision() - : ReadAttribute("cluster-revision") + ReadPumpConfigurationAndControlMaxConstPressure() + : ReadAttribute("max-const-pressure") { } - ~ReadWindowCoveringClusterRevision() + ~ReadPumpConfigurationAndControlMaxConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering ClusterRevision read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78441,25 +93779,25 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + : SubscribeAttribute("max-const-pressure") { } - ~SubscribeAttributeWindowCoveringClusterRevision() + ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::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); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78470,10 +93808,10 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMaxConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78486,154 +93824,117 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command BarrierControlGoToPercent + * Attribute MinCompPressure */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand { +class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { public: - BarrierControlBarrierControlGoToPercent() - : ClusterCommand("barrier-control-go-to-percent") + ReadPumpConfigurationAndControlMinCompPressure() + : ReadAttribute("min-comp-pressure") + { + } + + ~ReadPumpConfigurationAndControlMinCompPressure() { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlGoToPercentWithParams: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); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand { +class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { public: - BarrierControlBarrierControlStop() - : ClusterCommand("barrier-control-stop") + SubscribeAttributePumpConfigurationAndControlMinCompPressure() + : SubscribeAttribute("min-comp-pressure") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams 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 barrierControlStopWithParams: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); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMinCompPressureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure 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; } - -private: }; /* - * Attribute BarrierMovingState + * Attribute MaxCompPressure */ -class ReadBarrierControlBarrierMovingState : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { public: - ReadBarrierControlBarrierMovingState() - : ReadAttribute("barrier-moving-state") + ReadPumpConfigurationAndControlMaxCompPressure() + : ReadAttribute("max-comp-pressure") { } - ~ReadBarrierControlBarrierMovingState() + ~ReadPumpConfigurationAndControlMaxCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierMovingState read Error", error); + LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78642,25 +93943,25 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierMovingState() - : SubscribeAttribute("barrier-moving-state") + SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + : SubscribeAttribute("max-comp-pressure") { } - ~SubscribeAttributeBarrierControlBarrierMovingState() + ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78671,10 +93972,10 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierMovingStateWithParams:params + [cluster subscribeAttributeMaxCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78688,34 +93989,34 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri }; /* - * Attribute BarrierSafetyStatus + * Attribute MinConstSpeed */ -class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { public: - ReadBarrierControlBarrierSafetyStatus() - : ReadAttribute("barrier-safety-status") + ReadPumpConfigurationAndControlMinConstSpeed() + : ReadAttribute("min-const-speed") { } - ~ReadBarrierControlBarrierSafetyStatus() + ~ReadPumpConfigurationAndControlMinConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78724,25 +94025,25 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierSafetyStatus() - : SubscribeAttribute("barrier-safety-status") + SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + : SubscribeAttribute("min-const-speed") { } - ~SubscribeAttributeBarrierControlBarrierSafetyStatus() + ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78753,10 +94054,10 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierSafetyStatusWithParams:params + [cluster subscribeAttributeMinConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78770,34 +94071,34 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr }; /* - * Attribute BarrierCapabilities + * Attribute MaxConstSpeed */ -class ReadBarrierControlBarrierCapabilities : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { public: - ReadBarrierControlBarrierCapabilities() - : ReadAttribute("barrier-capabilities") + ReadPumpConfigurationAndControlMaxConstSpeed() + : ReadAttribute("max-const-speed") { } - ~ReadBarrierControlBarrierCapabilities() + ~ReadPumpConfigurationAndControlMaxConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCapabilities read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78806,25 +94107,25 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCapabilities() - : SubscribeAttribute("barrier-capabilities") + SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + : SubscribeAttribute("max-const-speed") { } - ~SubscribeAttributeBarrierControlBarrierCapabilities() + ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78835,10 +94136,10 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCapabilitiesWithParams:params + [cluster subscribeAttributeMaxConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78852,102 +94153,61 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr }; /* - * Attribute BarrierOpenEvents + * Attribute MinConstFlow */ -class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { public: - ReadBarrierControlBarrierOpenEvents() - : ReadAttribute("barrier-open-events") + ReadPumpConfigurationAndControlMinConstFlow() + : ReadAttribute("min-const-flow") { } - ~ReadBarrierControlBarrierOpenEvents() + ~ReadPumpConfigurationAndControlMinConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierOpenEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenEvents() - : WriteAttribute("barrier-open-events") - { - AddArgument("attr-name", "barrier-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); + LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenEvents() - : SubscribeAttribute("barrier-open-events") + SubscribeAttributePumpConfigurationAndControlMinConstFlow() + : SubscribeAttribute("min-const-flow") { } - ~SubscribeAttributeBarrierControlBarrierOpenEvents() + ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78958,10 +94218,10 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenEventsWithParams:params + [cluster subscribeAttributeMinConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78975,102 +94235,61 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib }; /* - * Attribute BarrierCloseEvents + * Attribute MaxConstFlow */ -class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { public: - ReadBarrierControlBarrierCloseEvents() - : ReadAttribute("barrier-close-events") + ReadPumpConfigurationAndControlMaxConstFlow() + : ReadAttribute("max-const-flow") { } - ~ReadBarrierControlBarrierCloseEvents() + ~ReadPumpConfigurationAndControlMaxConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCloseEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCloseEvents() - : WriteAttribute("barrier-close-events") - { - AddArgument("attr-name", "barrier-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCloseEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); + LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCloseEvents() - : SubscribeAttribute("barrier-close-events") + SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + : SubscribeAttribute("max-const-flow") { } - ~SubscribeAttributeBarrierControlBarrierCloseEvents() + ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79081,10 +94300,10 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCloseEventsWithParams:params + [cluster subscribeAttributeMaxConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79098,102 +94317,61 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri }; /* - * Attribute BarrierCommandOpenEvents + * Attribute MinConstTemp */ -class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { public: - ReadBarrierControlBarrierCommandOpenEvents() - : ReadAttribute("barrier-command-open-events") + ReadPumpConfigurationAndControlMinConstTemp() + : ReadAttribute("min-const-temp") { } - ~ReadBarrierControlBarrierCommandOpenEvents() + ~ReadPumpConfigurationAndControlMinConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandOpenEvents() - : WriteAttribute("barrier-command-open-events") - { - AddArgument("attr-name", "barrier-command-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandOpenEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandOpenEvents() - : SubscribeAttribute("barrier-command-open-events") + SubscribeAttributePumpConfigurationAndControlMinConstTemp() + : SubscribeAttribute("min-const-temp") { } - ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79204,10 +94382,10 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params + [cluster subscribeAttributeMinConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79221,102 +94399,61 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib }; /* - * Attribute BarrierCommandCloseEvents + * Attribute MaxConstTemp */ -class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { public: - ReadBarrierControlBarrierCommandCloseEvents() - : ReadAttribute("barrier-command-close-events") + ReadPumpConfigurationAndControlMaxConstTemp() + : ReadAttribute("max-const-temp") { } - ~ReadBarrierControlBarrierCommandCloseEvents() + ~ReadPumpConfigurationAndControlMaxConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandCloseEvents() - : WriteAttribute("barrier-command-close-events") - { - AddArgument("attr-name", "barrier-command-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandCloseEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandCloseEvents() - : SubscribeAttribute("barrier-command-close-events") + SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + : SubscribeAttribute("max-const-temp") { } - ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79327,10 +94464,10 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params + [cluster subscribeAttributeMaxConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79344,102 +94481,61 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri }; /* - * Attribute BarrierOpenPeriod + * Attribute PumpStatus */ -class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { +class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { public: - ReadBarrierControlBarrierOpenPeriod() - : ReadAttribute("barrier-open-period") + ReadPumpConfigurationAndControlPumpStatus() + : ReadAttribute("pump-status") { } - ~ReadBarrierControlBarrierOpenPeriod() + ~ReadPumpConfigurationAndControlPumpStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierOpenPeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenPeriod() - : WriteAttribute("barrier-open-period") - { - AddArgument("attr-name", "barrier-open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenPeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenPeriod() - : SubscribeAttribute("barrier-open-period") + SubscribeAttributePumpConfigurationAndControlPumpStatus() + : SubscribeAttribute("pump-status") { } - ~SubscribeAttributeBarrierControlBarrierOpenPeriod() + ~SubscribeAttributePumpConfigurationAndControlPumpStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79450,10 +94546,10 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenPeriodWithParams:params + [cluster subscribeAttributePumpStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79467,102 +94563,61 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib }; /* - * Attribute BarrierClosePeriod + * Attribute EffectiveOperationMode */ -class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { public: - ReadBarrierControlBarrierClosePeriod() - : ReadAttribute("barrier-close-period") + ReadPumpConfigurationAndControlEffectiveOperationMode() + : ReadAttribute("effective-operation-mode") { } - ~ReadBarrierControlBarrierClosePeriod() + ~ReadPumpConfigurationAndControlEffectiveOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierClosePeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierClosePeriod() - : WriteAttribute("barrier-close-period") - { - AddArgument("attr-name", "barrier-close-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierClosePeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierClosePeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); + LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierClosePeriod() - : SubscribeAttribute("barrier-close-period") + SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + : SubscribeAttribute("effective-operation-mode") { } - ~SubscribeAttributeBarrierControlBarrierClosePeriod() + ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79573,10 +94628,10 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierClosePeriodWithParams:params + [cluster subscribeAttributeEffectiveOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79590,34 +94645,34 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri }; /* - * Attribute BarrierPosition + * Attribute EffectiveControlMode */ -class ReadBarrierControlBarrierPosition : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { public: - ReadBarrierControlBarrierPosition() - : ReadAttribute("barrier-position") + ReadPumpConfigurationAndControlEffectiveControlMode() + : ReadAttribute("effective-control-mode") { } - ~ReadBarrierControlBarrierPosition() + ~ReadPumpConfigurationAndControlEffectiveControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierPosition read Error", error); + LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79626,25 +94681,25 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierPosition() - : SubscribeAttribute("barrier-position") + SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + : SubscribeAttribute("effective-control-mode") { } - ~SubscribeAttributeBarrierControlBarrierPosition() + ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79655,10 +94710,10 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierPositionWithParams:params + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79672,34 +94727,34 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut }; /* - * Attribute GeneratedCommandList + * Attribute Capacity */ -class ReadBarrierControlGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { public: - ReadBarrierControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPumpConfigurationAndControlCapacity() + : ReadAttribute("capacity") { } - ~ReadBarrierControlGeneratedCommandList() + ~ReadPumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl Capacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79708,25 +94763,25 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePumpConfigurationAndControlCapacity() + : SubscribeAttribute("capacity") { } - ~SubscribeAttributeBarrierControlGeneratedCommandList() + ~SubscribeAttributePumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79737,10 +94792,10 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79754,34 +94809,34 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt }; /* - * Attribute AcceptedCommandList + * Attribute Speed */ -class ReadBarrierControlAcceptedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { public: - ReadBarrierControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPumpConfigurationAndControlSpeed() + : ReadAttribute("speed") { } - ~ReadBarrierControlAcceptedCommandList() + ~ReadPumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl AcceptedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl Speed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79790,25 +94845,25 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePumpConfigurationAndControlSpeed() + : SubscribeAttribute("speed") { } - ~SubscribeAttributeBarrierControlAcceptedCommandList() + ~SubscribeAttributePumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79819,10 +94874,10 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79835,37 +94890,35 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute LifetimeRunningHours */ -class ReadBarrierControlEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { public: - ReadBarrierControlEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlLifetimeRunningHours() + : ReadAttribute("lifetime-running-hours") { } - ~ReadBarrierControlEventList() + ~ReadPumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl EventList read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79874,25 +94927,69 @@ class ReadBarrierControlEventList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { public: - SubscribeAttributeBarrierControlEventList() - : SubscribeAttribute("event-list") + WritePumpConfigurationAndControlLifetimeRunningHours() + : WriteAttribute("lifetime-running-hours") { + AddArgument("attr-name", "lifetime-running-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlEventList() + ~WritePumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + : SubscribeAttribute("lifetime-running-hours") + { + } + + ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79903,10 +95000,10 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79919,37 +95016,35 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Power */ -class ReadBarrierControlAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlPower : public ReadAttribute { public: - ReadBarrierControlAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlPower() + : ReadAttribute("power") { } - ~ReadBarrierControlAttributeList() + ~ReadPumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl Power read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79958,25 +95053,25 @@ class ReadBarrierControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePumpConfigurationAndControlPower() + : SubscribeAttribute("power") { } - ~SubscribeAttributeBarrierControlAttributeList() + ~SubscribeAttributePumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79987,10 +95082,10 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80004,34 +95099,34 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute LifetimeEnergyConsumed */ -class ReadBarrierControlFeatureMap : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { public: - ReadBarrierControlFeatureMap() - : ReadAttribute("feature-map") + ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + : ReadAttribute("lifetime-energy-consumed") { } - ~ReadBarrierControlFeatureMap() + ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl FeatureMap read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80040,25 +95135,69 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { public: - SubscribeAttributeBarrierControlFeatureMap() - : SubscribeAttribute("feature-map") + WritePumpConfigurationAndControlLifetimeEnergyConsumed() + : WriteAttribute("lifetime-energy-consumed") { + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlFeatureMap() + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + : SubscribeAttribute("lifetime-energy-consumed") + { + } + + ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80069,10 +95208,10 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80086,34 +95225,34 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute OperationMode */ -class ReadBarrierControlClusterRevision : public ReadAttribute { +class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { public: - ReadBarrierControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadPumpConfigurationAndControlOperationMode() + : ReadAttribute("operation-mode") { } - ~ReadBarrierControlClusterRevision() + ~ReadPumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl ClusterRevision read Error", error); + LogNSError("PumpConfigurationAndControl OperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80122,25 +95261,66 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { +class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { public: - SubscribeAttributeBarrierControlClusterRevision() - : SubscribeAttribute("cluster-revision") + WritePumpConfigurationAndControlOperationMode() + : WriteAttribute("operation-mode") { + AddArgument("attr-name", "operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlClusterRevision() + ~WritePumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlOperationMode() + : SubscribeAttribute("operation-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::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); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80151,10 +95331,10 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80167,91 +95347,35 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut } }; -/*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MaxPressure + * Attribute ControlMode */ -class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxPressure() - : ReadAttribute("max-pressure") + ReadPumpConfigurationAndControlControlMode() + : ReadAttribute("control-mode") { } - ~ReadPumpConfigurationAndControlMaxPressure() + ~ReadPumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + LogNSError("PumpConfigurationAndControl ControlMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80260,21 +95384,62 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { +class WritePumpConfigurationAndControlControlMode : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxPressure() - : SubscribeAttribute("max-pressure") + WritePumpConfigurationAndControlControlMode() + : WriteAttribute("control-mode") { + AddArgument("attr-name", "control-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMaxPressure() + ~WritePumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlControlMode() + : SubscribeAttribute("control-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlControlMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::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); @@ -80289,10 +95454,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPressureWithParams:params + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80306,34 +95471,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib }; /* - * Attribute MaxSpeed + * Attribute GeneratedCommandList */ -class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { +class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxSpeed() - : ReadAttribute("max-speed") + ReadPumpConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPumpConfigurationAndControlMaxSpeed() + ~ReadPumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); + LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80342,21 +95507,21 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxSpeed() - : SubscribeAttribute("max-speed") + SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() + ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::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); @@ -80371,10 +95536,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxSpeedWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80388,34 +95553,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt }; /* - * Attribute MaxFlow + * Attribute AcceptedCommandList */ -class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { +class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxFlow() - : ReadAttribute("max-flow") + ReadPumpConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPumpConfigurationAndControlMaxFlow() + ~ReadPumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); + LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80424,21 +95589,21 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxFlow() - : SubscribeAttribute("max-flow") + SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlMaxFlow() + ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::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); @@ -80453,10 +95618,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxFlowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80469,35 +95634,37 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MinConstPressure + * Attribute EventList */ -class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlEventList : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstPressure() - : ReadAttribute("min-const-pressure") + ReadPumpConfigurationAndControlEventList() + : ReadAttribute("event-list") { } - ~ReadPumpConfigurationAndControlMinConstPressure() + ~ReadPumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); + LogNSError("PumpConfigurationAndControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80506,21 +95673,21 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstPressure() - : SubscribeAttribute("min-const-pressure") + SubscribeAttributePumpConfigurationAndControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() + ~SubscribeAttributePumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::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); @@ -80535,10 +95702,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstPressureWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80551,35 +95718,37 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxConstPressure + * Attribute AttributeList */ -class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstPressure() - : ReadAttribute("max-const-pressure") + ReadPumpConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPumpConfigurationAndControlMaxConstPressure() + ~ReadPumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); + LogNSError("PumpConfigurationAndControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80588,21 +95757,21 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstPressure() - : SubscribeAttribute("max-const-pressure") + SubscribeAttributePumpConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + ~SubscribeAttributePumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::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); @@ -80617,10 +95786,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstPressureWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80634,34 +95803,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub }; /* - * Attribute MinCompPressure + * Attribute FeatureMap */ -class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinCompPressure() - : ReadAttribute("min-comp-pressure") + ReadPumpConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPumpConfigurationAndControlMinCompPressure() + ~ReadPumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80670,21 +95839,21 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinCompPressure() - : SubscribeAttribute("min-comp-pressure") + SubscribeAttributePumpConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() + ~SubscribeAttributePumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::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); @@ -80699,10 +95868,10 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCompPressureWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80716,34 +95885,34 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs }; /* - * Attribute MaxCompPressure + * Attribute ClusterRevision */ -class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxCompPressure() - : ReadAttribute("max-comp-pressure") + ReadPumpConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPumpConfigurationAndControlMaxCompPressure() + ~ReadPumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::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); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80752,21 +95921,21 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxCompPressure() - : SubscribeAttribute("max-comp-pressure") + SubscribeAttributePumpConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + ~SubscribeAttributePumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::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); @@ -80781,10 +95950,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCompPressureWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80797,117 +95966,326 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MinConstSpeed + * Command SetpointRaiseLower */ -class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ReadPumpConfigurationAndControlMinConstSpeed() - : ReadAttribute("min-const-speed") + ThermostatSetpointRaiseLower() + : ClusterCommand("setpoint-raise-lower") { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlMinConstSpeed() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; + params.amount = [NSNumber numberWithChar:mRequest.amount]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setpointRaiseLowerWithParams: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::Thermostat::Commands::SetpointRaiseLower::Type mRequest; +}; + +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand { +public: + ThermostatSetWeeklySchedule() + : ClusterCommand("set-weekly-schedule") + , mComplex_Transitions(&mRequest.transitions) { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; + params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.transitions) { + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; + params.transitions = array_0; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeeklyScheduleWithParams: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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument> mComplex_Transitions; }; -class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { +/* + * Command GetWeeklySchedule + */ +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlMinConstSpeed() - : SubscribeAttribute("min-const-speed") + ThermostatGetWeeklySchedule() + : ClusterCommand("get-weekly-schedule") { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; + params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeeklyScheduleWithParams:params completion: + ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; +}; + +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand { +public: + ThermostatClearWeeklySchedule() + : ClusterCommand("clear-weekly-schedule") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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(); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams 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 clearWeeklyScheduleWithParams: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); + } + }]; } - [cluster subscribeAttributeMinConstSpeedWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed 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; } + +private: }; /* - * Attribute MaxConstSpeed + * Attribute LocalTemperature */ -class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { +class ReadThermostatLocalTemperature : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstSpeed() - : ReadAttribute("max-const-speed") + ReadThermostatLocalTemperature() + : ReadAttribute("local-temperature") { } - ~ReadPumpConfigurationAndControlMaxConstSpeed() + ~ReadThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + LogNSError("Thermostat LocalTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80916,25 +96294,25 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() - : SubscribeAttribute("max-const-speed") + SubscribeAttributeThermostatLocalTemperature() + : SubscribeAttribute("local-temperature") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + ~SubscribeAttributeThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80945,10 +96323,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstSpeedWithParams:params + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80962,34 +96340,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr }; /* - * Attribute MinConstFlow + * Attribute OutdoorTemperature */ -class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { +class ReadThermostatOutdoorTemperature : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstFlow() - : ReadAttribute("min-const-flow") + ReadThermostatOutdoorTemperature() + : ReadAttribute("outdoor-temperature") { } - ~ReadPumpConfigurationAndControlMinConstFlow() + ~ReadThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + LogNSError("Thermostat OutdoorTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80998,25 +96376,25 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { +class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstFlow() - : SubscribeAttribute("min-const-flow") + SubscribeAttributeThermostatOutdoorTemperature() + : SubscribeAttribute("outdoor-temperature") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() + ~SubscribeAttributeThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81027,10 +96405,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstFlowWithParams:params + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81044,34 +96422,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri }; /* - * Attribute MaxConstFlow + * Attribute Occupancy */ -class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { +class ReadThermostatOccupancy : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstFlow() - : ReadAttribute("max-const-flow") + ReadThermostatOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPumpConfigurationAndControlMaxConstFlow() + ~ReadThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + LogNSError("Thermostat Occupancy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81080,25 +96458,25 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstFlow() - : SubscribeAttribute("max-const-flow") + SubscribeAttributeThermostatOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + ~SubscribeAttributeThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81109,10 +96487,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstFlowWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81126,34 +96504,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri }; /* - * Attribute MinConstTemp + * Attribute AbsMinHeatSetpointLimit */ -class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { +class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstTemp() - : ReadAttribute("min-const-temp") + ReadThermostatAbsMinHeatSetpointLimit() + : ReadAttribute("abs-min-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMinConstTemp() + ~ReadThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81162,25 +96540,25 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstTemp() - : SubscribeAttribute("min-const-temp") + SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + : SubscribeAttribute("abs-min-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() + ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81191,10 +96569,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstTempWithParams:params + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81208,34 +96586,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri }; /* - * Attribute MaxConstTemp + * Attribute AbsMaxHeatSetpointLimit */ -class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { +class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstTemp() - : ReadAttribute("max-const-temp") + ReadThermostatAbsMaxHeatSetpointLimit() + : ReadAttribute("abs-max-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMaxConstTemp() + ~ReadThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81244,25 +96622,25 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstTemp() - : SubscribeAttribute("max-const-temp") + SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + : SubscribeAttribute("abs-max-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81273,10 +96651,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstTempWithParams:params + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81290,34 +96668,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri }; /* - * Attribute PumpStatus + * Attribute AbsMinCoolSetpointLimit */ -class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { +class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlPumpStatus() - : ReadAttribute("pump-status") + ReadThermostatAbsMinCoolSetpointLimit() + : ReadAttribute("abs-min-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlPumpStatus() + ~ReadThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81326,25 +96704,25 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlPumpStatus() - : SubscribeAttribute("pump-status") + SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + : SubscribeAttribute("abs-min-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlPumpStatus() + ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81355,10 +96733,10 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePumpStatusWithParams:params + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81372,34 +96750,34 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe }; /* - * Attribute EffectiveOperationMode + * Attribute AbsMaxCoolSetpointLimit */ -class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { +class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveOperationMode() - : ReadAttribute("effective-operation-mode") + ReadThermostatAbsMaxCoolSetpointLimit() + : ReadAttribute("abs-max-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlEffectiveOperationMode() + ~ReadThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81408,25 +96786,25 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() - : SubscribeAttribute("effective-operation-mode") + SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + : SubscribeAttribute("abs-max-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81437,10 +96815,10 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81454,34 +96832,34 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ }; /* - * Attribute EffectiveControlMode + * Attribute PICoolingDemand */ -class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { +class ReadThermostatPICoolingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveControlMode() - : ReadAttribute("effective-control-mode") + ReadThermostatPICoolingDemand() + : ReadAttribute("picooling-demand") { } - ~ReadPumpConfigurationAndControlEffectiveControlMode() + ~ReadThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + LogNSError("Thermostat PICoolingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81490,25 +96868,25 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { +class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() - : SubscribeAttribute("effective-control-mode") + SubscribeAttributeThermostatPICoolingDemand() + : SubscribeAttribute("picooling-demand") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + ~SubscribeAttributeThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81519,10 +96897,10 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveControlModeWithParams:params + [cluster subscribeAttributePICoolingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81536,34 +96914,34 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public }; /* - * Attribute Capacity + * Attribute PIHeatingDemand */ -class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { +class ReadThermostatPIHeatingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlCapacity() - : ReadAttribute("capacity") + ReadThermostatPIHeatingDemand() + : ReadAttribute("piheating-demand") { } - ~ReadPumpConfigurationAndControlCapacity() + ~ReadThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Capacity read Error", error); + LogNSError("Thermostat PIHeatingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81572,25 +96950,25 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { +class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlCapacity() - : SubscribeAttribute("capacity") + SubscribeAttributeThermostatPIHeatingDemand() + : SubscribeAttribute("piheating-demand") { } - ~SubscribeAttributePumpConfigurationAndControlCapacity() + ~SubscribeAttributeThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81601,10 +96979,10 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapacityWithParams:params + [cluster subscribeAttributePIHeatingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81618,34 +96996,34 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt }; /* - * Attribute Speed + * Attribute HVACSystemTypeConfiguration */ -class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { public: - ReadPumpConfigurationAndControlSpeed() - : ReadAttribute("speed") + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") { } - ~ReadPumpConfigurationAndControlSpeed() + ~ReadThermostatHVACSystemTypeConfiguration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Speed read Error", error); + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81654,25 +97032,66 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlSpeed() - : SubscribeAttribute("speed") + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") { + AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlSpeed() + ~WriteThermostatHVACSystemTypeConfiguration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") + { + } + + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81683,10 +97102,10 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedWithParams:params + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81700,34 +97119,34 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri }; /* - * Attribute LifetimeRunningHours + * Attribute LocalTemperatureCalibration */ -class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { +class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeRunningHours() - : ReadAttribute("lifetime-running-hours") + ReadThermostatLocalTemperatureCalibration() + : ReadAttribute("local-temperature-calibration") { } - ~ReadPumpConfigurationAndControlLifetimeRunningHours() + ~ReadThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81736,39 +97155,36 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute } }; -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { +class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { public: - WritePumpConfigurationAndControlLifetimeRunningHours() - : WriteAttribute("lifetime-running-hours") + WriteThermostatLocalTemperatureCalibration() + : WriteAttribute("local-temperature-calibration") { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "local-temperature-calibration"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeRunningHours() + ~WriteThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81777,28 +97193,28 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - chip::app::DataModel::Nullable mValue; + int8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() - : SubscribeAttribute("lifetime-running-hours") + SubscribeAttributeThermostatLocalTemperatureCalibration() + : SubscribeAttribute("local-temperature-calibration") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + ~SubscribeAttributeThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81809,10 +97225,10 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeRunningHoursWithParams:params + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81826,61 +97242,102 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public }; /* - * Attribute Power + * Attribute OccupiedCoolingSetpoint */ -class ReadPumpConfigurationAndControlPower : public ReadAttribute { +class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlPower() - : ReadAttribute("power") + ReadThermostatOccupiedCoolingSetpoint() + : ReadAttribute("occupied-cooling-setpoint") { } - ~ReadPumpConfigurationAndControlPower() + ~ReadThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Power read Error", error); + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { +public: + WriteThermostatOccupiedCoolingSetpoint() + : WriteAttribute("occupied-cooling-setpoint") + { + AddArgument("attr-name", "occupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatOccupiedCoolingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlPower() - : SubscribeAttribute("power") + SubscribeAttributeThermostatOccupiedCoolingSetpoint() + : SubscribeAttribute("occupied-cooling-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlPower() + ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81891,10 +97348,10 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerWithParams:params + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81908,34 +97365,34 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri }; /* - * Attribute LifetimeEnergyConsumed + * Attribute OccupiedHeatingSetpoint */ -class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { +class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeEnergyConsumed() - : ReadAttribute("lifetime-energy-consumed") + ReadThermostatOccupiedHeatingSetpoint() + : ReadAttribute("occupied-heating-setpoint") { } - ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + ~ReadThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81944,39 +97401,36 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu } }; -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { +class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed() - : WriteAttribute("lifetime-energy-consumed") + WriteThermostatOccupiedHeatingSetpoint() + : WriteAttribute("occupied-heating-setpoint") { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "occupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() + ~WriteThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81985,28 +97439,28 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - chip::app::DataModel::Nullable mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() - : SubscribeAttribute("lifetime-energy-consumed") + SubscribeAttributeThermostatOccupiedHeatingSetpoint() + : SubscribeAttribute("occupied-heating-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82017,10 +97471,10 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82034,34 +97488,34 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ }; /* - * Attribute OperationMode + * Attribute UnoccupiedCoolingSetpoint */ -class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { +class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlOperationMode() - : ReadAttribute("operation-mode") + ReadThermostatUnoccupiedCoolingSetpoint() + : ReadAttribute("unoccupied-cooling-setpoint") { } - ~ReadPumpConfigurationAndControlOperationMode() + ~ReadThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl OperationMode read Error", error); + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82070,36 +97524,36 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { } }; -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { +class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { public: - WritePumpConfigurationAndControlOperationMode() - : WriteAttribute("operation-mode") + WriteThermostatUnoccupiedCoolingSetpoint() + : WriteAttribute("unoccupied-cooling-setpoint") { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "unoccupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlOperationMode() + ~WriteThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82108,28 +97562,28 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { } private: - uint8_t mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlOperationMode() - : SubscribeAttribute("operation-mode") + SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + : SubscribeAttribute("unoccupied-cooling-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlOperationMode() + ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82140,10 +97594,10 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationModeWithParams:params + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82157,34 +97611,34 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr }; /* - * Attribute ControlMode + * Attribute UnoccupiedHeatingSetpoint */ -class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { +class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlControlMode() - : ReadAttribute("control-mode") + ReadThermostatUnoccupiedHeatingSetpoint() + : ReadAttribute("unoccupied-heating-setpoint") { } - ~ReadPumpConfigurationAndControlControlMode() + ~ReadThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl ControlMode read Error", error); + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82193,36 +97647,36 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { } }; -class WritePumpConfigurationAndControlControlMode : public WriteAttribute { +class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { public: - WritePumpConfigurationAndControlControlMode() - : WriteAttribute("control-mode") + WriteThermostatUnoccupiedHeatingSetpoint() + : WriteAttribute("unoccupied-heating-setpoint") { - AddArgument("attr-name", "control-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "unoccupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlControlMode() + ~WriteThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82231,28 +97685,28 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { } private: - uint8_t mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlControlMode() - : SubscribeAttribute("control-mode") + SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + : SubscribeAttribute("unoccupied-heating-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlControlMode() + ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82263,10 +97717,10 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlModeWithParams:params + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82280,34 +97734,34 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute MinHeatSetpointLimit */ -class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { +class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatMinHeatSetpointLimit() + : ReadAttribute("min-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlGeneratedCommandList() + ~ReadThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + LogNSError("Thermostat MinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82316,107 +97770,66 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteThermostatMinHeatSetpointLimit() + : WriteAttribute("min-heat-setpoint-limit") { + AddArgument("attr-name", "min-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + ~WriteThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList 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; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadPumpConfigurationAndControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatMinHeatSetpointLimit() + : SubscribeAttribute("min-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + ~SubscribeAttributeThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82427,10 +97840,10 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82443,37 +97856,35 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxHeatSetpointLimit */ -class ReadPumpConfigurationAndControlEventList : public ReadAttribute { +class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlEventList() - : ReadAttribute("event-list") + ReadThermostatMaxHeatSetpointLimit() + : ReadAttribute("max-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlEventList() + ~ReadThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EventList read Error", error); + LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82482,109 +97893,66 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { +class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlEventList() - : SubscribeAttribute("event-list") + WriteThermostatMaxHeatSetpointLimit() + : WriteAttribute("max-heat-setpoint-limit") { + AddArgument("attr-name", "max-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlEventList() + ~WriteThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList 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 - -/* - * Attribute AttributeList - */ -class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { -public: - ReadPumpConfigurationAndControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadPumpConfigurationAndControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatMaxHeatSetpointLimit() + : SubscribeAttribute("max-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlAttributeList() + ~SubscribeAttributeThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82595,10 +97963,10 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82612,34 +97980,34 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr }; /* - * Attribute FeatureMap + * Attribute MinCoolSetpointLimit */ -class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { +class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatMinCoolSetpointLimit() + : ReadAttribute("min-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlFeatureMap() + ~ReadThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + LogNSError("Thermostat MinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82648,107 +98016,66 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { +class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlFeatureMap() - : SubscribeAttribute("feature-map") + WriteThermostatMinCoolSetpointLimit() + : WriteAttribute("min-cool-setpoint-limit") { + AddArgument("attr-name", "min-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlFeatureMap() + ~WriteThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap 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; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { -public: - ReadPumpConfigurationAndControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadPumpConfigurationAndControlClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThermostatMinCoolSetpointLimit() + : SubscribeAttribute("min-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlClusterRevision() + ~SubscribeAttributeThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::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); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82759,10 +98086,10 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82775,349 +98102,222 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetpointRaiseLower + * Attribute MaxCoolSetpointLimit */ -class ThermostatSetpointRaiseLower : public ClusterCommand { +class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { public: - ThermostatSetpointRaiseLower() - : ClusterCommand("setpoint-raise-lower") + ReadThermostatMaxCoolSetpointLimit() + : ReadAttribute("max-cool-setpoint-limit") + { + } + + ~ReadThermostatMaxCoolSetpointLimit() { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; - params.amount = [NSNumber numberWithChar:mRequest.amount]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setpointRaiseLowerWithParams: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); - } - }]; - } + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand { +class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { public: - ThermostatSetWeeklySchedule() - : ClusterCommand("set-weekly-schedule") - , mComplex_Transitions(&mRequest.transitions) + WriteThermostatMaxCoolSetpointLimit() + : WriteAttribute("max-cool-setpoint-limit") + { + AddArgument("attr-name", "max-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMaxCoolSetpointLimit() { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; - params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.transitions = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeeklyScheduleWithParams: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); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; + int16_t mValue; }; -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand { +class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { public: - ThermostatGetWeeklySchedule() - : ClusterCommand("get-weekly-schedule") + SubscribeAttributeThermostatMaxCoolSetpointLimit() + : SubscribeAttribute("max-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxCoolSetpointLimit() { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; - params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeeklyScheduleWithParams:params completion: - ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __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 subscribeAttributeMaxCoolSetpointLimitWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit 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; } - -private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Attribute MinSetpointDeadBand */ -class ThermostatClearWeeklySchedule : public ClusterCommand { +class ReadThermostatMinSetpointDeadBand : public ReadAttribute { public: - ThermostatClearWeeklySchedule() - : ClusterCommand("clear-weekly-schedule") + ReadThermostatMinSetpointDeadBand() + : ReadAttribute("min-setpoint-dead-band") + { + } + + ~ReadThermostatMinSetpointDeadBand() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams 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 clearWeeklyScheduleWithParams: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); - } - }]; - } + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat MinSetpointDeadBand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Attribute LocalTemperature - */ -class ReadThermostatLocalTemperature : public ReadAttribute { +class WriteThermostatMinSetpointDeadBand : public WriteAttribute { public: - ReadThermostatLocalTemperature() - : ReadAttribute("local-temperature") + WriteThermostatMinSetpointDeadBand() + : WriteAttribute("min-setpoint-dead-band") { + AddArgument("attr-name", "min-setpoint-dead-band"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadThermostatLocalTemperature() + ~WriteThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat LocalTemperature read Error", error); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + + [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int8_t mValue; }; -class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperature() - : SubscribeAttribute("local-temperature") + SubscribeAttributeThermostatMinSetpointDeadBand() + : SubscribeAttribute("min-setpoint-dead-band") { } - ~SubscribeAttributeThermostatLocalTemperature() + ~SubscribeAttributeThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::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); @@ -83132,10 +98332,10 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureWithParams:params + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83149,57 +98349,98 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { }; /* - * Attribute OutdoorTemperature + * Attribute RemoteSensing */ -class ReadThermostatOutdoorTemperature : public ReadAttribute { +class ReadThermostatRemoteSensing : public ReadAttribute { public: - ReadThermostatOutdoorTemperature() - : ReadAttribute("outdoor-temperature") + ReadThermostatRemoteSensing() + : ReadAttribute("remote-sensing") { } - ~ReadThermostatOutdoorTemperature() + ~ReadThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OutdoorTemperature read Error", error); + LogNSError("Thermostat RemoteSensing read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatRemoteSensing : public WriteAttribute { +public: + WriteThermostatRemoteSensing() + : WriteAttribute("remote-sensing") + { + AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatRemoteSensing() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { public: - SubscribeAttributeThermostatOutdoorTemperature() - : SubscribeAttribute("outdoor-temperature") + SubscribeAttributeThermostatRemoteSensing() + : SubscribeAttribute("remote-sensing") { } - ~SubscribeAttributeThermostatOutdoorTemperature() + ~SubscribeAttributeThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::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); @@ -83214,10 +98455,10 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutdoorTemperatureWithParams:params + [cluster subscribeAttributeRemoteSensingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83231,34 +98472,34 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute }; /* - * Attribute Occupancy + * Attribute ControlSequenceOfOperation */ -class ReadThermostatOccupancy : public ReadAttribute { +class ReadThermostatControlSequenceOfOperation : public ReadAttribute { public: - ReadThermostatOccupancy() - : ReadAttribute("occupancy") + ReadThermostatControlSequenceOfOperation() + : ReadAttribute("control-sequence-of-operation") { } - ~ReadThermostatOccupancy() + ~ReadThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat Occupancy read Error", error); + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83267,103 +98508,62 @@ class ReadThermostatOccupancy : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { +class WriteThermostatControlSequenceOfOperation : public WriteAttribute { public: - SubscribeAttributeThermostatOccupancy() - : SubscribeAttribute("occupancy") + WriteThermostatControlSequenceOfOperation() + : WriteAttribute("control-sequence-of-operation") { + AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatOccupancy() + ~WriteThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat 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 subscribeAttributeOccupancyWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy 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; - } -}; - -/* - * Attribute AbsMinHeatSetpointLimit - */ -class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMinHeatSetpointLimit() - : ReadAttribute("abs-min-heat-setpoint-limit") - { - } - - ~ReadThermostatAbsMinHeatSetpointLimit() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMinHeatSetpointLimit() - : SubscribeAttribute("abs-min-heat-setpoint-limit") + SubscribeAttributeThermostatControlSequenceOfOperation() + : SubscribeAttribute("control-sequence-of-operation") { } - ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + ~SubscribeAttributeThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::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); @@ -83378,10 +98578,10 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83395,34 +98595,34 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxHeatSetpointLimit + * Attribute SystemMode */ -class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatSystemMode : public ReadAttribute { public: - ReadThermostatAbsMaxHeatSetpointLimit() - : ReadAttribute("abs-max-heat-setpoint-limit") + ReadThermostatSystemMode() + : ReadAttribute("system-mode") { } - ~ReadThermostatAbsMaxHeatSetpointLimit() + ~ReadThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat SystemMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83431,21 +98631,62 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { +class WriteThermostatSystemMode : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() - : SubscribeAttribute("abs-max-heat-setpoint-limit") + WriteThermostatSystemMode() + : WriteAttribute("system-mode") { + AddArgument("attr-name", "system-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + ~WriteThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSystemMode() + : SubscribeAttribute("system-mode") + { + } + + ~SubscribeAttributeThermostatSystemMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::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); @@ -83460,10 +98701,10 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeSystemModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83477,34 +98718,34 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMinCoolSetpointLimit + * Attribute ThermostatRunningMode */ -class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatThermostatRunningMode : public ReadAttribute { public: - ReadThermostatAbsMinCoolSetpointLimit() - : ReadAttribute("abs-min-cool-setpoint-limit") + ReadThermostatThermostatRunningMode() + : ReadAttribute("thermostat-running-mode") { } - ~ReadThermostatAbsMinCoolSetpointLimit() + ~ReadThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + LogNSError("Thermostat ThermostatRunningMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83513,21 +98754,21 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMinCoolSetpointLimit() - : SubscribeAttribute("abs-min-cool-setpoint-limit") + SubscribeAttributeThermostatThermostatRunningMode() + : SubscribeAttribute("thermostat-running-mode") { } - ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + ~SubscribeAttributeThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::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); @@ -83542,10 +98783,10 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeThermostatRunningModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83559,34 +98800,34 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxCoolSetpointLimit + * Attribute StartOfWeek */ -class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatStartOfWeek : public ReadAttribute { public: - ReadThermostatAbsMaxCoolSetpointLimit() - : ReadAttribute("abs-max-cool-setpoint-limit") + ReadThermostatStartOfWeek() + : ReadAttribute("start-of-week") { } - ~ReadThermostatAbsMaxCoolSetpointLimit() + ~ReadThermostatStartOfWeek() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat StartOfWeek read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83595,21 +98836,21 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() - : SubscribeAttribute("abs-max-cool-setpoint-limit") + SubscribeAttributeThermostatStartOfWeek() + : SubscribeAttribute("start-of-week") { } - ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatStartOfWeek() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::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); @@ -83624,10 +98865,10 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeStartOfWeekWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83641,34 +98882,34 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute PICoolingDemand + * Attribute NumberOfWeeklyTransitions */ -class ReadThermostatPICoolingDemand : public ReadAttribute { +class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { public: - ReadThermostatPICoolingDemand() - : ReadAttribute("picooling-demand") + ReadThermostatNumberOfWeeklyTransitions() + : ReadAttribute("number-of-weekly-transitions") { } - ~ReadThermostatPICoolingDemand() + ~ReadThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PICoolingDemand read Error", error); + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83677,21 +98918,21 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { public: - SubscribeAttributeThermostatPICoolingDemand() - : SubscribeAttribute("picooling-demand") + SubscribeAttributeThermostatNumberOfWeeklyTransitions() + : SubscribeAttribute("number-of-weekly-transitions") { } - ~SubscribeAttributeThermostatPICoolingDemand() + ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::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); @@ -83706,10 +98947,10 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePICoolingDemandWithParams:params + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83723,34 +98964,34 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { }; /* - * Attribute PIHeatingDemand + * Attribute NumberOfDailyTransitions */ -class ReadThermostatPIHeatingDemand : public ReadAttribute { +class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { public: - ReadThermostatPIHeatingDemand() - : ReadAttribute("piheating-demand") + ReadThermostatNumberOfDailyTransitions() + : ReadAttribute("number-of-daily-transitions") { } - ~ReadThermostatPIHeatingDemand() + ~ReadThermostatNumberOfDailyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PIHeatingDemand read Error", error); + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83759,21 +99000,21 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { public: - SubscribeAttributeThermostatPIHeatingDemand() - : SubscribeAttribute("piheating-demand") + SubscribeAttributeThermostatNumberOfDailyTransitions() + : SubscribeAttribute("number-of-daily-transitions") { } - ~SubscribeAttributeThermostatPIHeatingDemand() + ~SubscribeAttributeThermostatNumberOfDailyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::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); @@ -83788,10 +99029,10 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIHeatingDemandWithParams:params + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83805,34 +99046,34 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { }; /* - * Attribute HVACSystemTypeConfiguration + * Attribute TemperatureSetpointHold */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +class ReadThermostatTemperatureSetpointHold : public ReadAttribute { public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") + ReadThermostatTemperatureSetpointHold() + : ReadAttribute("temperature-setpoint-hold") { } - ~ReadThermostatHVACSystemTypeConfiguration() + ~ReadThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + LogNSError("Thermostat TemperatureSetpointHold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83841,24 +99082,24 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { } }; -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { +class WriteThermostatTemperatureSetpointHold : public WriteAttribute { public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") + WriteThermostatTemperatureSetpointHold() + : WriteAttribute("temperature-setpoint-hold") { - AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-name", "temperature-setpoint-hold"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatHVACSystemTypeConfiguration() + ~WriteThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -83868,9 +99109,9 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + LogNSError("Thermostat TemperatureSetpointHold write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83882,21 +99123,21 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") + SubscribeAttributeThermostatTemperatureSetpointHold() + : SubscribeAttribute("temperature-setpoint-hold") { } - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() + ~SubscribeAttributeThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::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); @@ -83911,10 +99152,10 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83928,34 +99169,34 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe }; /* - * Attribute LocalTemperatureCalibration + * Attribute TemperatureSetpointHoldDuration */ -class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { +class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { public: - ReadThermostatLocalTemperatureCalibration() - : ReadAttribute("local-temperature-calibration") + ReadThermostatTemperatureSetpointHoldDuration() + : ReadAttribute("temperature-setpoint-hold-duration") { } - ~ReadThermostatLocalTemperatureCalibration() + ~ReadThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83964,24 +99205,24 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { } }; -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { +class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { public: - WriteThermostatLocalTemperatureCalibration() - : WriteAttribute("local-temperature-calibration") + WriteThermostatTemperatureSetpointHoldDuration() + : WriteAttribute("temperature-setpoint-hold-duration") { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatLocalTemperatureCalibration() + ~WriteThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -83989,11 +99230,14 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } - [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84002,24 +99246,24 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperatureCalibration() - : SubscribeAttribute("local-temperature-calibration") + SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + : SubscribeAttribute("temperature-setpoint-hold-duration") { } - ~SubscribeAttributeThermostatLocalTemperatureCalibration() + ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::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); @@ -84034,10 +99278,10 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84051,34 +99295,34 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe }; /* - * Attribute OccupiedCoolingSetpoint + * Attribute ThermostatProgrammingOperationMode */ -class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { public: - ReadThermostatOccupiedCoolingSetpoint() - : ReadAttribute("occupied-cooling-setpoint") + ReadThermostatThermostatProgrammingOperationMode() + : ReadAttribute("thermostat-programming-operation-mode") { } - ~ReadThermostatOccupiedCoolingSetpoint() + ~ReadThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84087,24 +99331,24 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { +class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { public: - WriteThermostatOccupiedCoolingSetpoint() - : WriteAttribute("occupied-cooling-setpoint") + WriteThermostatThermostatProgrammingOperationMode() + : WriteAttribute("thermostat-programming-operation-mode") { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedCoolingSetpoint() + ~WriteThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -84112,11 +99356,11 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84125,24 +99369,24 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedCoolingSetpoint() - : SubscribeAttribute("occupied-cooling-setpoint") + SubscribeAttributeThermostatThermostatProgrammingOperationMode() + : SubscribeAttribute("thermostat-programming-operation-mode") { } - ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::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); @@ -84157,10 +99401,10 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84174,34 +99418,34 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr }; /* - * Attribute OccupiedHeatingSetpoint + * Attribute ThermostatRunningState */ -class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatThermostatRunningState : public ReadAttribute { public: - ReadThermostatOccupiedHeatingSetpoint() - : ReadAttribute("occupied-heating-setpoint") + ReadThermostatThermostatRunningState() + : ReadAttribute("thermostat-running-state") { } - ~ReadThermostatOccupiedHeatingSetpoint() + ~ReadThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat ThermostatRunningState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84210,62 +99454,103 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { +class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { public: - WriteThermostatOccupiedHeatingSetpoint() - : WriteAttribute("occupied-heating-setpoint") + SubscribeAttributeThermostatThermostatRunningState() + : SubscribeAttribute("thermostat-running-state") { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + __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 subscribeAttributeThermostatRunningStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSource + */ +class ReadThermostatSetpointChangeSource : public ReadAttribute { +public: + ReadThermostatSetpointChangeSource() + : ReadAttribute("setpoint-change-source") + { + } + + ~ReadThermostatSetpointChangeSource() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat SetpointChangeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedHeatingSetpoint() - : SubscribeAttribute("occupied-heating-setpoint") + SubscribeAttributeThermostatSetpointChangeSource() + : SubscribeAttribute("setpoint-change-source") { } - ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatSetpointChangeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::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); @@ -84280,10 +99565,10 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeSetpointChangeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84297,34 +99582,34 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr }; /* - * Attribute UnoccupiedCoolingSetpoint + * Attribute SetpointChangeAmount */ -class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatSetpointChangeAmount : public ReadAttribute { public: - ReadThermostatUnoccupiedCoolingSetpoint() - : ReadAttribute("unoccupied-cooling-setpoint") + ReadThermostatSetpointChangeAmount() + : ReadAttribute("setpoint-change-amount") { } - ~ReadThermostatUnoccupiedCoolingSetpoint() + ~ReadThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat SetpointChangeAmount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84333,62 +99618,103 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { +class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { public: - WriteThermostatUnoccupiedCoolingSetpoint() - : WriteAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeThermostatSetpointChangeAmount() + : SubscribeAttribute("setpoint-change-amount") { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + __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 subscribeAttributeSetpointChangeAmountWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSourceTimestamp + */ +class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +public: + ReadThermostatSetpointChangeSourceTimestamp() + : ReadAttribute("setpoint-change-source-timestamp") + { + } + + ~ReadThermostatSetpointChangeSourceTimestamp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() - : SubscribeAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + : SubscribeAttribute("setpoint-change-source-timestamp") { } - ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::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); @@ -84403,10 +99729,10 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84420,34 +99746,34 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt }; /* - * Attribute UnoccupiedHeatingSetpoint + * Attribute OccupiedSetback */ -class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatOccupiedSetback : public ReadAttribute { public: - ReadThermostatUnoccupiedHeatingSetpoint() - : ReadAttribute("unoccupied-heating-setpoint") + ReadThermostatOccupiedSetback() + : ReadAttribute("occupied-setback") { } - ~ReadThermostatUnoccupiedHeatingSetpoint() + ~ReadThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat OccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84456,24 +99782,24 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { +class WriteThermostatOccupiedSetback : public WriteAttribute { public: - WriteThermostatUnoccupiedHeatingSetpoint() - : WriteAttribute("unoccupied-heating-setpoint") + WriteThermostatOccupiedSetback() + : WriteAttribute("occupied-setback") { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "occupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedHeatingSetpoint() + ~WriteThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -84481,11 +99807,14 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + LogNSError("Thermostat OccupiedSetback write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84494,24 +99823,24 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() - : SubscribeAttribute("unoccupied-heating-setpoint") + SubscribeAttributeThermostatOccupiedSetback() + : SubscribeAttribute("occupied-setback") { } - ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::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); @@ -84526,10 +99855,10 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeOccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84543,34 +99872,34 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt }; /* - * Attribute MinHeatSetpointLimit + * Attribute OccupiedSetbackMin */ -class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { +class ReadThermostatOccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatMinHeatSetpointLimit() - : ReadAttribute("min-heat-setpoint-limit") + ReadThermostatOccupiedSetbackMin() + : ReadAttribute("occupied-setback-min") { } - ~ReadThermostatMinHeatSetpointLimit() + ~ReadThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + LogNSError("Thermostat OccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84579,62 +99908,103 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { public: - WriteThermostatMinHeatSetpointLimit() - : WriteAttribute("min-heat-setpoint-limit") + SubscribeAttributeThermostatOccupiedSetbackMin() + : SubscribeAttribute("occupied-setback-min") { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatMinHeatSetpointLimit() + ~SubscribeAttributeThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + __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 subscribeAttributeOccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedSetbackMax + */ +class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatOccupiedSetbackMax() + : ReadAttribute("occupied-setback-max") + { + } + + ~ReadThermostatOccupiedSetbackMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat OccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinHeatSetpointLimit() - : SubscribeAttribute("min-heat-setpoint-limit") + SubscribeAttributeThermostatOccupiedSetbackMax() + : SubscribeAttribute("occupied-setback-max") { } - ~SubscribeAttributeThermostatMinHeatSetpointLimit() + ~SubscribeAttributeThermostatOccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::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); @@ -84649,10 +100019,10 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84666,34 +100036,34 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxHeatSetpointLimit + * Attribute UnoccupiedSetback */ -class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatUnoccupiedSetback : public ReadAttribute { public: - ReadThermostatMaxHeatSetpointLimit() - : ReadAttribute("max-heat-setpoint-limit") + ReadThermostatUnoccupiedSetback() + : ReadAttribute("unoccupied-setback") { } - ~ReadThermostatMaxHeatSetpointLimit() + ~ReadThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat UnoccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84702,24 +100072,24 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { +class WriteThermostatUnoccupiedSetback : public WriteAttribute { public: - WriteThermostatMaxHeatSetpointLimit() - : WriteAttribute("max-heat-setpoint-limit") + WriteThermostatUnoccupiedSetback() + : WriteAttribute("unoccupied-setback") { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "unoccupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMaxHeatSetpointLimit() + ~WriteThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -84727,11 +100097,14 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + LogNSError("Thermostat UnoccupiedSetback write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84740,24 +100113,24 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxHeatSetpointLimit() - : SubscribeAttribute("max-heat-setpoint-limit") + SubscribeAttributeThermostatUnoccupiedSetback() + : SubscribeAttribute("unoccupied-setback") { } - ~SubscribeAttributeThermostatMaxHeatSetpointLimit() + ~SubscribeAttributeThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::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); @@ -84772,10 +100145,10 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84789,34 +100162,34 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinCoolSetpointLimit + * Attribute UnoccupiedSetbackMin */ -class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatMinCoolSetpointLimit() - : ReadAttribute("min-cool-setpoint-limit") + ReadThermostatUnoccupiedSetbackMin() + : ReadAttribute("unoccupied-setback-min") { } - ~ReadThermostatMinCoolSetpointLimit() + ~ReadThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84825,62 +100198,103 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { public: - WriteThermostatMinCoolSetpointLimit() - : WriteAttribute("min-cool-setpoint-limit") + SubscribeAttributeThermostatUnoccupiedSetbackMin() + : SubscribeAttribute("unoccupied-setback-min") { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatMinCoolSetpointLimit() + ~SubscribeAttributeThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + __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 subscribeAttributeUnoccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedSetbackMax + */ +class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatUnoccupiedSetbackMax() + : ReadAttribute("unoccupied-setback-max") + { + } + + ~ReadThermostatUnoccupiedSetbackMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::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); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinCoolSetpointLimit() - : SubscribeAttribute("min-cool-setpoint-limit") + SubscribeAttributeThermostatUnoccupiedSetbackMax() + : SubscribeAttribute("unoccupied-setback-max") { } - ~SubscribeAttributeThermostatMinCoolSetpointLimit() + ~SubscribeAttributeThermostatUnoccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::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); @@ -84895,10 +100309,10 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84912,34 +100326,34 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxCoolSetpointLimit + * Attribute EmergencyHeatDelta */ -class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatEmergencyHeatDelta : public ReadAttribute { public: - ReadThermostatMaxCoolSetpointLimit() - : ReadAttribute("max-cool-setpoint-limit") + ReadThermostatEmergencyHeatDelta() + : ReadAttribute("emergency-heat-delta") { } - ~ReadThermostatMaxCoolSetpointLimit() + ~ReadThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat EmergencyHeatDelta read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84948,24 +100362,24 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { +class WriteThermostatEmergencyHeatDelta : public WriteAttribute { public: - WriteThermostatMaxCoolSetpointLimit() - : WriteAttribute("max-cool-setpoint-limit") + WriteThermostatEmergencyHeatDelta() + : WriteAttribute("emergency-heat-delta") { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMaxCoolSetpointLimit() + ~WriteThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -84973,11 +100387,11 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + LogNSError("Thermostat EmergencyHeatDelta write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84986,24 +100400,24 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxCoolSetpointLimit() - : SubscribeAttribute("max-cool-setpoint-limit") + SubscribeAttributeThermostatEmergencyHeatDelta() + : SubscribeAttribute("emergency-heat-delta") { } - ~SubscribeAttributeThermostatMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::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); @@ -85018,10 +100432,10 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85035,34 +100449,34 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinSetpointDeadBand + * Attribute ACType */ -class ReadThermostatMinSetpointDeadBand : public ReadAttribute { +class ReadThermostatACType : public ReadAttribute { public: - ReadThermostatMinSetpointDeadBand() - : ReadAttribute("min-setpoint-dead-band") + ReadThermostatACType() + : ReadAttribute("actype") { } - ~ReadThermostatMinSetpointDeadBand() + ~ReadThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinSetpointDeadBand read Error", error); + LogNSError("Thermostat ACType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85071,24 +100485,24 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { } }; -class WriteThermostatMinSetpointDeadBand : public WriteAttribute { +class WriteThermostatACType : public WriteAttribute { public: - WriteThermostatMinSetpointDeadBand() - : WriteAttribute("min-setpoint-dead-band") + WriteThermostatACType() + : WriteAttribute("actype") { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + AddArgument("attr-name", "actype"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMinSetpointDeadBand() + ~WriteThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85096,11 +100510,11 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); + LogNSError("Thermostat ACType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85109,24 +100523,24 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { } private: - int8_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +class SubscribeAttributeThermostatACType : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinSetpointDeadBand() - : SubscribeAttribute("min-setpoint-dead-band") + SubscribeAttributeThermostatACType() + : SubscribeAttribute("actype") { } - ~SubscribeAttributeThermostatMinSetpointDeadBand() + ~SubscribeAttributeThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::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); @@ -85141,10 +100555,10 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + [cluster subscribeAttributeACTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85158,34 +100572,34 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut }; /* - * Attribute RemoteSensing + * Attribute ACCapacity */ -class ReadThermostatRemoteSensing : public ReadAttribute { +class ReadThermostatACCapacity : public ReadAttribute { public: - ReadThermostatRemoteSensing() - : ReadAttribute("remote-sensing") + ReadThermostatACCapacity() + : ReadAttribute("accapacity") { } - ~ReadThermostatRemoteSensing() + ~ReadThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat RemoteSensing read Error", error); + LogNSError("Thermostat ACCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85194,24 +100608,24 @@ class ReadThermostatRemoteSensing : public ReadAttribute { } }; -class WriteThermostatRemoteSensing : public WriteAttribute { +class WriteThermostatACCapacity : public WriteAttribute { public: - WriteThermostatRemoteSensing() - : WriteAttribute("remote-sensing") + WriteThermostatACCapacity() + : WriteAttribute("accapacity") { - AddArgument("attr-name", "remote-sensing"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "accapacity"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatRemoteSensing() + ~WriteThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85219,11 +100633,11 @@ class WriteThermostatRemoteSensing : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); + LogNSError("Thermostat ACCapacity write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85232,24 +100646,24 @@ class WriteThermostatRemoteSensing : public WriteAttribute { } private: - uint8_t mValue; + uint16_t mValue; }; -class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { public: - SubscribeAttributeThermostatRemoteSensing() - : SubscribeAttribute("remote-sensing") + SubscribeAttributeThermostatACCapacity() + : SubscribeAttribute("accapacity") { } - ~SubscribeAttributeThermostatRemoteSensing() + ~SubscribeAttributeThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::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); @@ -85264,10 +100678,10 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemoteSensingWithParams:params + [cluster subscribeAttributeACCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85281,34 +100695,34 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { }; /* - * Attribute ControlSequenceOfOperation + * Attribute ACRefrigerantType */ -class ReadThermostatControlSequenceOfOperation : public ReadAttribute { +class ReadThermostatACRefrigerantType : public ReadAttribute { public: - ReadThermostatControlSequenceOfOperation() - : ReadAttribute("control-sequence-of-operation") + ReadThermostatACRefrigerantType() + : ReadAttribute("acrefrigerant-type") { } - ~ReadThermostatControlSequenceOfOperation() + ~ReadThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + LogNSError("Thermostat ACRefrigerantType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85317,24 +100731,24 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { } }; -class WriteThermostatControlSequenceOfOperation : public WriteAttribute { +class WriteThermostatACRefrigerantType : public WriteAttribute { public: - WriteThermostatControlSequenceOfOperation() - : WriteAttribute("control-sequence-of-operation") + WriteThermostatACRefrigerantType() + : WriteAttribute("acrefrigerant-type") { - AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-name", "acrefrigerant-type"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatControlSequenceOfOperation() + ~WriteThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85344,9 +100758,9 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + LogNSError("Thermostat ACRefrigerantType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85358,21 +100772,21 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { public: - SubscribeAttributeThermostatControlSequenceOfOperation() - : SubscribeAttribute("control-sequence-of-operation") + SubscribeAttributeThermostatACRefrigerantType() + : SubscribeAttribute("acrefrigerant-type") { } - ~SubscribeAttributeThermostatControlSequenceOfOperation() + ~SubscribeAttributeThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::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); @@ -85387,10 +100801,10 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + [cluster subscribeAttributeACRefrigerantTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85404,34 +100818,34 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA }; /* - * Attribute SystemMode + * Attribute ACCompressorType */ -class ReadThermostatSystemMode : public ReadAttribute { +class ReadThermostatACCompressorType : public ReadAttribute { public: - ReadThermostatSystemMode() - : ReadAttribute("system-mode") + ReadThermostatACCompressorType() + : ReadAttribute("accompressor-type") { } - ~ReadThermostatSystemMode() + ~ReadThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SystemMode read Error", error); + LogNSError("Thermostat ACCompressorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85440,24 +100854,24 @@ class ReadThermostatSystemMode : public ReadAttribute { } }; -class WriteThermostatSystemMode : public WriteAttribute { +class WriteThermostatACCompressorType : public WriteAttribute { public: - WriteThermostatSystemMode() - : WriteAttribute("system-mode") + WriteThermostatACCompressorType() + : WriteAttribute("accompressor-type") { - AddArgument("attr-name", "system-mode"); + AddArgument("attr-name", "accompressor-type"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatSystemMode() + ~WriteThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85467,9 +100881,9 @@ class WriteThermostatSystemMode : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); + LogNSError("Thermostat ACCompressorType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85481,21 +100895,21 @@ class WriteThermostatSystemMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { public: - SubscribeAttributeThermostatSystemMode() - : SubscribeAttribute("system-mode") + SubscribeAttributeThermostatACCompressorType() + : SubscribeAttribute("accompressor-type") { } - ~SubscribeAttributeThermostatSystemMode() + ~SubscribeAttributeThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::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); @@ -85510,10 +100924,10 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSystemModeWithParams:params + [cluster subscribeAttributeACCompressorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85527,34 +100941,34 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { }; /* - * Attribute ThermostatRunningMode + * Attribute ACErrorCode */ -class ReadThermostatThermostatRunningMode : public ReadAttribute { +class ReadThermostatACErrorCode : public ReadAttribute { public: - ReadThermostatThermostatRunningMode() - : ReadAttribute("thermostat-running-mode") + ReadThermostatACErrorCode() + : ReadAttribute("acerror-code") { } - ~ReadThermostatThermostatRunningMode() + ~ReadThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningMode read Error", error); + LogNSError("Thermostat ACErrorCode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85563,103 +100977,62 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { +class WriteThermostatACErrorCode : public WriteAttribute { public: - SubscribeAttributeThermostatThermostatRunningMode() - : SubscribeAttribute("thermostat-running-mode") + WriteThermostatACErrorCode() + : WriteAttribute("acerror-code") { + AddArgument("attr-name", "acerror-code"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatThermostatRunningMode() + ~WriteThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat 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 subscribeAttributeThermostatRunningModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode 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; - } -}; - -/* - * Attribute StartOfWeek - */ -class ReadThermostatStartOfWeek : public ReadAttribute { -public: - ReadThermostatStartOfWeek() - : ReadAttribute("start-of-week") - { - } - - ~ReadThermostatStartOfWeek() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat StartOfWeek read Error", error); + [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint32_t mValue; }; -class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { +class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { public: - SubscribeAttributeThermostatStartOfWeek() - : SubscribeAttribute("start-of-week") + SubscribeAttributeThermostatACErrorCode() + : SubscribeAttribute("acerror-code") { } - ~SubscribeAttributeThermostatStartOfWeek() + ~SubscribeAttributeThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::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); @@ -85674,10 +101047,10 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartOfWeekWithParams:params + [cluster subscribeAttributeACErrorCodeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85691,34 +101064,34 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { }; /* - * Attribute NumberOfWeeklyTransitions + * Attribute ACLouverPosition */ -class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { +class ReadThermostatACLouverPosition : public ReadAttribute { public: - ReadThermostatNumberOfWeeklyTransitions() - : ReadAttribute("number-of-weekly-transitions") + ReadThermostatACLouverPosition() + : ReadAttribute("aclouver-position") { } - ~ReadThermostatNumberOfWeeklyTransitions() + ~ReadThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + LogNSError("Thermostat ACLouverPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85727,21 +101100,62 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { +class WriteThermostatACLouverPosition : public WriteAttribute { public: - SubscribeAttributeThermostatNumberOfWeeklyTransitions() - : SubscribeAttribute("number-of-weekly-transitions") + WriteThermostatACLouverPosition() + : WriteAttribute("aclouver-position") { + AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() + ~WriteThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACLouverPosition() + : SubscribeAttribute("aclouver-position") + { + } + + ~SubscribeAttributeThermostatACLouverPosition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::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); @@ -85756,10 +101170,10 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + [cluster subscribeAttributeACLouverPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85773,34 +101187,34 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt }; /* - * Attribute NumberOfDailyTransitions + * Attribute ACCoilTemperature */ -class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { +class ReadThermostatACCoilTemperature : public ReadAttribute { public: - ReadThermostatNumberOfDailyTransitions() - : ReadAttribute("number-of-daily-transitions") + ReadThermostatACCoilTemperature() + : ReadAttribute("accoil-temperature") { } - ~ReadThermostatNumberOfDailyTransitions() + ~ReadThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + LogNSError("Thermostat ACCoilTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85809,21 +101223,21 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { +class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfDailyTransitions() - : SubscribeAttribute("number-of-daily-transitions") + SubscribeAttributeThermostatACCoilTemperature() + : SubscribeAttribute("accoil-temperature") { } - ~SubscribeAttributeThermostatNumberOfDailyTransitions() + ~SubscribeAttributeThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::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); @@ -85838,10 +101252,10 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + [cluster subscribeAttributeACCoilTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85855,34 +101269,34 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt }; /* - * Attribute TemperatureSetpointHold + * Attribute ACCapacityformat */ -class ReadThermostatTemperatureSetpointHold : public ReadAttribute { +class ReadThermostatACCapacityformat : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHold() - : ReadAttribute("temperature-setpoint-hold") + ReadThermostatACCapacityformat() + : ReadAttribute("accapacityformat") { } - ~ReadThermostatTemperatureSetpointHold() + ~ReadThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); + LogNSError("Thermostat ACCapacityformat read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85891,24 +101305,24 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHold : public WriteAttribute { +class WriteThermostatACCapacityformat : public WriteAttribute { public: - WriteThermostatTemperatureSetpointHold() - : WriteAttribute("temperature-setpoint-hold") + WriteThermostatACCapacityformat() + : WriteAttribute("accapacityformat") { - AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-name", "accapacityformat"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatTemperatureSetpointHold() + ~WriteThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85918,9 +101332,9 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); + LogNSError("Thermostat ACCapacityformat write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85932,21 +101346,21 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHold() - : SubscribeAttribute("temperature-setpoint-hold") + SubscribeAttributeThermostatACCapacityformat() + : SubscribeAttribute("accapacityformat") { } - ~SubscribeAttributeThermostatTemperatureSetpointHold() + ~SubscribeAttributeThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::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); @@ -85961,10 +101375,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + [cluster subscribeAttributeACCapacityformatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85978,101 +101392,57 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr }; /* - * Attribute TemperatureSetpointHoldDuration + * Attribute GeneratedCommandList */ -class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { +class ReadThermostatGeneratedCommandList : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHoldDuration() - : ReadAttribute("temperature-setpoint-hold-duration") + ReadThermostatGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThermostatTemperatureSetpointHoldDuration() + ~ReadThermostatGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { -public: - WriteThermostatTemperatureSetpointHoldDuration() - : WriteAttribute("temperature-setpoint-hold-duration") - { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHoldDuration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedShort:mValue.Value()]; - } - - [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + LogNSError("Thermostat GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHoldDuration() - : SubscribeAttribute("temperature-setpoint-hold-duration") + SubscribeAttributeThermostatGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + ~SubscribeAttributeThermostatGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::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); @@ -86087,10 +101457,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86104,98 +101474,57 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc }; /* - * Attribute ThermostatProgrammingOperationMode + * Attribute AcceptedCommandList */ -class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { +class ReadThermostatAcceptedCommandList : public ReadAttribute { public: - ReadThermostatThermostatProgrammingOperationMode() - : ReadAttribute("thermostat-programming-operation-mode") + ReadThermostatAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThermostatThermostatProgrammingOperationMode() + ~ReadThermostatAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { -public: - WriteThermostatThermostatProgrammingOperationMode() - : WriteAttribute("thermostat-programming-operation-mode") - { - AddArgument("attr-name", "thermostat-programming-operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatThermostatProgrammingOperationMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); + LogNSError("Thermostat AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatProgrammingOperationMode() - : SubscribeAttribute("thermostat-programming-operation-mode") + SubscribeAttributeThermostatAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() + ~SubscribeAttributeThermostatAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::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); @@ -86210,10 +101539,10 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86226,35 +101555,37 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ThermostatRunningState + * Attribute EventList */ -class ReadThermostatThermostatRunningState : public ReadAttribute { +class ReadThermostatEventList : public ReadAttribute { public: - ReadThermostatThermostatRunningState() - : ReadAttribute("thermostat-running-state") + ReadThermostatEventList() + : ReadAttribute("event-list") { } - ~ReadThermostatThermostatRunningState() + ~ReadThermostatEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningState read Error", error); + LogNSError("Thermostat EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86263,21 +101594,21 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { +class SubscribeAttributeThermostatEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningState() - : SubscribeAttribute("thermostat-running-state") + SubscribeAttributeThermostatEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatThermostatRunningState() + ~SubscribeAttributeThermostatEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::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); @@ -86292,10 +101623,10 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningStateWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86308,35 +101639,37 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SetpointChangeSource + * Attribute AttributeList */ -class ReadThermostatSetpointChangeSource : public ReadAttribute { +class ReadThermostatAttributeList : public ReadAttribute { public: - ReadThermostatSetpointChangeSource() - : ReadAttribute("setpoint-change-source") + ReadThermostatAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThermostatSetpointChangeSource() + ~ReadThermostatAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSource read Error", error); + LogNSError("Thermostat AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86345,21 +101678,21 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { +class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSource() - : SubscribeAttribute("setpoint-change-source") + SubscribeAttributeThermostatAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatSetpointChangeSource() + ~SubscribeAttributeThermostatAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::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); @@ -86374,10 +101707,10 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86391,34 +101724,34 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu }; /* - * Attribute SetpointChangeAmount + * Attribute FeatureMap */ -class ReadThermostatSetpointChangeAmount : public ReadAttribute { +class ReadThermostatFeatureMap : public ReadAttribute { public: - ReadThermostatSetpointChangeAmount() - : ReadAttribute("setpoint-change-amount") + ReadThermostatFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThermostatSetpointChangeAmount() + ~ReadThermostatFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeAmount read Error", error); + LogNSError("Thermostat FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86427,21 +101760,21 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { +class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeAmount() - : SubscribeAttribute("setpoint-change-amount") + SubscribeAttributeThermostatFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatSetpointChangeAmount() + ~SubscribeAttributeThermostatFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::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); @@ -86456,10 +101789,10 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86473,34 +101806,34 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu }; /* - * Attribute SetpointChangeSourceTimestamp + * Attribute ClusterRevision */ -class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +class ReadThermostatClusterRevision : public ReadAttribute { public: - ReadThermostatSetpointChangeSourceTimestamp() - : ReadAttribute("setpoint-change-source-timestamp") + ReadThermostatClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThermostatSetpointChangeSourceTimestamp() + ~ReadThermostatClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::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); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + LogNSError("Thermostat ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86509,21 +101842,21 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { +class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSourceTimestamp() - : SubscribeAttribute("setpoint-change-source-timestamp") + SubscribeAttributeThermostatClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + ~SubscribeAttributeThermostatClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::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); @@ -86538,10 +101871,10 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86554,188 +101887,206 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri } }; +/*----------------------------------------------------------------------------*\ +| Cluster FanControl | 0x0202 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Step | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * AirflowDirection | 0x000B | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute OccupiedSetback + * Command Step */ -class ReadThermostatOccupiedSetback : public ReadAttribute { +class FanControlStep : public ClusterCommand { public: - ReadThermostatOccupiedSetback() - : ReadAttribute("occupied-setback") - { - } - - ~ReadThermostatOccupiedSetback() + FanControlStep() + : ClusterCommand("step") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Wrap", 0, 1, &mRequest.wrap); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat OccupiedSetback read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatOccupiedSetback : public WriteAttribute { -public: - WriteThermostatOccupiedSetback() - : WriteAttribute("occupied-setback") - { - AddArgument("attr-name", "occupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedSetback() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.wrap.HasValue()) { + params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; + } else { + params.wrap = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.lowestOff.HasValue()) { + params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; + } else { + params.lowestOff = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepWithParams: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); + } + }]; } - - [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::FanControl::Commands::Step::Type mRequest; }; -class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute FanMode + */ +class ReadFanControlFanMode : public ReadAttribute { public: - SubscribeAttributeThermostatOccupiedSetback() - : SubscribeAttribute("occupied-setback") + ReadFanControlFanMode() + : ReadAttribute("fan-mode") { } - ~SubscribeAttributeThermostatOccupiedSetback() + ~ReadFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::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); - __auto_type * cluster = [[MTRBaseClusterThermostat 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 subscribeAttributeOccupiedSetbackWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + 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); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("FanControl FanMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -/* - * Attribute OccupiedSetbackMin - */ -class ReadThermostatOccupiedSetbackMin : public ReadAttribute { +class WriteFanControlFanMode : public WriteAttribute { public: - ReadThermostatOccupiedSetbackMin() - : ReadAttribute("occupied-setback-min") + WriteFanControlFanMode() + : WriteAttribute("fan-mode") { + AddArgument("attr-name", "fan-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadThermostatOccupiedSetbackMin() + ~WriteFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat OccupiedSetbackMin read Error", error); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeFanModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMin() - : SubscribeAttribute("occupied-setback-min") + SubscribeAttributeFanControlFanMode() + : SubscribeAttribute("fan-mode") { } - ~SubscribeAttributeThermostatOccupiedSetbackMin() + ~SubscribeAttributeFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86746,10 +102097,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + [cluster subscribeAttributeFanModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + NSLog(@"FanControl.FanMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86763,34 +102114,34 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute }; /* - * Attribute OccupiedSetbackMax + * Attribute FanModeSequence */ -class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +class ReadFanControlFanModeSequence : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMax() - : ReadAttribute("occupied-setback-max") + ReadFanControlFanModeSequence() + : ReadAttribute("fan-mode-sequence") { } - ~ReadThermostatOccupiedSetbackMax() + ~ReadFanControlFanModeSequence() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetbackMax read Error", error); + LogNSError("FanControl FanModeSequence read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86799,25 +102150,25 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMax() - : SubscribeAttribute("occupied-setback-max") + SubscribeAttributeFanControlFanModeSequence() + : SubscribeAttribute("fan-mode-sequence") { } - ~SubscribeAttributeThermostatOccupiedSetbackMax() + ~SubscribeAttributeFanControlFanModeSequence() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86828,10 +102179,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeFanModeSequenceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86845,34 +102196,34 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute }; /* - * Attribute UnoccupiedSetback + * Attribute PercentSetting */ -class ReadThermostatUnoccupiedSetback : public ReadAttribute { +class ReadFanControlPercentSetting : public ReadAttribute { public: - ReadThermostatUnoccupiedSetback() - : ReadAttribute("unoccupied-setback") + ReadFanControlPercentSetting() + : ReadAttribute("percent-setting") { } - ~ReadThermostatUnoccupiedSetback() + ~ReadFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetback read Error", error); + LogNSError("FanControl PercentSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86881,28 +102232,28 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { } }; -class WriteThermostatUnoccupiedSetback : public WriteAttribute { +class WriteFanControlPercentSetting : public WriteAttribute { public: - WriteThermostatUnoccupiedSetback() - : WriteAttribute("unoccupied-setback") + WriteFanControlPercentSetting() + : WriteAttribute("percent-setting") { - AddArgument("attr-name", "unoccupied-setback"); + AddArgument("attr-name", "percent-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedSetback() + ~WriteFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -86911,9 +102262,9 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); + LogNSError("FanControl PercentSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86922,28 +102273,28 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetback() - : SubscribeAttribute("unoccupied-setback") + SubscribeAttributeFanControlPercentSetting() + : SubscribeAttribute("percent-setting") { } - ~SubscribeAttributeThermostatUnoccupiedSetback() + ~SubscribeAttributeFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86954,10 +102305,10 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params + [cluster subscribeAttributePercentSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86971,34 +102322,34 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute }; /* - * Attribute UnoccupiedSetbackMin + * Attribute PercentCurrent */ -class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { +class ReadFanControlPercentCurrent : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMin() - : ReadAttribute("unoccupied-setback-min") + ReadFanControlPercentCurrent() + : ReadAttribute("percent-current") { } - ~ReadThermostatUnoccupiedSetbackMin() + ~ReadFanControlPercentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + LogNSError("FanControl PercentCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87007,25 +102358,25 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMin() - : SubscribeAttribute("unoccupied-setback-min") + SubscribeAttributeFanControlPercentCurrent() + : SubscribeAttribute("percent-current") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMin() + ~SubscribeAttributeFanControlPercentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87036,10 +102387,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + [cluster subscribeAttributePercentCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87053,34 +102404,34 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu }; /* - * Attribute UnoccupiedSetbackMax + * Attribute SpeedMax */ -class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +class ReadFanControlSpeedMax : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMax() - : ReadAttribute("unoccupied-setback-max") + ReadFanControlSpeedMax() + : ReadAttribute("speed-max") { } - ~ReadThermostatUnoccupiedSetbackMax() + ~ReadFanControlSpeedMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + LogNSError("FanControl SpeedMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87089,25 +102440,25 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMax() - : SubscribeAttribute("unoccupied-setback-max") + SubscribeAttributeFanControlSpeedMax() + : SubscribeAttribute("speed-max") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMax() + ~SubscribeAttributeFanControlSpeedMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87118,10 +102469,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeSpeedMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87135,34 +102486,34 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu }; /* - * Attribute EmergencyHeatDelta + * Attribute SpeedSetting */ -class ReadThermostatEmergencyHeatDelta : public ReadAttribute { +class ReadFanControlSpeedSetting : public ReadAttribute { public: - ReadThermostatEmergencyHeatDelta() - : ReadAttribute("emergency-heat-delta") + ReadFanControlSpeedSetting() + : ReadAttribute("speed-setting") { } - ~ReadThermostatEmergencyHeatDelta() + ~ReadFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat EmergencyHeatDelta read Error", error); + LogNSError("FanControl SpeedSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87171,159 +102522,39 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { } }; -class WriteThermostatEmergencyHeatDelta : public WriteAttribute { +class WriteFanControlSpeedSetting : public WriteAttribute { public: - WriteThermostatEmergencyHeatDelta() - : WriteAttribute("emergency-heat-delta") + WriteFanControlSpeedSetting() + : WriteAttribute("speed-setting") { - AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-name", "speed-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatEmergencyHeatDelta() + ~WriteFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { -public: - SubscribeAttributeThermostatEmergencyHeatDelta() - : SubscribeAttribute("emergency-heat-delta") - { - } - - ~SubscribeAttributeThermostatEmergencyHeatDelta() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::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); - __auto_type * cluster = [[MTRBaseClusterThermostat 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(); + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta 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; - } -}; - -/* - * Attribute ACType - */ -class ReadThermostatACType : public ReadAttribute { -public: - ReadThermostatACType() - : ReadAttribute("actype") - { - } - - ~ReadThermostatACType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat ACType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACType : public WriteAttribute { -public: - WriteThermostatACType() - : WriteAttribute("actype") - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() - { - } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACType write Error", error); + LogNSError("FanControl SpeedSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87332,28 +102563,28 @@ class WriteThermostatACType : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatACType : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACType() - : SubscribeAttribute("actype") + SubscribeAttributeFanControlSpeedSetting() + : SubscribeAttribute("speed-setting") { } - ~SubscribeAttributeThermostatACType() + ~SubscribeAttributeFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87364,10 +102595,10 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACTypeWithParams:params + [cluster subscribeAttributeSpeedSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87381,102 +102612,61 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { }; /* - * Attribute ACCapacity + * Attribute SpeedCurrent */ -class ReadThermostatACCapacity : public ReadAttribute { +class ReadFanControlSpeedCurrent : public ReadAttribute { public: - ReadThermostatACCapacity() - : ReadAttribute("accapacity") + ReadFanControlSpeedCurrent() + : ReadAttribute("speed-current") { } - ~ReadThermostatACCapacity() + ~ReadFanControlSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacity : public WriteAttribute { -public: - WriteThermostatACCapacity() - : WriteAttribute("accapacity") - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); + LogNSError("FanControl SpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacity() - : SubscribeAttribute("accapacity") + SubscribeAttributeFanControlSpeedCurrent() + : SubscribeAttribute("speed-current") { } - ~SubscribeAttributeThermostatACCapacity() + ~SubscribeAttributeFanControlSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87487,10 +102677,10 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityWithParams:params + [cluster subscribeAttributeSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87504,102 +102694,61 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { }; /* - * Attribute ACRefrigerantType + * Attribute RockSupport */ -class ReadThermostatACRefrigerantType : public ReadAttribute { +class ReadFanControlRockSupport : public ReadAttribute { public: - ReadThermostatACRefrigerantType() - : ReadAttribute("acrefrigerant-type") + ReadFanControlRockSupport() + : ReadAttribute("rock-support") { } - ~ReadThermostatACRefrigerantType() + ~ReadFanControlRockSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACRefrigerantType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACRefrigerantType : public WriteAttribute { -public: - WriteThermostatACRefrigerantType() - : WriteAttribute("acrefrigerant-type") - { - AddArgument("attr-name", "acrefrigerant-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACRefrigerantType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); + LogNSError("FanControl RockSupport read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { public: - SubscribeAttributeThermostatACRefrigerantType() - : SubscribeAttribute("acrefrigerant-type") + SubscribeAttributeFanControlRockSupport() + : SubscribeAttribute("rock-support") { } - ~SubscribeAttributeThermostatACRefrigerantType() + ~SubscribeAttributeFanControlRockSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87610,10 +102759,10 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params + [cluster subscribeAttributeRockSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + NSLog(@"FanControl.RockSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87627,34 +102776,34 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute }; /* - * Attribute ACCompressorType + * Attribute RockSetting */ -class ReadThermostatACCompressorType : public ReadAttribute { +class ReadFanControlRockSetting : public ReadAttribute { public: - ReadThermostatACCompressorType() - : ReadAttribute("accompressor-type") + ReadFanControlRockSetting() + : ReadAttribute("rock-setting") { } - ~ReadThermostatACCompressorType() + ~ReadFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCompressorType read Error", error); + LogNSError("FanControl RockSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87663,36 +102812,36 @@ class ReadThermostatACCompressorType : public ReadAttribute { } }; -class WriteThermostatACCompressorType : public WriteAttribute { +class WriteFanControlRockSetting : public WriteAttribute { public: - WriteThermostatACCompressorType() - : WriteAttribute("accompressor-type") + WriteFanControlRockSetting() + : WriteAttribute("rock-setting") { - AddArgument("attr-name", "accompressor-type"); + AddArgument("attr-name", "rock-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACCompressorType() + ~WriteFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeRockSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); + LogNSError("FanControl RockSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87704,25 +102853,25 @@ class WriteThermostatACCompressorType : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCompressorType() - : SubscribeAttribute("accompressor-type") + SubscribeAttributeFanControlRockSetting() + : SubscribeAttribute("rock-setting") { } - ~SubscribeAttributeThermostatACCompressorType() + ~SubscribeAttributeFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87733,10 +102882,10 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCompressorTypeWithParams:params + [cluster subscribeAttributeRockSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + NSLog(@"FanControl.RockSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87750,102 +102899,61 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { }; /* - * Attribute ACErrorCode + * Attribute WindSupport */ -class ReadThermostatACErrorCode : public ReadAttribute { +class ReadFanControlWindSupport : public ReadAttribute { public: - ReadThermostatACErrorCode() - : ReadAttribute("acerror-code") + ReadFanControlWindSupport() + : ReadAttribute("wind-support") { } - ~ReadThermostatACErrorCode() + ~ReadFanControlWindSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACErrorCode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACErrorCode : public WriteAttribute { -public: - WriteThermostatACErrorCode() - : WriteAttribute("acerror-code") - { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACErrorCode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); + LogNSError("FanControl WindSupport read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { public: - SubscribeAttributeThermostatACErrorCode() - : SubscribeAttribute("acerror-code") + SubscribeAttributeFanControlWindSupport() + : SubscribeAttribute("wind-support") { } - ~SubscribeAttributeThermostatACErrorCode() + ~SubscribeAttributeFanControlWindSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87856,10 +102964,10 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACErrorCodeWithParams:params + [cluster subscribeAttributeWindSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + NSLog(@"FanControl.WindSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87873,34 +102981,34 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { }; /* - * Attribute ACLouverPosition + * Attribute WindSetting */ -class ReadThermostatACLouverPosition : public ReadAttribute { +class ReadFanControlWindSetting : public ReadAttribute { public: - ReadThermostatACLouverPosition() - : ReadAttribute("aclouver-position") + ReadFanControlWindSetting() + : ReadAttribute("wind-setting") { } - ~ReadThermostatACLouverPosition() + ~ReadFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACLouverPosition read Error", error); + LogNSError("FanControl WindSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87909,36 +103017,36 @@ class ReadThermostatACLouverPosition : public ReadAttribute { } }; -class WriteThermostatACLouverPosition : public WriteAttribute { +class WriteFanControlWindSetting : public WriteAttribute { public: - WriteThermostatACLouverPosition() - : WriteAttribute("aclouver-position") + WriteFanControlWindSetting() + : WriteAttribute("wind-setting") { - AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-name", "wind-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACLouverPosition() + ~WriteFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeWindSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); + LogNSError("FanControl WindSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87950,25 +103058,25 @@ class WriteThermostatACLouverPosition : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACLouverPosition() - : SubscribeAttribute("aclouver-position") + SubscribeAttributeFanControlWindSetting() + : SubscribeAttribute("wind-setting") { } - ~SubscribeAttributeThermostatACLouverPosition() + ~SubscribeAttributeFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87979,10 +103087,10 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACLouverPositionWithParams:params + [cluster subscribeAttributeWindSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + NSLog(@"FanControl.WindSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87995,117 +103103,37 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { } }; -/* - * Attribute ACCoilTemperature - */ -class ReadThermostatACCoilTemperature : public ReadAttribute { -public: - ReadThermostatACCoilTemperature() - : ReadAttribute("accoil-temperature") - { - } - - ~ReadThermostatACCoilTemperature() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat ACCoilTemperature read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACCoilTemperature() - : SubscribeAttribute("accoil-temperature") - { - } - - ~SubscribeAttributeThermostatACCoilTemperature() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::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); - __auto_type * cluster = [[MTRBaseClusterThermostat 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 subscribeAttributeACCoilTemperatureWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature 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; - } -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ACCapacityformat + * Attribute AirflowDirection */ -class ReadThermostatACCapacityformat : public ReadAttribute { +class ReadFanControlAirflowDirection : public ReadAttribute { public: - ReadThermostatACCapacityformat() - : ReadAttribute("accapacityformat") + ReadFanControlAirflowDirection() + : ReadAttribute("airflow-direction") { } - ~ReadThermostatACCapacityformat() + ~ReadFanControlAirflowDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AirflowDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacityformat read Error", error); + LogNSError("FanControl AirflowDirection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88114,36 +103142,36 @@ class ReadThermostatACCapacityformat : public ReadAttribute { } }; -class WriteThermostatACCapacityformat : public WriteAttribute { +class WriteFanControlAirflowDirection : public WriteAttribute { public: - WriteThermostatACCapacityformat() - : WriteAttribute("accapacityformat") + WriteFanControlAirflowDirection() + : WriteAttribute("airflow-direction") { - AddArgument("attr-name", "accapacityformat"); + AddArgument("attr-name", "airflow-direction"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACCapacityformat() + ~WriteFanControlAirflowDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeAirflowDirectionWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); + LogNSError("FanControl AirflowDirection write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88155,25 +103183,25 @@ class WriteThermostatACCapacityformat : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacityformat() - : SubscribeAttribute("accapacityformat") + SubscribeAttributeFanControlAirflowDirection() + : SubscribeAttribute("airflow-direction") { } - ~SubscribeAttributeThermostatACCapacityformat() + ~SubscribeAttributeFanControlAirflowDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88184,10 +103212,10 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityformatWithParams:params + [cluster subscribeAttributeAirflowDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + NSLog(@"FanControl.AirflowDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88200,35 +103228,37 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadThermostatGeneratedCommandList : public ReadAttribute { +class ReadFanControlGeneratedCommandList : public ReadAttribute { public: - ReadThermostatGeneratedCommandList() + ReadFanControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadThermostatGeneratedCommandList() + ~ReadFanControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat GeneratedCommandList read Error", error); + LogNSError("FanControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88237,25 +103267,25 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatGeneratedCommandList() + SubscribeAttributeFanControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatGeneratedCommandList() + ~SubscribeAttributeFanControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88269,7 +103299,7 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88285,32 +103315,32 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadThermostatAcceptedCommandList : public ReadAttribute { +class ReadFanControlAcceptedCommandList : public ReadAttribute { public: - ReadThermostatAcceptedCommandList() + ReadFanControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadThermostatAcceptedCommandList() + ~ReadFanControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AcceptedCommandList read Error", error); + LogNSError("FanControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88319,25 +103349,25 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatAcceptedCommandList() + SubscribeAttributeFanControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatAcceptedCommandList() + ~SubscribeAttributeFanControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88351,7 +103381,7 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88369,32 +103399,32 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadThermostatEventList : public ReadAttribute { +class ReadFanControlEventList : public ReadAttribute { public: - ReadThermostatEventList() + ReadFanControlEventList() : ReadAttribute("event-list") { } - ~ReadThermostatEventList() + ~ReadFanControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); + NSLog(@"FanControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat EventList read Error", error); + LogNSError("FanControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88403,25 +103433,25 @@ class ReadThermostatEventList : public ReadAttribute { } }; -class SubscribeAttributeThermostatEventList : public SubscribeAttribute { +class SubscribeAttributeFanControlEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatEventList() + SubscribeAttributeFanControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatEventList() + ~SubscribeAttributeFanControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88435,7 +103465,7 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); + NSLog(@"FanControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88453,32 +103483,32 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadThermostatAttributeList : public ReadAttribute { +class ReadFanControlAttributeList : public ReadAttribute { public: - ReadThermostatAttributeList() + ReadFanControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadThermostatAttributeList() + ~ReadFanControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + NSLog(@"FanControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AttributeList read Error", error); + LogNSError("FanControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88487,25 +103517,25 @@ class ReadThermostatAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { +class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatAttributeList() + SubscribeAttributeFanControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatAttributeList() + ~SubscribeAttributeFanControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88519,7 +103549,7 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + NSLog(@"FanControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88535,32 +103565,32 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadThermostatFeatureMap : public ReadAttribute { +class ReadFanControlFeatureMap : public ReadAttribute { public: - ReadThermostatFeatureMap() + ReadFanControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadThermostatFeatureMap() + ~ReadFanControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat FeatureMap read Error", error); + LogNSError("FanControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88569,25 +103599,25 @@ class ReadThermostatFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatFeatureMap() + SubscribeAttributeFanControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatFeatureMap() + ~SubscribeAttributeFanControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88601,7 +103631,7 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88617,32 +103647,32 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadThermostatClusterRevision : public ReadAttribute { +class ReadFanControlClusterRevision : public ReadAttribute { public: - ReadThermostatClusterRevision() + ReadFanControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadThermostatClusterRevision() + ~ReadFanControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ClusterRevision read Error", error); + LogNSError("FanControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88651,25 +103681,25 @@ class ReadThermostatClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatClusterRevision() + SubscribeAttributeFanControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatClusterRevision() + ~SubscribeAttributeFanControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88683,7 +103713,7 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88697,24 +103727,14 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | |------------------------------------------------------------------------------| | Commands: | | -| * Step | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * AirflowDirection | 0x000B | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -88725,109 +103745,35 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL -/* - * Command Step - */ -class FanControlStep : public ClusterCommand { -public: - FanControlStep() - : ClusterCommand("step") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Wrap", 0, 1, &mRequest.wrap); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.wrap.HasValue()) { - params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; - } else { - params.wrap = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.lowestOff.HasValue()) { - params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; - } else { - params.lowestOff = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepWithParams: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::FanControl::Commands::Step::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute FanMode + * Attribute TemperatureDisplayMode */ -class ReadFanControlFanMode : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { public: - ReadFanControlFanMode() - : ReadAttribute("fan-mode") + ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : ReadAttribute("temperature-display-mode") { } - ~ReadFanControlFanMode() + ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl FanMode read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88836,36 +103782,36 @@ class ReadFanControlFanMode : public ReadAttribute { } }; -class WriteFanControlFanMode : public WriteAttribute { +class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { public: - WriteFanControlFanMode() - : WriteAttribute("fan-mode") + WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : WriteAttribute("temperature-display-mode") { - AddArgument("attr-name", "fan-mode"); + AddArgument("attr-name", "temperature-display-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteFanControlFanMode() + ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeFanModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("FanControl FanMode write Error", error); + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88877,25 +103823,25 @@ class WriteFanControlFanMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { public: - SubscribeAttributeFanControlFanMode() - : SubscribeAttribute("fan-mode") + SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : SubscribeAttribute("temperature-display-mode") { } - ~SubscribeAttributeFanControlFanMode() + ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88906,10 +103852,10 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFanModeWithParams:params + [cluster subscribeAttributeTemperatureDisplayModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88923,34 +103869,34 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { }; /* - * Attribute FanModeSequence + * Attribute KeypadLockout */ -class ReadFanControlFanModeSequence : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { public: - ReadFanControlFanModeSequence() - : ReadAttribute("fan-mode-sequence") + ReadThermostatUserInterfaceConfigurationKeypadLockout() + : ReadAttribute("keypad-lockout") { } - ~ReadFanControlFanModeSequence() + ~ReadThermostatUserInterfaceConfigurationKeypadLockout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl FanModeSequence read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88959,25 +103905,66 @@ class ReadFanControlFanModeSequence : public ReadAttribute { } }; -class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { +class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { public: - SubscribeAttributeFanControlFanModeSequence() - : SubscribeAttribute("fan-mode-sequence") + WriteThermostatUserInterfaceConfigurationKeypadLockout() + : WriteAttribute("keypad-lockout") { + AddArgument("attr-name", "keypad-lockout"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFanControlFanModeSequence() + ~WriteThermostatUserInterfaceConfigurationKeypadLockout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeKeypadLockoutWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + : SubscribeAttribute("keypad-lockout") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88988,10 +103975,10 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFanModeSequenceWithParams:params + [cluster subscribeAttributeKeypadLockoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89005,34 +103992,34 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { }; /* - * Attribute PercentSetting + * Attribute ScheduleProgrammingVisibility */ -class ReadFanControlPercentSetting : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { public: - ReadFanControlPercentSetting() - : ReadAttribute("percent-setting") + ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : ReadAttribute("schedule-programming-visibility") { } - ~ReadFanControlPercentSetting() + ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl PercentSetting read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89041,39 +104028,36 @@ class ReadFanControlPercentSetting : public ReadAttribute { } }; -class WriteFanControlPercentSetting : public WriteAttribute { +class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { public: - WriteFanControlPercentSetting() - : WriteAttribute("percent-setting") + WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : WriteAttribute("schedule-programming-visibility") { - AddArgument("attr-name", "percent-setting"); + AddArgument("attr-name", "schedule-programming-visibility"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteFanControlPercentSetting() + ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89082,28 +104066,28 @@ class WriteFanControlPercentSetting : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { public: - SubscribeAttributeFanControlPercentSetting() - : SubscribeAttribute("percent-setting") + SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : SubscribeAttribute("schedule-programming-visibility") { } - ~SubscribeAttributeFanControlPercentSetting() + ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89114,10 +104098,10 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePercentSettingWithParams:params + [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89131,34 +104115,34 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { }; /* - * Attribute PercentCurrent + * Attribute GeneratedCommandList */ -class ReadFanControlPercentCurrent : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadFanControlPercentCurrent() - : ReadAttribute("percent-current") + ReadThermostatUserInterfaceConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFanControlPercentCurrent() + ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl PercentCurrent read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89167,25 +104151,25 @@ class ReadFanControlPercentCurrent : public ReadAttribute { } }; -class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFanControlPercentCurrent() - : SubscribeAttribute("percent-current") + SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFanControlPercentCurrent() + ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89196,10 +104180,10 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePercentCurrentWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89213,34 +104197,34 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { }; /* - * Attribute SpeedMax + * Attribute AcceptedCommandList */ -class ReadFanControlSpeedMax : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadFanControlSpeedMax() - : ReadAttribute("speed-max") + ReadThermostatUserInterfaceConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFanControlSpeedMax() + ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl SpeedMax read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89249,25 +104233,25 @@ class ReadFanControlSpeedMax : public ReadAttribute { } }; -class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFanControlSpeedMax() - : SubscribeAttribute("speed-max") + SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFanControlSpeedMax() + ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89278,10 +104262,10 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedMaxWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89294,35 +104278,37 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SpeedSetting + * Attribute EventList */ -class ReadFanControlSpeedSetting : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { public: - ReadFanControlSpeedSetting() - : ReadAttribute("speed-setting") + ReadThermostatUserInterfaceConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadFanControlSpeedSetting() + ~ReadThermostatUserInterfaceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl SpeedSetting read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89331,69 +104317,191 @@ class ReadFanControlSpeedSetting : public ReadAttribute { } }; -class WriteFanControlSpeedSetting : public WriteAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { public: - WriteFanControlSpeedSetting() - : WriteAttribute("speed-setting") + SubscribeAttributeThermostatUserInterfaceConfigurationEventList() + : SubscribeAttribute("event-list") { - AddArgument("attr-name", "speed-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteFanControlSpeedSetting() + ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute AttributeList + */ +class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadThermostatUserInterfaceConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() + : SubscribeAttribute("attribute-list") + { + } -private: - chip::app::DataModel::Nullable mValue; + ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList 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; + } }; -class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { +/* + * Attribute FeatureMap + */ +class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { public: - SubscribeAttributeFanControlSpeedSetting() - : SubscribeAttribute("speed-setting") + ReadThermostatUserInterfaceConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~SubscribeAttributeFanControlSpeedSetting() + ~ReadThermostatUserInterfaceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89404,10 +104512,10 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedSettingWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89421,34 +104529,34 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { }; /* - * Attribute SpeedCurrent + * Attribute ClusterRevision */ -class ReadFanControlSpeedCurrent : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { public: - ReadFanControlSpeedCurrent() - : ReadAttribute("speed-current") + ReadThermostatUserInterfaceConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadFanControlSpeedCurrent() + ~ReadThermostatUserInterfaceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl SpeedCurrent read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89457,25 +104565,25 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { } }; -class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFanControlSpeedCurrent() - : SubscribeAttribute("speed-current") + SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFanControlSpeedCurrent() + ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89486,10 +104594,10 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedCurrentWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89502,654 +104610,1159 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster ColorControl | 0x0300 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command MoveToHue + */ +class ColorControlMoveToHue : public ClusterCommand { +public: + ColorControlMoveToHue() + : ClusterCommand("move-to-hue") + { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueWithParams: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::ColorControl::Commands::MoveToHue::Type mRequest; +}; + +/* + * Command MoveHue + */ +class ColorControlMoveHue : public ClusterCommand { +public: + ColorControlMoveHue() + : ClusterCommand("move-hue") + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveHueWithParams: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::ColorControl::Commands::MoveHue::Type mRequest; +}; + +/* + * Command StepHue + */ +class ColorControlStepHue : public ClusterCommand { +public: + ColorControlStepHue() + : ClusterCommand("step-hue") + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepHueWithParams: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::ColorControl::Commands::StepHue::Type mRequest; +}; + +/* + * Command MoveToSaturation + */ +class ColorControlMoveToSaturation : public ClusterCommand { +public: + ColorControlMoveToSaturation() + : ClusterCommand("move-to-saturation") + { + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToSaturationWithParams: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::ColorControl::Commands::MoveToSaturation::Type mRequest; +}; + /* - * Attribute RockSupport + * Command MoveSaturation */ -class ReadFanControlRockSupport : public ReadAttribute { +class ColorControlMoveSaturation : public ClusterCommand { public: - ReadFanControlRockSupport() - : ReadAttribute("rock-support") - { - } - - ~ReadFanControlRockSupport() + ColorControlMoveSaturation() + : ClusterCommand("move-saturation") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl RockSupport read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveSaturationWithParams: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::ColorControl::Commands::MoveSaturation::Type mRequest; }; -class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { +/* + * Command StepSaturation + */ +class ColorControlStepSaturation : public ClusterCommand { public: - SubscribeAttributeFanControlRockSupport() - : SubscribeAttribute("rock-support") - { - } - - ~SubscribeAttributeFanControlRockSupport() + ColorControlStepSaturation() + : ClusterCommand("step-saturation") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepSaturationWithParams: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); + } + }]; } - [cluster subscribeAttributeRockSupportWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport 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; } + +private: + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Attribute RockSetting + * Command MoveToHueAndSaturation */ -class ReadFanControlRockSetting : public ReadAttribute { +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - ReadFanControlRockSetting() - : ReadAttribute("rock-setting") - { - } - - ~ReadFanControlRockSetting() + ColorControlMoveToHueAndSaturation() + : ClusterCommand("move-to-hue-and-saturation") { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl RockSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueAndSaturationWithParams: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::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; -class WriteFanControlRockSetting : public WriteAttribute { +/* + * Command MoveToColor + */ +class ColorControlMoveToColor : public ClusterCommand { public: - WriteFanControlRockSetting() - : WriteAttribute("rock-setting") - { - AddArgument("attr-name", "rock-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlRockSetting() + ColorControlMoveToColor() + : ClusterCommand("move-to-color") { + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeRockSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; + params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorWithParams: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: - uint8_t mValue; + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; -class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { +/* + * Command MoveColor + */ +class ColorControlMoveColor : public ClusterCommand { public: - SubscribeAttributeFanControlRockSetting() - : SubscribeAttribute("rock-setting") - { - } - - ~SubscribeAttributeFanControlRockSetting() + ColorControlMoveColor() + : ClusterCommand("move-color") { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rateX = [NSNumber numberWithShort:mRequest.rateX]; + params.rateY = [NSNumber numberWithShort:mRequest.rateY]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorWithParams: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); + } + }]; } - [cluster subscribeAttributeRockSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting 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; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Attribute WindSupport + * Command StepColor */ -class ReadFanControlWindSupport : public ReadAttribute { +class ColorControlStepColor : public ClusterCommand { public: - ReadFanControlWindSupport() - : ReadAttribute("wind-support") - { - } - - ~ReadFanControlWindSupport() + ColorControlStepColor() + : ClusterCommand("step-color") { + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl WindSupport read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepX = [NSNumber numberWithShort:mRequest.stepX]; + params.stepY = [NSNumber numberWithShort:mRequest.stepY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorWithParams: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::ColorControl::Commands::StepColor::Type mRequest; }; -class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { +/* + * Command MoveToColorTemperature + */ +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - SubscribeAttributeFanControlWindSupport() - : SubscribeAttribute("wind-support") - { - } - - ~SubscribeAttributeFanControlWindSupport() + ColorControlMoveToColorTemperature() + : ClusterCommand("move-to-color-temperature") { + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorTemperatureWithParams: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); + } + }]; } - [cluster subscribeAttributeWindSupportWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport 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; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Attribute WindSetting + * Command EnhancedMoveToHue */ -class ReadFanControlWindSetting : public ReadAttribute { +class ColorControlEnhancedMoveToHue : public ClusterCommand { public: - ReadFanControlWindSetting() - : ReadAttribute("wind-setting") - { - } - - ~ReadFanControlWindSetting() + ColorControlEnhancedMoveToHue() + : ClusterCommand("enhanced-move-to-hue") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl WindSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueWithParams: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::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; -class WriteFanControlWindSetting : public WriteAttribute { +/* + * Command EnhancedMoveHue + */ +class ColorControlEnhancedMoveHue : public ClusterCommand { public: - WriteFanControlWindSetting() - : WriteAttribute("wind-setting") - { - AddArgument("attr-name", "wind-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlWindSetting() + ColorControlEnhancedMoveHue() + : ClusterCommand("enhanced-move-hue") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeWindSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveHueWithParams: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: - uint8_t mValue; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; -class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { +/* + * Command EnhancedStepHue + */ +class ColorControlEnhancedStepHue : public ClusterCommand { public: - SubscribeAttributeFanControlWindSetting() - : SubscribeAttribute("wind-setting") - { - } - - ~SubscribeAttributeFanControlWindSetting() + ColorControlEnhancedStepHue() + : ClusterCommand("enhanced-step-hue") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedStepHueWithParams: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); + } + }]; } - [cluster subscribeAttributeWindSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting 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; } -}; -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; +}; /* - * Attribute AirflowDirection + * Command EnhancedMoveToHueAndSaturation */ -class ReadFanControlAirflowDirection : public ReadAttribute { +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { public: - ReadFanControlAirflowDirection() - : ReadAttribute("airflow-direction") - { - } - - ~ReadFanControlAirflowDirection() + ColorControlEnhancedMoveToHueAndSaturation() + : ClusterCommand("enhanced-move-to-hue-and-saturation") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl AirflowDirection read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueAndSaturationWithParams: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::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; -class WriteFanControlAirflowDirection : public WriteAttribute { +/* + * Command ColorLoopSet + */ +class ColorControlColorLoopSet : public ClusterCommand { public: - WriteFanControlAirflowDirection() - : WriteAttribute("airflow-direction") - { - AddArgument("attr-name", "airflow-direction"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlAirflowDirection() + ColorControlColorLoopSet() + : ClusterCommand("color-loop-set") { + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeAirflowDirectionWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl AirflowDirection write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; + params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; + params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster colorLoopSetWithParams: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: - uint8_t mValue; + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; -class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { +/* + * Command StopMoveStep + */ +class ColorControlStopMoveStep : public ClusterCommand { public: - SubscribeAttributeFanControlAirflowDirection() - : SubscribeAttribute("airflow-direction") - { - } - - ~SubscribeAttributeFanControlAirflowDirection() + ColorControlStopMoveStep() + : ClusterCommand("stop-move-step") { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMoveStepWithParams: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); + } + }]; } - [cluster subscribeAttributeAirflowDirectionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection 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 +private: + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; +}; /* - * Attribute GeneratedCommandList + * Command MoveColorTemperature */ -class ReadFanControlGeneratedCommandList : public ReadAttribute { +class ColorControlMoveColorTemperature : public ClusterCommand { public: - ReadFanControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadFanControlGeneratedCommandList() + ColorControlMoveColorTemperature() + : ClusterCommand("move-color-temperature") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorTemperatureWithParams: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::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; -class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { +/* + * Command StepColorTemperature + */ +class ColorControlStepColorTemperature : public ClusterCommand { public: - SubscribeAttributeFanControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeFanControlGeneratedCommandList() + ColorControlStepColorTemperature() + : ClusterCommand("step-color-temperature") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::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); - __auto_type * cluster = [[MTRBaseClusterFanControl 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 subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + 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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorTemperatureWithParams: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::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Attribute CurrentHue */ -class ReadFanControlAcceptedCommandList : public ReadAttribute { +class ReadColorControlCurrentHue : public ReadAttribute { public: - ReadFanControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlCurrentHue() + : ReadAttribute("current-hue") { } - ~ReadFanControlAcceptedCommandList() + ~ReadColorControlCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl AcceptedCommandList read Error", error); + LogNSError("ColorControl CurrentHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90158,25 +105771,25 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeFanControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlCurrentHue() + : SubscribeAttribute("current-hue") { } - ~SubscribeAttributeFanControlAcceptedCommandList() + ~SubscribeAttributeColorControlCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90187,10 +105800,10 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90203,37 +105816,35 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CurrentSaturation */ -class ReadFanControlEventList : public ReadAttribute { +class ReadColorControlCurrentSaturation : public ReadAttribute { public: - ReadFanControlEventList() - : ReadAttribute("event-list") + ReadColorControlCurrentSaturation() + : ReadAttribute("current-saturation") { } - ~ReadFanControlEventList() + ~ReadColorControlCurrentSaturation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl EventList read Error", error); + LogNSError("ColorControl CurrentSaturation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90242,25 +105853,25 @@ class ReadFanControlEventList : public ReadAttribute { } }; -class SubscribeAttributeFanControlEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { public: - SubscribeAttributeFanControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlCurrentSaturation() + : SubscribeAttribute("current-saturation") { } - ~SubscribeAttributeFanControlEventList() + ~SubscribeAttributeColorControlCurrentSaturation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90271,10 +105882,10 @@ class SubscribeAttributeFanControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentSaturationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90287,37 +105898,35 @@ class SubscribeAttributeFanControlEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute RemainingTime */ -class ReadFanControlAttributeList : public ReadAttribute { +class ReadColorControlRemainingTime : public ReadAttribute { public: - ReadFanControlAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlRemainingTime() + : ReadAttribute("remaining-time") { } - ~ReadFanControlAttributeList() + ~ReadColorControlRemainingTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl AttributeList read Error", error); + LogNSError("ColorControl RemainingTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90326,25 +105935,25 @@ class ReadFanControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { public: - SubscribeAttributeFanControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlRemainingTime() + : SubscribeAttribute("remaining-time") { } - ~SubscribeAttributeFanControlAttributeList() + ~SubscribeAttributeColorControlRemainingTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90355,10 +105964,10 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90372,34 +105981,34 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute CurrentX */ -class ReadFanControlFeatureMap : public ReadAttribute { +class ReadColorControlCurrentX : public ReadAttribute { public: - ReadFanControlFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlCurrentX() + : ReadAttribute("current-x") { } - ~ReadFanControlFeatureMap() + ~ReadColorControlCurrentX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl FeatureMap read Error", error); + LogNSError("ColorControl CurrentX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90408,25 +106017,25 @@ class ReadFanControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { public: - SubscribeAttributeFanControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlCurrentX() + : SubscribeAttribute("current-x") { } - ~SubscribeAttributeFanControlFeatureMap() + ~SubscribeAttributeColorControlCurrentX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90437,10 +106046,10 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90454,34 +106063,34 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute CurrentY */ -class ReadFanControlClusterRevision : public ReadAttribute { +class ReadColorControlCurrentY : public ReadAttribute { public: - ReadFanControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlCurrentY() + : ReadAttribute("current-y") { } - ~ReadFanControlClusterRevision() + ~ReadColorControlCurrentY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FanControl ClusterRevision read Error", error); + LogNSError("ColorControl CurrentY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90490,25 +106099,25 @@ class ReadFanControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { public: - SubscribeAttributeFanControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlCurrentY() + : SubscribeAttribute("current-y") { } - ~SubscribeAttributeFanControlClusterRevision() + ~SubscribeAttributeColorControlCurrentY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::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); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90519,10 +106128,10 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90535,122 +106144,62 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute TemperatureDisplayMode + * Attribute DriftCompensation */ -class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { +class ReadColorControlDriftCompensation : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : ReadAttribute("temperature-display-mode") + ReadColorControlDriftCompensation() + : ReadAttribute("drift-compensation") { } - ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() + ~ReadColorControlDriftCompensation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : WriteAttribute("temperature-display-mode") - { - AddArgument("attr-name", "temperature-display-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", error); + LogNSError("ColorControl DriftCompensation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { +class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : SubscribeAttribute("temperature-display-mode") + SubscribeAttributeColorControlDriftCompensation() + : SubscribeAttribute("drift-compensation") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() + ~SubscribeAttributeColorControlDriftCompensation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90661,10 +106210,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureDisplayModeWithParams:params + [cluster subscribeAttributeDriftCompensationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90678,102 +106227,61 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo }; /* - * Attribute KeypadLockout + * Attribute CompensationText */ -class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { +class ReadColorControlCompensationText : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationKeypadLockout() - : ReadAttribute("keypad-lockout") + ReadColorControlCompensationText() + : ReadAttribute("compensation-text") { } - ~ReadThermostatUserInterfaceConfigurationKeypadLockout() + ~ReadColorControlCompensationText() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationKeypadLockout() - : WriteAttribute("keypad-lockout") - { - AddArgument("attr-name", "keypad-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationKeypadLockout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeKeypadLockoutWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + LogNSError("ColorControl CompensationText read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { +class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() - : SubscribeAttribute("keypad-lockout") + SubscribeAttributeColorControlCompensationText() + : SubscribeAttribute("compensation-text") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + ~SubscribeAttributeColorControlCompensationText() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90784,10 +106292,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeKeypadLockoutWithParams:params + [cluster subscribeAttributeCompensationTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90801,102 +106309,61 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ }; /* - * Attribute ScheduleProgrammingVisibility + * Attribute ColorTemperatureMireds */ -class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { +class ReadColorControlColorTemperatureMireds : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : ReadAttribute("schedule-programming-visibility") + ReadColorControlColorTemperatureMireds() + : ReadAttribute("color-temperature-mireds") { } - ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + ~ReadColorControlColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : WriteAttribute("schedule-programming-visibility") - { - AddArgument("attr-name", "schedule-programming-visibility"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility write Error", error); + LogNSError("ColorControl ColorTemperatureMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : SubscribeAttribute("schedule-programming-visibility") + SubscribeAttributeColorControlColorTemperatureMireds() + : SubscribeAttribute("color-temperature-mireds") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + ~SubscribeAttributeColorControlColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90907,10 +106374,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params + [cluster subscribeAttributeColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90924,34 +106391,34 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV }; /* - * Attribute GeneratedCommandList + * Attribute ColorMode */ -class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { +class ReadColorControlColorMode : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlColorMode() + : ReadAttribute("color-mode") { } - ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() + ~ReadColorControlColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); + LogNSError("ColorControl ColorMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90960,25 +106427,25 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlColorMode() + : SubscribeAttribute("color-mode") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() + ~SubscribeAttributeColorControlColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90989,10 +106456,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91006,34 +106473,34 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList }; /* - * Attribute AcceptedCommandList + * Attribute Options */ -class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { +class ReadColorControlOptions : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlOptions() + : ReadAttribute("options") { } - ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() + ~ReadColorControlOptions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); + LogNSError("ColorControl Options read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91042,25 +106509,66 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { +class WriteColorControlOptions : public WriteAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteColorControlOptions() + : WriteAttribute("options") { + AddArgument("attr-name", "options"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() + ~WriteColorControlOptions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOptionsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlOptions : public SubscribeAttribute { +public: + SubscribeAttributeColorControlOptions() + : SubscribeAttribute("options") + { + } + + ~SubscribeAttributeColorControlOptions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91071,10 +106579,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91087,37 +106595,35 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute NumberOfPrimaries */ -class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { +class ReadColorControlNumberOfPrimaries : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationEventList() - : ReadAttribute("event-list") + ReadColorControlNumberOfPrimaries() + : ReadAttribute("number-of-primaries") { } - ~ReadThermostatUserInterfaceConfigurationEventList() + ~ReadColorControlNumberOfPrimaries() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); + LogNSError("ColorControl NumberOfPrimaries read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91126,25 +106632,25 @@ class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlNumberOfPrimaries() + : SubscribeAttribute("number-of-primaries") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() + ~SubscribeAttributeColorControlNumberOfPrimaries() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91155,10 +106661,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeNumberOfPrimariesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91171,37 +106677,35 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public S } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Primary1X */ -class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { +class ReadColorControlPrimary1X : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlPrimary1X() + : ReadAttribute("primary1x") { } - ~ReadThermostatUserInterfaceConfigurationAttributeList() + ~ReadColorControlPrimary1X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); + LogNSError("ColorControl Primary1X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91210,25 +106714,25 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlPrimary1X() + : SubscribeAttribute("primary1x") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() + ~SubscribeAttributeColorControlPrimary1X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91239,10 +106743,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePrimary1XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91256,34 +106760,34 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ }; /* - * Attribute FeatureMap + * Attribute Primary1Y */ -class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { +class ReadColorControlPrimary1Y : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary1Y() + : ReadAttribute("primary1y") { } - ~ReadThermostatUserInterfaceConfigurationFeatureMap() + ~ReadColorControlPrimary1Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + LogNSError("ColorControl Primary1Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91292,25 +106796,25 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary1Y() + : SubscribeAttribute("primary1y") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() + ~SubscribeAttributeColorControlPrimary1Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91321,10 +106825,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary1YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91338,34 +106842,34 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public }; /* - * Attribute ClusterRevision + * Attribute Primary1Intensity */ -class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { +class ReadColorControlPrimary1Intensity : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlPrimary1Intensity() + : ReadAttribute("primary1intensity") { } - ~ReadThermostatUserInterfaceConfigurationClusterRevision() + ~ReadColorControlPrimary1Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); + LogNSError("ColorControl Primary1Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91374,25 +106878,25 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlPrimary1Intensity() + : SubscribeAttribute("primary1intensity") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() + ~SubscribeAttributeColorControlPrimary1Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::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); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91403,10 +106907,10 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePrimary1IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91414,1164 +106918,696 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu } SetCommandExitStatus(error); }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command MoveToHue - */ -class ColorControlMoveToHue : public ClusterCommand { -public: - ColorControlMoveToHue() - : ClusterCommand("move-to-hue") - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueWithParams: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::ColorControl::Commands::MoveToHue::Type mRequest; -}; - -/* - * Command MoveHue - */ -class ColorControlMoveHue : public ClusterCommand { -public: - ColorControlMoveHue() - : ClusterCommand("move-hue") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveHueWithParams: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::ColorControl::Commands::MoveHue::Type mRequest; -}; - -/* - * Command StepHue - */ -class ColorControlStepHue : public ClusterCommand { -public: - ColorControlStepHue() - : ClusterCommand("step-hue") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepHueWithParams: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::ColorControl::Commands::StepHue::Type mRequest; }; /* - * Command MoveToSaturation + * Attribute Primary2X */ -class ColorControlMoveToSaturation : public ClusterCommand { +class ReadColorControlPrimary2X : public ReadAttribute { public: - ColorControlMoveToSaturation() - : ClusterCommand("move-to-saturation") + ReadColorControlPrimary2X() + : ReadAttribute("primary2x") + { + } + + ~ReadColorControlPrimary2X() { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToSaturationWithParams: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); - } - }]; - } + [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary2X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; -/* - * Command MoveSaturation - */ -class ColorControlMoveSaturation : public ClusterCommand { +class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { public: - ColorControlMoveSaturation() - : ClusterCommand("move-saturation") + SubscribeAttributeColorControlPrimary2X() + : SubscribeAttribute("primary2x") + { + } + + ~SubscribeAttributeColorControlPrimary2X() { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveSaturationWithParams: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); - } - }]; + __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 subscribeAttributePrimary2XWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X 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; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; /* - * Command StepSaturation + * Attribute Primary2Y */ -class ColorControlStepSaturation : public ClusterCommand { +class ReadColorControlPrimary2Y : public ReadAttribute { public: - ColorControlStepSaturation() - : ClusterCommand("step-saturation") + ReadColorControlPrimary2Y() + : ReadAttribute("primary2y") + { + } + + ~ReadColorControlPrimary2Y() { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepSaturationWithParams: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); - } - }]; - } + [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary2Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; -/* - * Command MoveToHueAndSaturation - */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand { +class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { public: - ColorControlMoveToHueAndSaturation() - : ClusterCommand("move-to-hue-and-saturation") + SubscribeAttributeColorControlPrimary2Y() + : SubscribeAttribute("primary2y") + { + } + + ~SubscribeAttributeColorControlPrimary2Y() { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueAndSaturationWithParams: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); - } - }]; + __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 subscribeAttributePrimary2YWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y 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; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; /* - * Command MoveToColor + * Attribute Primary2Intensity */ -class ColorControlMoveToColor : public ClusterCommand { +class ReadColorControlPrimary2Intensity : public ReadAttribute { public: - ColorControlMoveToColor() - : ClusterCommand("move-to-color") + ReadColorControlPrimary2Intensity() + : ReadAttribute("primary2intensity") + { + } + + ~ReadColorControlPrimary2Intensity() { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; - params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorWithParams: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); - } - }]; - } + [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary2Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; -/* - * Command MoveColor - */ -class ColorControlMoveColor : public ClusterCommand { +class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { public: - ColorControlMoveColor() - : ClusterCommand("move-color") + SubscribeAttributeColorControlPrimary2Intensity() + : SubscribeAttribute("primary2intensity") + { + } + + ~SubscribeAttributeColorControlPrimary2Intensity() { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rateX = [NSNumber numberWithShort:mRequest.rateX]; - params.rateY = [NSNumber numberWithShort:mRequest.rateY]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorWithParams: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); - } - }]; + __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 subscribeAttributePrimary2IntensityWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Intensity 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; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Command StepColor + * Attribute Primary3X */ -class ColorControlStepColor : public ClusterCommand { +class ReadColorControlPrimary3X : public ReadAttribute { public: - ColorControlStepColor() - : ClusterCommand("step-color") + ReadColorControlPrimary3X() + : ReadAttribute("primary3x") + { + } + + ~ReadColorControlPrimary3X() { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepX = [NSNumber numberWithShort:mRequest.stepX]; - params.stepY = [NSNumber numberWithShort:mRequest.stepY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorWithParams: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); - } - }]; - } + [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary3X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; -/* - * Command MoveToColorTemperature - */ -class ColorControlMoveToColorTemperature : public ClusterCommand { +class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { public: - ColorControlMoveToColorTemperature() - : ClusterCommand("move-to-color-temperature") + SubscribeAttributeColorControlPrimary3X() + : SubscribeAttribute("primary3x") + { + } + + ~SubscribeAttributeColorControlPrimary3X() { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorTemperatureWithParams: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); - } - }]; + __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 subscribeAttributePrimary3XWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X 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; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Command EnhancedMoveToHue + * Attribute Primary3Y */ -class ColorControlEnhancedMoveToHue : public ClusterCommand { +class ReadColorControlPrimary3Y : public ReadAttribute { public: - ColorControlEnhancedMoveToHue() - : ClusterCommand("enhanced-move-to-hue") + ReadColorControlPrimary3Y() + : ReadAttribute("primary3y") + { + } + + ~ReadColorControlPrimary3Y() { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueWithParams: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); - } - }]; - } + [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary3Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; -/* - * Command EnhancedMoveHue - */ -class ColorControlEnhancedMoveHue : public ClusterCommand { +class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { public: - ColorControlEnhancedMoveHue() - : ClusterCommand("enhanced-move-hue") + SubscribeAttributeColorControlPrimary3Y() + : SubscribeAttribute("primary3y") + { + } + + ~SubscribeAttributeColorControlPrimary3Y() { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveHueWithParams: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); - } - }]; + __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 subscribeAttributePrimary3YWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Y 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; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; /* - * Command EnhancedStepHue + * Attribute Primary3Intensity */ -class ColorControlEnhancedStepHue : public ClusterCommand { +class ReadColorControlPrimary3Intensity : public ReadAttribute { public: - ColorControlEnhancedStepHue() - : ClusterCommand("enhanced-step-hue") + ReadColorControlPrimary3Intensity() + : ReadAttribute("primary3intensity") + { + } + + ~ReadColorControlPrimary3Intensity() { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedStepHueWithParams: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); - } - }]; - } + [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary3Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; -/* - * Command EnhancedMoveToHueAndSaturation - */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { +class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { public: - ColorControlEnhancedMoveToHueAndSaturation() - : ClusterCommand("enhanced-move-to-hue-and-saturation") + SubscribeAttributeColorControlPrimary3Intensity() + : SubscribeAttribute("primary3intensity") + { + } + + ~SubscribeAttributeColorControlPrimary3Intensity() { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueAndSaturationWithParams: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); - } - }]; + __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 subscribeAttributePrimary3IntensityWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity 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; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; /* - * Command ColorLoopSet + * Attribute Primary4X */ -class ColorControlColorLoopSet : public ClusterCommand { +class ReadColorControlPrimary4X : public ReadAttribute { public: - ColorControlColorLoopSet() - : ClusterCommand("color-loop-set") + ReadColorControlPrimary4X() + : ReadAttribute("primary4x") + { + } + + ~ReadColorControlPrimary4X() { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; - params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; - params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster colorLoopSetWithParams: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); - } - }]; - } + [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary4X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; -/* - * Command StopMoveStep - */ -class ColorControlStopMoveStep : public ClusterCommand { +class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { public: - ColorControlStopMoveStep() - : ClusterCommand("stop-move-step") + SubscribeAttributeColorControlPrimary4X() + : SubscribeAttribute("primary4x") + { + } + + ~SubscribeAttributeColorControlPrimary4X() { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMoveStepWithParams: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); - } - }]; + __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 subscribeAttributePrimary4XWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X 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; } - -private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; /* - * Command MoveColorTemperature + * Attribute Primary4Y */ -class ColorControlMoveColorTemperature : public ClusterCommand { +class ReadColorControlPrimary4Y : public ReadAttribute { public: - ColorControlMoveColorTemperature() - : ClusterCommand("move-color-temperature") + ReadColorControlPrimary4Y() + : ReadAttribute("primary4y") + { + } + + ~ReadColorControlPrimary4Y() { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorTemperatureWithParams: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); - } - }]; - } + [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl Primary4Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; -/* - * Command StepColorTemperature - */ -class ColorControlStepColorTemperature : public ClusterCommand { +class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { public: - ColorControlStepColorTemperature() - : ClusterCommand("step-color-temperature") + SubscribeAttributeColorControlPrimary4Y() + : SubscribeAttribute("primary4y") + { + } + + ~SubscribeAttributeColorControlPrimary4Y() { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorTemperatureWithParams: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); - } - }]; + __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 subscribeAttributePrimary4YWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y 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; } - -private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /* - * Attribute CurrentHue + * Attribute Primary4Intensity */ -class ReadColorControlCurrentHue : public ReadAttribute { +class ReadColorControlPrimary4Intensity : public ReadAttribute { public: - ReadColorControlCurrentHue() - : ReadAttribute("current-hue") + ReadColorControlPrimary4Intensity() + : ReadAttribute("primary4intensity") { } - ~ReadColorControlCurrentHue() + ~ReadColorControlPrimary4Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); + [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CurrentHue read Error", error); + LogNSError("ColorControl Primary4Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92580,21 +107616,21 @@ class ReadColorControlCurrentHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { public: - SubscribeAttributeColorControlCurrentHue() - : SubscribeAttribute("current-hue") + SubscribeAttributeColorControlPrimary4Intensity() + : SubscribeAttribute("primary4intensity") { } - ~SubscribeAttributeColorControlCurrentHue() + ~SubscribeAttributeColorControlPrimary4Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::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); @@ -92609,10 +107645,10 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHueWithParams:params + [cluster subscribeAttributePrimary4IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92626,34 +107662,34 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { }; /* - * Attribute CurrentSaturation + * Attribute Primary5X */ -class ReadColorControlCurrentSaturation : public ReadAttribute { +class ReadColorControlPrimary5X : public ReadAttribute { public: - ReadColorControlCurrentSaturation() - : ReadAttribute("current-saturation") + ReadColorControlPrimary5X() + : ReadAttribute("primary5x") { } - ~ReadColorControlCurrentSaturation() + ~ReadColorControlPrimary5X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CurrentSaturation read Error", error); + LogNSError("ColorControl Primary5X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92662,21 +107698,21 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { public: - SubscribeAttributeColorControlCurrentSaturation() - : SubscribeAttribute("current-saturation") + SubscribeAttributeColorControlPrimary5X() + : SubscribeAttribute("primary5x") { } - ~SubscribeAttributeColorControlCurrentSaturation() + ~SubscribeAttributeColorControlPrimary5X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::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); @@ -92691,10 +107727,10 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentSaturationWithParams:params + [cluster subscribeAttributePrimary5XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92708,34 +107744,34 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut }; /* - * Attribute RemainingTime + * Attribute Primary5Y */ -class ReadColorControlRemainingTime : public ReadAttribute { +class ReadColorControlPrimary5Y : public ReadAttribute { public: - ReadColorControlRemainingTime() - : ReadAttribute("remaining-time") + ReadColorControlPrimary5Y() + : ReadAttribute("primary5y") { } - ~ReadColorControlRemainingTime() + ~ReadColorControlPrimary5Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); + [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl RemainingTime read Error", error); + LogNSError("ColorControl Primary5Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92744,21 +107780,21 @@ class ReadColorControlRemainingTime : public ReadAttribute { } }; -class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { public: - SubscribeAttributeColorControlRemainingTime() - : SubscribeAttribute("remaining-time") + SubscribeAttributeColorControlPrimary5Y() + : SubscribeAttribute("primary5y") { } - ~SubscribeAttributeColorControlRemainingTime() + ~SubscribeAttributeColorControlPrimary5Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::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); @@ -92773,10 +107809,10 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingTimeWithParams:params + [cluster subscribeAttributePrimary5YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); + NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92790,34 +107826,34 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { }; /* - * Attribute CurrentX + * Attribute Primary5Intensity */ -class ReadColorControlCurrentX : public ReadAttribute { +class ReadColorControlPrimary5Intensity : public ReadAttribute { public: - ReadColorControlCurrentX() - : ReadAttribute("current-x") + ReadColorControlPrimary5Intensity() + : ReadAttribute("primary5intensity") { } - ~ReadColorControlCurrentX() + ~ReadColorControlPrimary5Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); + [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CurrentX read Error", error); + LogNSError("ColorControl Primary5Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92826,21 +107862,21 @@ class ReadColorControlCurrentX : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { public: - SubscribeAttributeColorControlCurrentX() - : SubscribeAttribute("current-x") + SubscribeAttributeColorControlPrimary5Intensity() + : SubscribeAttribute("primary5intensity") { } - ~SubscribeAttributeColorControlCurrentX() + ~SubscribeAttributeColorControlPrimary5Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::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); @@ -92855,10 +107891,10 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentXWithParams:params + [cluster subscribeAttributePrimary5IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92872,34 +107908,34 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { }; /* - * Attribute CurrentY + * Attribute Primary6X */ -class ReadColorControlCurrentY : public ReadAttribute { +class ReadColorControlPrimary6X : public ReadAttribute { public: - ReadColorControlCurrentY() - : ReadAttribute("current-y") + ReadColorControlPrimary6X() + : ReadAttribute("primary6x") { } - ~ReadColorControlCurrentY() + ~ReadColorControlPrimary6X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); + [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CurrentY read Error", error); + LogNSError("ColorControl Primary6X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92908,21 +107944,21 @@ class ReadColorControlCurrentY : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { public: - SubscribeAttributeColorControlCurrentY() - : SubscribeAttribute("current-y") + SubscribeAttributeColorControlPrimary6X() + : SubscribeAttribute("primary6x") { } - ~SubscribeAttributeColorControlCurrentY() + ~SubscribeAttributeColorControlPrimary6X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::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); @@ -92937,10 +107973,10 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentYWithParams:params + [cluster subscribeAttributePrimary6XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); + NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92954,34 +107990,34 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { }; /* - * Attribute DriftCompensation + * Attribute Primary6Y */ -class ReadColorControlDriftCompensation : public ReadAttribute { +class ReadColorControlPrimary6Y : public ReadAttribute { public: - ReadColorControlDriftCompensation() - : ReadAttribute("drift-compensation") + ReadColorControlPrimary6Y() + : ReadAttribute("primary6y") { } - ~ReadColorControlDriftCompensation() + ~ReadColorControlPrimary6Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl DriftCompensation read Error", error); + LogNSError("ColorControl Primary6Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92990,21 +108026,21 @@ class ReadColorControlDriftCompensation : public ReadAttribute { } }; -class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { public: - SubscribeAttributeColorControlDriftCompensation() - : SubscribeAttribute("drift-compensation") + SubscribeAttributeColorControlPrimary6Y() + : SubscribeAttribute("primary6y") { } - ~SubscribeAttributeColorControlDriftCompensation() + ~SubscribeAttributeColorControlPrimary6Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::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); @@ -93019,10 +108055,10 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDriftCompensationWithParams:params + [cluster subscribeAttributePrimary6YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93036,34 +108072,34 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut }; /* - * Attribute CompensationText + * Attribute Primary6Intensity */ -class ReadColorControlCompensationText : public ReadAttribute { +class ReadColorControlPrimary6Intensity : public ReadAttribute { public: - ReadColorControlCompensationText() - : ReadAttribute("compensation-text") + ReadColorControlPrimary6Intensity() + : ReadAttribute("primary6intensity") { } - ~ReadColorControlCompensationText() + ~ReadColorControlPrimary6Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); + [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CompensationText read Error", error); + LogNSError("ColorControl Primary6Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93072,21 +108108,21 @@ class ReadColorControlCompensationText : public ReadAttribute { } }; -class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { public: - SubscribeAttributeColorControlCompensationText() - : SubscribeAttribute("compensation-text") + SubscribeAttributeColorControlPrimary6Intensity() + : SubscribeAttribute("primary6intensity") { } - ~SubscribeAttributeColorControlCompensationText() + ~SubscribeAttributeColorControlPrimary6Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::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); @@ -93101,10 +108137,10 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCompensationTextWithParams:params + [cluster subscribeAttributePrimary6IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93118,34 +108154,34 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute }; /* - * Attribute ColorTemperatureMireds + * Attribute WhitePointX */ -class ReadColorControlColorTemperatureMireds : public ReadAttribute { +class ReadColorControlWhitePointX : public ReadAttribute { public: - ReadColorControlColorTemperatureMireds() - : ReadAttribute("color-temperature-mireds") + ReadColorControlWhitePointX() + : ReadAttribute("white-point-x") { } - ~ReadColorControlColorTemperatureMireds() + ~ReadColorControlWhitePointX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorTemperatureMireds read Error", error); + LogNSError("ColorControl WhitePointX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93154,21 +108190,62 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { +class WriteColorControlWhitePointX : public WriteAttribute { public: - SubscribeAttributeColorControlColorTemperatureMireds() - : SubscribeAttribute("color-temperature-mireds") + WriteColorControlWhitePointX() + : WriteAttribute("white-point-x") { + AddArgument("attr-name", "white-point-x"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorTemperatureMireds() + ~WriteColorControlWhitePointX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointX() + : SubscribeAttribute("white-point-x") + { + } + + ~SubscribeAttributeColorControlWhitePointX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::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); @@ -93183,10 +108260,10 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTemperatureMiredsWithParams:params + [cluster subscribeAttributeWhitePointXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93200,34 +108277,34 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt }; /* - * Attribute ColorMode + * Attribute WhitePointY */ -class ReadColorControlColorMode : public ReadAttribute { +class ReadColorControlWhitePointY : public ReadAttribute { public: - ReadColorControlColorMode() - : ReadAttribute("color-mode") + ReadColorControlWhitePointY() + : ReadAttribute("white-point-y") { } - ~ReadColorControlColorMode() + ~ReadColorControlWhitePointY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorMode read Error", error); + LogNSError("ColorControl WhitePointY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93236,21 +108313,62 @@ class ReadColorControlColorMode : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { +class WriteColorControlWhitePointY : public WriteAttribute { public: - SubscribeAttributeColorControlColorMode() - : SubscribeAttribute("color-mode") + WriteColorControlWhitePointY() + : WriteAttribute("white-point-y") { + AddArgument("attr-name", "white-point-y"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorMode() + ~WriteColorControlWhitePointY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointY() + : SubscribeAttribute("white-point-y") + { + } + + ~SubscribeAttributeColorControlWhitePointY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::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); @@ -93265,10 +108383,10 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorModeWithParams:params + [cluster subscribeAttributeWhitePointYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); + NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93282,34 +108400,34 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { }; /* - * Attribute Options + * Attribute ColorPointRX */ -class ReadColorControlOptions : public ReadAttribute { +class ReadColorControlColorPointRX : public ReadAttribute { public: - ReadColorControlOptions() - : ReadAttribute("options") + ReadColorControlColorPointRX() + : ReadAttribute("color-point-rx") { } - ~ReadColorControlOptions() + ~ReadColorControlColorPointRX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Options read Error", error); + LogNSError("ColorControl ColorPointRX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93318,24 +108436,24 @@ class ReadColorControlOptions : public ReadAttribute { } }; -class WriteColorControlOptions : public WriteAttribute { +class WriteColorControlColorPointRX : public WriteAttribute { public: - WriteColorControlOptions() - : WriteAttribute("options") + WriteColorControlColorPointRX() + : WriteAttribute("color-point-rx") { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "color-point-rx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlOptions() + ~WriteColorControlColorPointRX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -93343,11 +108461,11 @@ class WriteColorControlOptions : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeOptionsWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeColorPointRXWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl Options write Error", error); + LogNSError("ColorControl ColorPointRX write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93356,24 +108474,24 @@ class WriteColorControlOptions : public WriteAttribute { } private: - uint8_t mValue; + uint16_t mValue; }; -class SubscribeAttributeColorControlOptions : public SubscribeAttribute { +class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { public: - SubscribeAttributeColorControlOptions() - : SubscribeAttribute("options") + SubscribeAttributeColorControlColorPointRX() + : SubscribeAttribute("color-point-rx") { } - ~SubscribeAttributeColorControlOptions() + ~SubscribeAttributeColorControlColorPointRX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::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); @@ -93388,10 +108506,10 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOptionsWithParams:params + [cluster subscribeAttributeColorPointRXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93405,34 +108523,34 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { }; /* - * Attribute NumberOfPrimaries + * Attribute ColorPointRY */ -class ReadColorControlNumberOfPrimaries : public ReadAttribute { +class ReadColorControlColorPointRY : public ReadAttribute { public: - ReadColorControlNumberOfPrimaries() - : ReadAttribute("number-of-primaries") + ReadColorControlColorPointRY() + : ReadAttribute("color-point-ry") { } - ~ReadColorControlNumberOfPrimaries() + ~ReadColorControlColorPointRY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl NumberOfPrimaries read Error", error); + LogNSError("ColorControl ColorPointRY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93441,21 +108559,62 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { } }; -class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { +class WriteColorControlColorPointRY : public WriteAttribute { public: - SubscribeAttributeColorControlNumberOfPrimaries() - : SubscribeAttribute("number-of-primaries") + WriteColorControlColorPointRY() + : WriteAttribute("color-point-ry") { + AddArgument("attr-name", "color-point-ry"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlNumberOfPrimaries() + ~WriteColorControlColorPointRY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRY() + : SubscribeAttribute("color-point-ry") + { + } + + ~SubscribeAttributeColorControlColorPointRY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::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); @@ -93470,10 +108629,10 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPrimariesWithParams:params + [cluster subscribeAttributeColorPointRYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93487,34 +108646,34 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut }; /* - * Attribute Primary1X + * Attribute ColorPointRIntensity */ -class ReadColorControlPrimary1X : public ReadAttribute { +class ReadColorControlColorPointRIntensity : public ReadAttribute { public: - ReadColorControlPrimary1X() - : ReadAttribute("primary1x") + ReadColorControlColorPointRIntensity() + : ReadAttribute("color-point-rintensity") { } - ~ReadColorControlPrimary1X() + ~ReadColorControlColorPointRIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary1X read Error", error); + LogNSError("ColorControl ColorPointRIntensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93523,21 +108682,65 @@ class ReadColorControlPrimary1X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { +class WriteColorControlColorPointRIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary1X() - : SubscribeAttribute("primary1x") + WriteColorControlColorPointRIntensity() + : WriteAttribute("color-point-rintensity") { + AddArgument("attr-name", "color-point-rintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary1X() + ~WriteColorControlColorPointRIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRIntensity() + : SubscribeAttribute("color-point-rintensity") + { + } + + ~SubscribeAttributeColorControlColorPointRIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::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); @@ -93552,10 +108755,10 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1XWithParams:params + [cluster subscribeAttributeColorPointRIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93569,34 +108772,34 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { }; /* - * Attribute Primary1Y + * Attribute ColorPointGX */ -class ReadColorControlPrimary1Y : public ReadAttribute { +class ReadColorControlColorPointGX : public ReadAttribute { public: - ReadColorControlPrimary1Y() - : ReadAttribute("primary1y") + ReadColorControlColorPointGX() + : ReadAttribute("color-point-gx") { } - ~ReadColorControlPrimary1Y() + ~ReadColorControlColorPointGX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary1Y read Error", error); + LogNSError("ColorControl ColorPointGX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93605,21 +108808,62 @@ class ReadColorControlPrimary1Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { +class WriteColorControlColorPointGX : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary1Y() - : SubscribeAttribute("primary1y") + WriteColorControlColorPointGX() + : WriteAttribute("color-point-gx") { + AddArgument("attr-name", "color-point-gx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary1Y() + ~WriteColorControlColorPointGX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGX() + : SubscribeAttribute("color-point-gx") + { + } + + ~SubscribeAttributeColorControlColorPointGX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::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); @@ -93634,10 +108878,10 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1YWithParams:params + [cluster subscribeAttributeColorPointGXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93651,34 +108895,34 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { }; /* - * Attribute Primary1Intensity + * Attribute ColorPointGY */ -class ReadColorControlPrimary1Intensity : public ReadAttribute { +class ReadColorControlColorPointGY : public ReadAttribute { public: - ReadColorControlPrimary1Intensity() - : ReadAttribute("primary1intensity") + ReadColorControlColorPointGY() + : ReadAttribute("color-point-gy") { } - ~ReadColorControlPrimary1Intensity() + ~ReadColorControlColorPointGY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary1Intensity read Error", error); + LogNSError("ColorControl ColorPointGY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93687,21 +108931,62 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { +class WriteColorControlColorPointGY : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary1Intensity() - : SubscribeAttribute("primary1intensity") + WriteColorControlColorPointGY() + : WriteAttribute("color-point-gy") { + AddArgument("attr-name", "color-point-gy"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary1Intensity() + ~WriteColorControlColorPointGY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGY() + : SubscribeAttribute("color-point-gy") + { + } + + ~SubscribeAttributeColorControlColorPointGY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::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); @@ -93716,10 +109001,10 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1IntensityWithParams:params + [cluster subscribeAttributeColorPointGYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93733,34 +109018,34 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut }; /* - * Attribute Primary2X + * Attribute ColorPointGIntensity */ -class ReadColorControlPrimary2X : public ReadAttribute { +class ReadColorControlColorPointGIntensity : public ReadAttribute { public: - ReadColorControlPrimary2X() - : ReadAttribute("primary2x") + ReadColorControlColorPointGIntensity() + : ReadAttribute("color-point-gintensity") { } - ~ReadColorControlPrimary2X() + ~ReadColorControlColorPointGIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary2X read Error", error); + LogNSError("ColorControl ColorPointGIntensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93769,21 +109054,65 @@ class ReadColorControlPrimary2X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { +class WriteColorControlColorPointGIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary2X() - : SubscribeAttribute("primary2x") + WriteColorControlColorPointGIntensity() + : WriteAttribute("color-point-gintensity") { + AddArgument("attr-name", "color-point-gintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary2X() + ~WriteColorControlColorPointGIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGIntensity() + : SubscribeAttribute("color-point-gintensity") + { + } + + ~SubscribeAttributeColorControlColorPointGIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::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); @@ -93798,10 +109127,10 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2XWithParams:params + [cluster subscribeAttributeColorPointGIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93815,34 +109144,34 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { }; /* - * Attribute Primary2Y + * Attribute ColorPointBX */ -class ReadColorControlPrimary2Y : public ReadAttribute { +class ReadColorControlColorPointBX : public ReadAttribute { public: - ReadColorControlPrimary2Y() - : ReadAttribute("primary2y") + ReadColorControlColorPointBX() + : ReadAttribute("color-point-bx") { } - ~ReadColorControlPrimary2Y() + ~ReadColorControlColorPointBX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary2Y read Error", error); + LogNSError("ColorControl ColorPointBX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93851,21 +109180,62 @@ class ReadColorControlPrimary2Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { +class WriteColorControlColorPointBX : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary2Y() - : SubscribeAttribute("primary2y") + WriteColorControlColorPointBX() + : WriteAttribute("color-point-bx") { + AddArgument("attr-name", "color-point-bx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary2Y() + ~WriteColorControlColorPointBX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBX() + : SubscribeAttribute("color-point-bx") + { + } + + ~SubscribeAttributeColorControlColorPointBX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::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); @@ -93880,10 +109250,10 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2YWithParams:params + [cluster subscribeAttributeColorPointBXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93897,34 +109267,34 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { }; /* - * Attribute Primary2Intensity + * Attribute ColorPointBY */ -class ReadColorControlPrimary2Intensity : public ReadAttribute { +class ReadColorControlColorPointBY : public ReadAttribute { public: - ReadColorControlPrimary2Intensity() - : ReadAttribute("primary2intensity") + ReadColorControlColorPointBY() + : ReadAttribute("color-point-by") { } - ~ReadColorControlPrimary2Intensity() + ~ReadColorControlColorPointBY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary2Intensity read Error", error); + LogNSError("ColorControl ColorPointBY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93933,21 +109303,62 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { +class WriteColorControlColorPointBY : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary2Intensity() - : SubscribeAttribute("primary2intensity") + WriteColorControlColorPointBY() + : WriteAttribute("color-point-by") { + AddArgument("attr-name", "color-point-by"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary2Intensity() + ~WriteColorControlColorPointBY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBY() + : SubscribeAttribute("color-point-by") + { + } + + ~SubscribeAttributeColorControlColorPointBY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::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); @@ -93962,10 +109373,10 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2IntensityWithParams:params + [cluster subscribeAttributeColorPointBYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93979,34 +109390,34 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut }; /* - * Attribute Primary3X + * Attribute ColorPointBIntensity */ -class ReadColorControlPrimary3X : public ReadAttribute { +class ReadColorControlColorPointBIntensity : public ReadAttribute { public: - ReadColorControlPrimary3X() - : ReadAttribute("primary3x") + ReadColorControlColorPointBIntensity() + : ReadAttribute("color-point-bintensity") { } - ~ReadColorControlPrimary3X() + ~ReadColorControlColorPointBIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary3X read Error", error); + LogNSError("ColorControl ColorPointBIntensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94015,21 +109426,65 @@ class ReadColorControlPrimary3X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { +class WriteColorControlColorPointBIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlPrimary3X() - : SubscribeAttribute("primary3x") + WriteColorControlColorPointBIntensity() + : WriteAttribute("color-point-bintensity") { + AddArgument("attr-name", "color-point-bintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlPrimary3X() + ~WriteColorControlColorPointBIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBIntensity() + : SubscribeAttribute("color-point-bintensity") + { + } + + ~SubscribeAttributeColorControlColorPointBIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::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); @@ -94044,10 +109499,10 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3XWithParams:params + [cluster subscribeAttributeColorPointBIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94061,34 +109516,34 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { }; /* - * Attribute Primary3Y + * Attribute EnhancedCurrentHue */ -class ReadColorControlPrimary3Y : public ReadAttribute { -public: - ReadColorControlPrimary3Y() - : ReadAttribute("primary3y") +class ReadColorControlEnhancedCurrentHue : public ReadAttribute { +public: + ReadColorControlEnhancedCurrentHue() + : ReadAttribute("enhanced-current-hue") { } - ~ReadColorControlPrimary3Y() + ~ReadColorControlEnhancedCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary3Y read Error", error); + LogNSError("ColorControl EnhancedCurrentHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94097,21 +109552,21 @@ class ReadColorControlPrimary3Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary3Y() - : SubscribeAttribute("primary3y") + SubscribeAttributeColorControlEnhancedCurrentHue() + : SubscribeAttribute("enhanced-current-hue") { } - ~SubscribeAttributeColorControlPrimary3Y() + ~SubscribeAttributeColorControlEnhancedCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::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); @@ -94126,10 +109581,10 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3YWithParams:params + [cluster subscribeAttributeEnhancedCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94143,34 +109598,34 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { }; /* - * Attribute Primary3Intensity + * Attribute EnhancedColorMode */ -class ReadColorControlPrimary3Intensity : public ReadAttribute { +class ReadColorControlEnhancedColorMode : public ReadAttribute { public: - ReadColorControlPrimary3Intensity() - : ReadAttribute("primary3intensity") + ReadColorControlEnhancedColorMode() + : ReadAttribute("enhanced-color-mode") { } - ~ReadColorControlPrimary3Intensity() + ~ReadColorControlEnhancedColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary3Intensity read Error", error); + LogNSError("ColorControl EnhancedColorMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94179,21 +109634,21 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary3Intensity() - : SubscribeAttribute("primary3intensity") + SubscribeAttributeColorControlEnhancedColorMode() + : SubscribeAttribute("enhanced-color-mode") { } - ~SubscribeAttributeColorControlPrimary3Intensity() + ~SubscribeAttributeColorControlEnhancedColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::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); @@ -94208,10 +109663,10 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3IntensityWithParams:params + [cluster subscribeAttributeEnhancedColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94225,34 +109680,34 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut }; /* - * Attribute Primary4X + * Attribute ColorLoopActive */ -class ReadColorControlPrimary4X : public ReadAttribute { +class ReadColorControlColorLoopActive : public ReadAttribute { public: - ReadColorControlPrimary4X() - : ReadAttribute("primary4x") + ReadColorControlColorLoopActive() + : ReadAttribute("color-loop-active") { } - ~ReadColorControlPrimary4X() + ~ReadColorControlColorLoopActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary4X read Error", error); + LogNSError("ColorControl ColorLoopActive read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94261,21 +109716,21 @@ class ReadColorControlPrimary4X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4X() - : SubscribeAttribute("primary4x") + SubscribeAttributeColorControlColorLoopActive() + : SubscribeAttribute("color-loop-active") { } - ~SubscribeAttributeColorControlPrimary4X() + ~SubscribeAttributeColorControlColorLoopActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::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); @@ -94290,10 +109745,10 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4XWithParams:params + [cluster subscribeAttributeColorLoopActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94307,34 +109762,34 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { }; /* - * Attribute Primary4Y + * Attribute ColorLoopDirection */ -class ReadColorControlPrimary4Y : public ReadAttribute { +class ReadColorControlColorLoopDirection : public ReadAttribute { public: - ReadColorControlPrimary4Y() - : ReadAttribute("primary4y") + ReadColorControlColorLoopDirection() + : ReadAttribute("color-loop-direction") { } - ~ReadColorControlPrimary4Y() + ~ReadColorControlColorLoopDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary4Y read Error", error); + LogNSError("ColorControl ColorLoopDirection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94343,21 +109798,21 @@ class ReadColorControlPrimary4Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4Y() - : SubscribeAttribute("primary4y") + SubscribeAttributeColorControlColorLoopDirection() + : SubscribeAttribute("color-loop-direction") { } - ~SubscribeAttributeColorControlPrimary4Y() + ~SubscribeAttributeColorControlColorLoopDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::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); @@ -94372,10 +109827,10 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4YWithParams:params + [cluster subscribeAttributeColorLoopDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94389,34 +109844,34 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { }; /* - * Attribute Primary4Intensity + * Attribute ColorLoopTime */ -class ReadColorControlPrimary4Intensity : public ReadAttribute { +class ReadColorControlColorLoopTime : public ReadAttribute { public: - ReadColorControlPrimary4Intensity() - : ReadAttribute("primary4intensity") + ReadColorControlColorLoopTime() + : ReadAttribute("color-loop-time") { } - ~ReadColorControlPrimary4Intensity() + ~ReadColorControlColorLoopTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary4Intensity read Error", error); + LogNSError("ColorControl ColorLoopTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94425,21 +109880,21 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4Intensity() - : SubscribeAttribute("primary4intensity") + SubscribeAttributeColorControlColorLoopTime() + : SubscribeAttribute("color-loop-time") { } - ~SubscribeAttributeColorControlPrimary4Intensity() + ~SubscribeAttributeColorControlColorLoopTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::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); @@ -94454,10 +109909,10 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4IntensityWithParams:params + [cluster subscribeAttributeColorLoopTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94471,34 +109926,34 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut }; /* - * Attribute Primary5X + * Attribute ColorLoopStartEnhancedHue */ -class ReadColorControlPrimary5X : public ReadAttribute { +class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { public: - ReadColorControlPrimary5X() - : ReadAttribute("primary5x") + ReadColorControlColorLoopStartEnhancedHue() + : ReadAttribute("color-loop-start-enhanced-hue") { } - ~ReadColorControlPrimary5X() + ~ReadColorControlColorLoopStartEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary5X read Error", error); + LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94507,21 +109962,21 @@ class ReadColorControlPrimary5X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5X() - : SubscribeAttribute("primary5x") + SubscribeAttributeColorControlColorLoopStartEnhancedHue() + : SubscribeAttribute("color-loop-start-enhanced-hue") { } - ~SubscribeAttributeColorControlPrimary5X() + ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::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); @@ -94536,10 +109991,10 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5XWithParams:params + [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94553,34 +110008,34 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { }; /* - * Attribute Primary5Y + * Attribute ColorLoopStoredEnhancedHue */ -class ReadColorControlPrimary5Y : public ReadAttribute { +class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { public: - ReadColorControlPrimary5Y() - : ReadAttribute("primary5y") + ReadColorControlColorLoopStoredEnhancedHue() + : ReadAttribute("color-loop-stored-enhanced-hue") { } - ~ReadColorControlPrimary5Y() + ~ReadColorControlColorLoopStoredEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary5Y read Error", error); + LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94589,21 +110044,21 @@ class ReadColorControlPrimary5Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5Y() - : SubscribeAttribute("primary5y") + SubscribeAttributeColorControlColorLoopStoredEnhancedHue() + : SubscribeAttribute("color-loop-stored-enhanced-hue") { } - ~SubscribeAttributeColorControlPrimary5Y() + ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::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); @@ -94618,10 +110073,10 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5YWithParams:params + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94635,34 +110090,34 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { }; /* - * Attribute Primary5Intensity + * Attribute ColorCapabilities */ -class ReadColorControlPrimary5Intensity : public ReadAttribute { +class ReadColorControlColorCapabilities : public ReadAttribute { public: - ReadColorControlPrimary5Intensity() - : ReadAttribute("primary5intensity") + ReadColorControlColorCapabilities() + : ReadAttribute("color-capabilities") { } - ~ReadColorControlPrimary5Intensity() + ~ReadColorControlColorCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary5Intensity read Error", error); + LogNSError("ColorControl ColorCapabilities read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94671,21 +110126,21 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5Intensity() - : SubscribeAttribute("primary5intensity") + SubscribeAttributeColorControlColorCapabilities() + : SubscribeAttribute("color-capabilities") { } - ~SubscribeAttributeColorControlPrimary5Intensity() + ~SubscribeAttributeColorControlColorCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::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); @@ -94700,10 +110155,10 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5IntensityWithParams:params + [cluster subscribeAttributeColorCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94717,34 +110172,34 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut }; /* - * Attribute Primary6X + * Attribute ColorTempPhysicalMinMireds */ -class ReadColorControlPrimary6X : public ReadAttribute { +class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { public: - ReadColorControlPrimary6X() - : ReadAttribute("primary6x") + ReadColorControlColorTempPhysicalMinMireds() + : ReadAttribute("color-temp-physical-min-mireds") { } - ~ReadColorControlPrimary6X() + ~ReadColorControlColorTempPhysicalMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary6X read Error", error); + LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94753,21 +110208,21 @@ class ReadColorControlPrimary6X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6X() - : SubscribeAttribute("primary6x") + SubscribeAttributeColorControlColorTempPhysicalMinMireds() + : SubscribeAttribute("color-temp-physical-min-mireds") { } - ~SubscribeAttributeColorControlPrimary6X() + ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::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); @@ -94782,10 +110237,10 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6XWithParams:params + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94799,34 +110254,34 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { }; /* - * Attribute Primary6Y + * Attribute ColorTempPhysicalMaxMireds */ -class ReadColorControlPrimary6Y : public ReadAttribute { +class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { public: - ReadColorControlPrimary6Y() - : ReadAttribute("primary6y") + ReadColorControlColorTempPhysicalMaxMireds() + : ReadAttribute("color-temp-physical-max-mireds") { } - ~ReadColorControlPrimary6Y() + ~ReadColorControlColorTempPhysicalMaxMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary6Y read Error", error); + LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94835,21 +110290,21 @@ class ReadColorControlPrimary6Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6Y() - : SubscribeAttribute("primary6y") + SubscribeAttributeColorControlColorTempPhysicalMaxMireds() + : SubscribeAttribute("color-temp-physical-max-mireds") { } - ~SubscribeAttributeColorControlPrimary6Y() + ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::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); @@ -94864,10 +110319,10 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6YWithParams:params + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94881,34 +110336,34 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { }; /* - * Attribute Primary6Intensity + * Attribute CoupleColorTempToLevelMinMireds */ -class ReadColorControlPrimary6Intensity : public ReadAttribute { +class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { public: - ReadColorControlPrimary6Intensity() - : ReadAttribute("primary6intensity") + ReadColorControlCoupleColorTempToLevelMinMireds() + : ReadAttribute("couple-color-temp-to-level-min-mireds") { } - ~ReadColorControlPrimary6Intensity() + ~ReadColorControlCoupleColorTempToLevelMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl Primary6Intensity read Error", error); + LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94917,21 +110372,21 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6Intensity() - : SubscribeAttribute("primary6intensity") + SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() + : SubscribeAttribute("couple-color-temp-to-level-min-mireds") { } - ~SubscribeAttributeColorControlPrimary6Intensity() + ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::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); @@ -94946,10 +110401,10 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6IntensityWithParams:params + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94963,34 +110418,34 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut }; /* - * Attribute WhitePointX + * Attribute StartUpColorTemperatureMireds */ -class ReadColorControlWhitePointX : public ReadAttribute { +class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { public: - ReadColorControlWhitePointX() - : ReadAttribute("white-point-x") + ReadColorControlStartUpColorTemperatureMireds() + : ReadAttribute("start-up-color-temperature-mireds") { } - ~ReadColorControlWhitePointX() + ~ReadColorControlStartUpColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl WhitePointX read Error", error); + LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94999,24 +110454,24 @@ class ReadColorControlWhitePointX : public ReadAttribute { } }; -class WriteColorControlWhitePointX : public WriteAttribute { +class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { public: - WriteColorControlWhitePointX() - : WriteAttribute("white-point-x") + WriteColorControlStartUpColorTemperatureMireds() + : WriteAttribute("start-up-color-temperature-mireds") { - AddArgument("attr-name", "white-point-x"); + AddArgument("attr-name", "start-up-color-temperature-mireds"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlWhitePointX() + ~WriteColorControlStartUpColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95024,11 +110479,14 @@ class WriteColorControlWhitePointX : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } - [cluster writeAttributeWhitePointXWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); + LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95037,24 +110495,24 @@ class WriteColorControlWhitePointX : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { +class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlWhitePointX() - : SubscribeAttribute("white-point-x") + SubscribeAttributeColorControlStartUpColorTemperatureMireds() + : SubscribeAttribute("start-up-color-temperature-mireds") { } - ~SubscribeAttributeColorControlWhitePointX() + ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::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); @@ -95069,10 +110527,10 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWhitePointXWithParams:params + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95086,98 +110544,57 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { }; /* - * Attribute WhitePointY + * Attribute GeneratedCommandList */ -class ReadColorControlWhitePointY : public ReadAttribute { +class ReadColorControlGeneratedCommandList : public ReadAttribute { public: - ReadColorControlWhitePointY() - : ReadAttribute("white-point-y") + ReadColorControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlWhitePointY() + ~ReadColorControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl WhitePointY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlWhitePointY : public WriteAttribute { -public: - WriteColorControlWhitePointY() - : WriteAttribute("white-point-y") - { - AddArgument("attr-name", "white-point-y"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeWhitePointYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); + LogNSError("ColorControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { +class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlWhitePointY() - : SubscribeAttribute("white-point-y") + SubscribeAttributeColorControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlWhitePointY() + ~SubscribeAttributeColorControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::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); @@ -95192,10 +110609,10 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWhitePointYWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95209,98 +110626,57 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { }; /* - * Attribute ColorPointRX + * Attribute AcceptedCommandList */ -class ReadColorControlColorPointRX : public ReadAttribute { +class ReadColorControlAcceptedCommandList : public ReadAttribute { public: - ReadColorControlColorPointRX() - : ReadAttribute("color-point-rx") + ReadColorControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlColorPointRX() + ~ReadColorControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointRX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRX : public WriteAttribute { -public: - WriteColorControlColorPointRX() - : WriteAttribute("color-point-rx") - { - AddArgument("attr-name", "color-point-rx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); + LogNSError("ColorControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { +class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRX() - : SubscribeAttribute("color-point-rx") + SubscribeAttributeColorControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlColorPointRX() + ~SubscribeAttributeColorControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::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); @@ -95315,10 +110691,10 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRXWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95331,99 +110707,60 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ColorPointRY + * Attribute EventList */ -class ReadColorControlColorPointRY : public ReadAttribute { +class ReadColorControlEventList : public ReadAttribute { public: - ReadColorControlColorPointRY() - : ReadAttribute("color-point-ry") + ReadColorControlEventList() + : ReadAttribute("event-list") { } - ~ReadColorControlColorPointRY() + ~ReadColorControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointRY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRY : public WriteAttribute { -public: - WriteColorControlColorPointRY() - : WriteAttribute("color-point-ry") - { - AddArgument("attr-name", "color-point-ry"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); + LogNSError("ColorControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { +class SubscribeAttributeColorControlEventList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRY() - : SubscribeAttribute("color-point-ry") + SubscribeAttributeColorControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeColorControlColorPointRY() + ~SubscribeAttributeColorControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::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); @@ -95438,10 +110775,10 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRYWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95454,35 +110791,37 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ColorPointRIntensity + * Attribute AttributeList */ -class ReadColorControlColorPointRIntensity : public ReadAttribute { +class ReadColorControlAttributeList : public ReadAttribute { public: - ReadColorControlColorPointRIntensity() - : ReadAttribute("color-point-rintensity") + ReadColorControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadColorControlColorPointRIntensity() + ~ReadColorControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointRIntensity read Error", error); + LogNSError("ColorControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95491,65 +110830,103 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointRIntensity : public WriteAttribute { +class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { public: - WriteColorControlColorPointRIntensity() - : WriteAttribute("color-point-rintensity") + SubscribeAttributeColorControlAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("attr-name", "color-point-rintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointRIntensity() + ~SubscribeAttributeColorControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadColorControlFeatureMap : public ReadAttribute { +public: + ReadColorControlFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadColorControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ColorControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRIntensity() - : SubscribeAttribute("color-point-rintensity") + SubscribeAttributeColorControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlColorPointRIntensity() + ~SubscribeAttributeColorControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::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); @@ -95564,10 +110941,10 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRIntensityWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95581,34 +110958,34 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri }; /* - * Attribute ColorPointGX + * Attribute ClusterRevision */ -class ReadColorControlColorPointGX : public ReadAttribute { +class ReadColorControlClusterRevision : public ReadAttribute { public: - ReadColorControlColorPointGX() - : ReadAttribute("color-point-gx") + ReadColorControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadColorControlColorPointGX() + ~ReadColorControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointGX read Error", error); + LogNSError("ColorControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95617,66 +110994,137 @@ class ReadColorControlColorPointGX : public ReadAttribute { } }; -class WriteColorControlColorPointGX : public WriteAttribute { +class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { public: - WriteColorControlColorPointGX() - : WriteAttribute("color-point-gx") + SubscribeAttributeColorControlClusterRevision() + : SubscribeAttribute("cluster-revision") { - AddArgument("attr-name", "color-point-gx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGX() + ~SubscribeAttributeColorControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + __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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeColorPointGXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster BallastConfiguration | 0x0301 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute PhysicalMinLevel + */ +class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { +public: + ReadBallastConfigurationPhysicalMinLevel() + : ReadAttribute("physical-min-level") + { + } + + ~ReadBallastConfigurationPhysicalMinLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::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); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGX() - : SubscribeAttribute("color-point-gx") + SubscribeAttributeBallastConfigurationPhysicalMinLevel() + : SubscribeAttribute("physical-min-level") { } - ~SubscribeAttributeColorControlColorPointGX() + ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -95687,10 +111135,10 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGXWithParams:params + [cluster subscribeAttributePhysicalMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95704,34 +111152,34 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { }; /* - * Attribute ColorPointGY + * Attribute PhysicalMaxLevel */ -class ReadColorControlColorPointGY : public ReadAttribute { +class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { public: - ReadColorControlColorPointGY() - : ReadAttribute("color-point-gy") + ReadBallastConfigurationPhysicalMaxLevel() + : ReadAttribute("physical-max-level") { } - ~ReadColorControlColorPointGY() + ~ReadBallastConfigurationPhysicalMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointGY read Error", error); + LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95740,66 +111188,107 @@ class ReadColorControlColorPointGY : public ReadAttribute { } }; -class WriteColorControlColorPointGY : public WriteAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { public: - WriteColorControlColorPointGY() - : WriteAttribute("color-point-gy") + SubscribeAttributeBallastConfigurationPhysicalMaxLevel() + : SubscribeAttribute("physical-max-level") { - AddArgument("attr-name", "color-point-gy"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGY() + ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration 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 subscribeAttributePhysicalMaxLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeColorPointGYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute BallastStatus + */ +class ReadBallastConfigurationBallastStatus : public ReadAttribute { +public: + ReadBallastConfigurationBallastStatus() + : ReadAttribute("ballast-status") + { + } + + ~ReadBallastConfigurationBallastStatus() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::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); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BallastConfiguration BallastStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGY() - : SubscribeAttribute("color-point-gy") + SubscribeAttributeBallastConfigurationBallastStatus() + : SubscribeAttribute("ballast-status") { } - ~SubscribeAttributeColorControlColorPointGY() + ~SubscribeAttributeBallastConfigurationBallastStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -95810,10 +111299,10 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGYWithParams:params + [cluster subscribeAttributeBallastStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95827,34 +111316,34 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { }; /* - * Attribute ColorPointGIntensity + * Attribute MinLevel */ -class ReadColorControlColorPointGIntensity : public ReadAttribute { +class ReadBallastConfigurationMinLevel : public ReadAttribute { public: - ReadColorControlColorPointGIntensity() - : ReadAttribute("color-point-gintensity") + ReadBallastConfigurationMinLevel() + : ReadAttribute("min-level") { } - ~ReadColorControlColorPointGIntensity() + ~ReadBallastConfigurationMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointGIntensity read Error", error); + LogNSError("BallastConfiguration MinLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95863,39 +111352,36 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointGIntensity : public WriteAttribute { +class WriteBallastConfigurationMinLevel : public WriteAttribute { public: - WriteColorControlColorPointGIntensity() - : WriteAttribute("color-point-gintensity") + WriteBallastConfigurationMinLevel() + : WriteAttribute("min-level") { - AddArgument("attr-name", "color-point-gintensity"); + AddArgument("attr-name", "min-level"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGIntensity() + ~WriteBallastConfigurationMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMinLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); + LogNSError("BallastConfiguration MinLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95904,28 +111390,28 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGIntensity() - : SubscribeAttribute("color-point-gintensity") + SubscribeAttributeBallastConfigurationMinLevel() + : SubscribeAttribute("min-level") { } - ~SubscribeAttributeColorControlColorPointGIntensity() + ~SubscribeAttributeBallastConfigurationMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -95936,10 +111422,10 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGIntensityWithParams:params + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95953,34 +111439,34 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri }; /* - * Attribute ColorPointBX + * Attribute MaxLevel */ -class ReadColorControlColorPointBX : public ReadAttribute { +class ReadBallastConfigurationMaxLevel : public ReadAttribute { public: - ReadColorControlColorPointBX() - : ReadAttribute("color-point-bx") + ReadBallastConfigurationMaxLevel() + : ReadAttribute("max-level") { } - ~ReadColorControlColorPointBX() + ~ReadBallastConfigurationMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointBX read Error", error); + LogNSError("BallastConfiguration MaxLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95989,36 +111475,36 @@ class ReadColorControlColorPointBX : public ReadAttribute { } }; -class WriteColorControlColorPointBX : public WriteAttribute { +class WriteBallastConfigurationMaxLevel : public WriteAttribute { public: - WriteColorControlColorPointBX() - : WriteAttribute("color-point-bx") + WriteBallastConfigurationMaxLevel() + : WriteAttribute("max-level") { - AddArgument("attr-name", "color-point-bx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "max-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBX() + ~WriteBallastConfigurationMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeColorPointBXWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMaxLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); + LogNSError("BallastConfiguration MaxLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96027,28 +111513,28 @@ class WriteColorControlColorPointBX : public WriteAttribute { } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBX() - : SubscribeAttribute("color-point-bx") + SubscribeAttributeBallastConfigurationMaxLevel() + : SubscribeAttribute("max-level") { } - ~SubscribeAttributeColorControlColorPointBX() + ~SubscribeAttributeBallastConfigurationMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96059,10 +111545,10 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBXWithParams:params + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96076,34 +111562,34 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { }; /* - * Attribute ColorPointBY + * Attribute IntrinsicBallastFactor */ -class ReadColorControlColorPointBY : public ReadAttribute { +class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { public: - ReadColorControlColorPointBY() - : ReadAttribute("color-point-by") + ReadBallastConfigurationIntrinsicBallastFactor() + : ReadAttribute("intrinsic-ballast-factor") { } - ~ReadColorControlColorPointBY() + ~ReadBallastConfigurationIntrinsicBallastFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointBY read Error", error); + LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96112,36 +111598,39 @@ class ReadColorControlColorPointBY : public ReadAttribute { } }; -class WriteColorControlColorPointBY : public WriteAttribute { +class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { public: - WriteColorControlColorPointBY() - : WriteAttribute("color-point-by") + WriteBallastConfigurationIntrinsicBallastFactor() + : WriteAttribute("intrinsic-ballast-factor") { - AddArgument("attr-name", "color-point-by"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "intrinsic-ballast-factor"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBY() + ~WriteBallastConfigurationIntrinsicBallastFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeColorPointBYWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); + LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96150,28 +111639,28 @@ class WriteColorControlColorPointBY : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBY() - : SubscribeAttribute("color-point-by") + SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + : SubscribeAttribute("intrinsic-ballast-factor") { } - ~SubscribeAttributeColorControlColorPointBY() + ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96182,10 +111671,10 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBYWithParams:params + [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96199,34 +111688,34 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { }; /* - * Attribute ColorPointBIntensity + * Attribute BallastFactorAdjustment */ -class ReadColorControlColorPointBIntensity : public ReadAttribute { +class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { public: - ReadColorControlColorPointBIntensity() - : ReadAttribute("color-point-bintensity") + ReadBallastConfigurationBallastFactorAdjustment() + : ReadAttribute("ballast-factor-adjustment") { } - ~ReadColorControlColorPointBIntensity() + ~ReadBallastConfigurationBallastFactorAdjustment() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorPointBIntensity read Error", error); + LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96235,28 +111724,28 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointBIntensity : public WriteAttribute { +class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { public: - WriteColorControlColorPointBIntensity() - : WriteAttribute("color-point-bintensity") + WriteBallastConfigurationBallastFactorAdjustment() + : WriteAttribute("ballast-factor-adjustment") { - AddArgument("attr-name", "color-point-bintensity"); + AddArgument("attr-name", "ballast-factor-adjustment"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBIntensity() + ~WriteBallastConfigurationBallastFactorAdjustment() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -96265,9 +111754,9 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); + LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96279,25 +111768,25 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBIntensity() - : SubscribeAttribute("color-point-bintensity") + SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + : SubscribeAttribute("ballast-factor-adjustment") { } - ~SubscribeAttributeColorControlColorPointBIntensity() + ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96308,10 +111797,10 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBIntensityWithParams:params + [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96325,34 +111814,34 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri }; /* - * Attribute EnhancedCurrentHue + * Attribute LampQuantity */ -class ReadColorControlEnhancedCurrentHue : public ReadAttribute { +class ReadBallastConfigurationLampQuantity : public ReadAttribute { public: - ReadColorControlEnhancedCurrentHue() - : ReadAttribute("enhanced-current-hue") + ReadBallastConfigurationLampQuantity() + : ReadAttribute("lamp-quantity") { } - ~ReadColorControlEnhancedCurrentHue() + ~ReadBallastConfigurationLampQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl EnhancedCurrentHue read Error", error); + LogNSError("BallastConfiguration LampQuantity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96361,25 +111850,25 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { public: - SubscribeAttributeColorControlEnhancedCurrentHue() - : SubscribeAttribute("enhanced-current-hue") + SubscribeAttributeBallastConfigurationLampQuantity() + : SubscribeAttribute("lamp-quantity") { } - ~SubscribeAttributeColorControlEnhancedCurrentHue() + ~SubscribeAttributeBallastConfigurationLampQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96390,10 +111879,10 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnhancedCurrentHueWithParams:params + [cluster subscribeAttributeLampQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96407,34 +111896,34 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu }; /* - * Attribute EnhancedColorMode + * Attribute LampType */ -class ReadColorControlEnhancedColorMode : public ReadAttribute { +class ReadBallastConfigurationLampType : public ReadAttribute { public: - ReadColorControlEnhancedColorMode() - : ReadAttribute("enhanced-color-mode") + ReadBallastConfigurationLampType() + : ReadAttribute("lamp-type") { } - ~ReadColorControlEnhancedColorMode() + ~ReadBallastConfigurationLampType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl EnhancedColorMode read Error", error); + LogNSError("BallastConfiguration LampType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96443,25 +111932,66 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { } }; -class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { +class WriteBallastConfigurationLampType : public WriteAttribute { public: - SubscribeAttributeColorControlEnhancedColorMode() - : SubscribeAttribute("enhanced-color-mode") + WriteBallastConfigurationLampType() + : WriteAttribute("lamp-type") + { + AddArgument("attr-name", "lamp-type"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationLampType() { } - ~SubscribeAttributeColorControlEnhancedColorMode() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampType() + : SubscribeAttribute("lamp-type") + { + } + + ~SubscribeAttributeBallastConfigurationLampType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96472,10 +112002,10 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnhancedColorModeWithParams:params + [cluster subscribeAttributeLampTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96489,34 +112019,34 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut }; /* - * Attribute ColorLoopActive + * Attribute LampManufacturer */ -class ReadColorControlColorLoopActive : public ReadAttribute { +class ReadBallastConfigurationLampManufacturer : public ReadAttribute { public: - ReadColorControlColorLoopActive() - : ReadAttribute("color-loop-active") + ReadBallastConfigurationLampManufacturer() + : ReadAttribute("lamp-manufacturer") { } - ~ReadColorControlColorLoopActive() + ~ReadBallastConfigurationLampManufacturer() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorLoopActive read Error", error); + LogNSError("BallastConfiguration LampManufacturer read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96525,25 +112055,66 @@ class ReadColorControlColorLoopActive : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { +class WriteBallastConfigurationLampManufacturer : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopActive() - : SubscribeAttribute("color-loop-active") + WriteBallastConfigurationLampManufacturer() + : WriteAttribute("lamp-manufacturer") { + AddArgument("attr-name", "lamp-manufacturer"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopActive() + ~WriteBallastConfigurationLampManufacturer() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampManufacturerWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampManufacturer() + : SubscribeAttribute("lamp-manufacturer") + { + } + + ~SubscribeAttributeBallastConfigurationLampManufacturer() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96554,10 +112125,10 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopActiveWithParams:params + [cluster subscribeAttributeLampManufacturerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96571,34 +112142,34 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute }; /* - * Attribute ColorLoopDirection + * Attribute LampRatedHours */ -class ReadColorControlColorLoopDirection : public ReadAttribute { +class ReadBallastConfigurationLampRatedHours : public ReadAttribute { public: - ReadColorControlColorLoopDirection() - : ReadAttribute("color-loop-direction") + ReadBallastConfigurationLampRatedHours() + : ReadAttribute("lamp-rated-hours") { } - ~ReadColorControlColorLoopDirection() + ~ReadBallastConfigurationLampRatedHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorLoopDirection read Error", error); + LogNSError("BallastConfiguration LampRatedHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96607,25 +112178,69 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { +class WriteBallastConfigurationLampRatedHours : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopDirection() - : SubscribeAttribute("color-loop-direction") + WriteBallastConfigurationLampRatedHours() + : WriteAttribute("lamp-rated-hours") { + AddArgument("attr-name", "lamp-rated-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopDirection() + ~WriteBallastConfigurationLampRatedHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampRatedHours() + : SubscribeAttribute("lamp-rated-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampRatedHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96636,10 +112251,10 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopDirectionWithParams:params + [cluster subscribeAttributeLampRatedHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96653,34 +112268,34 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu }; /* - * Attribute ColorLoopTime + * Attribute LampBurnHours */ -class ReadColorControlColorLoopTime : public ReadAttribute { +class ReadBallastConfigurationLampBurnHours : public ReadAttribute { public: - ReadColorControlColorLoopTime() - : ReadAttribute("color-loop-time") + ReadBallastConfigurationLampBurnHours() + : ReadAttribute("lamp-burn-hours") { } - ~ReadColorControlColorLoopTime() + ~ReadBallastConfigurationLampBurnHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorLoopTime read Error", error); + LogNSError("BallastConfiguration LampBurnHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96689,25 +112304,69 @@ class ReadColorControlColorLoopTime : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHours : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopTime() - : SubscribeAttribute("color-loop-time") + WriteBallastConfigurationLampBurnHours() + : WriteAttribute("lamp-burn-hours") { + AddArgument("attr-name", "lamp-burn-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopTime() + ~WriteBallastConfigurationLampBurnHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHours() + : SubscribeAttribute("lamp-burn-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampBurnHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96718,10 +112377,10 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopTimeWithParams:params + [cluster subscribeAttributeLampBurnHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96735,34 +112394,34 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { }; /* - * Attribute ColorLoopStartEnhancedHue + * Attribute LampAlarmMode */ -class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { +class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { public: - ReadColorControlColorLoopStartEnhancedHue() - : ReadAttribute("color-loop-start-enhanced-hue") + ReadBallastConfigurationLampAlarmMode() + : ReadAttribute("lamp-alarm-mode") { } - ~ReadColorControlColorLoopStartEnhancedHue() + ~ReadBallastConfigurationLampAlarmMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + LogNSError("BallastConfiguration LampAlarmMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96771,25 +112430,66 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { +class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopStartEnhancedHue() - : SubscribeAttribute("color-loop-start-enhanced-hue") + WriteBallastConfigurationLampAlarmMode() + : WriteAttribute("lamp-alarm-mode") { + AddArgument("attr-name", "lamp-alarm-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() + ~WriteBallastConfigurationLampAlarmMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLampAlarmModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampAlarmMode() + : SubscribeAttribute("lamp-alarm-mode") + { + } + + ~SubscribeAttributeBallastConfigurationLampAlarmMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96800,10 +112500,10 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params + [cluster subscribeAttributeLampAlarmModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96817,34 +112517,34 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe }; /* - * Attribute ColorLoopStoredEnhancedHue + * Attribute LampBurnHoursTripPoint */ -class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { +class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { public: - ReadColorControlColorLoopStoredEnhancedHue() - : ReadAttribute("color-loop-stored-enhanced-hue") + ReadBallastConfigurationLampBurnHoursTripPoint() + : ReadAttribute("lamp-burn-hours-trip-point") { } - ~ReadColorControlColorLoopStoredEnhancedHue() + ~ReadBallastConfigurationLampBurnHoursTripPoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96853,25 +112553,69 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { public: - SubscribeAttributeColorControlColorLoopStoredEnhancedHue() - : SubscribeAttribute("color-loop-stored-enhanced-hue") + WriteBallastConfigurationLampBurnHoursTripPoint() + : WriteAttribute("lamp-burn-hours-trip-point") { + AddArgument("attr-name", "lamp-burn-hours-trip-point"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() + ~WriteBallastConfigurationLampBurnHoursTripPoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + : SubscribeAttribute("lamp-burn-hours-trip-point") + { + } + + ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96882,10 +112626,10 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params + [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96899,34 +112643,34 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib }; /* - * Attribute ColorCapabilities + * Attribute GeneratedCommandList */ -class ReadColorControlColorCapabilities : public ReadAttribute { +class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadColorControlColorCapabilities() - : ReadAttribute("color-capabilities") + ReadBallastConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlColorCapabilities() + ~ReadBallastConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorCapabilities read Error", error); + LogNSError("BallastConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96935,25 +112679,25 @@ class ReadColorControlColorCapabilities : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorCapabilities() - : SubscribeAttribute("color-capabilities") + SubscribeAttributeBallastConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlColorCapabilities() + ~SubscribeAttributeBallastConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -96964,10 +112708,10 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorCapabilitiesWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96981,34 +112725,34 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut }; /* - * Attribute ColorTempPhysicalMinMireds + * Attribute AcceptedCommandList */ -class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { +class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMinMireds() - : ReadAttribute("color-temp-physical-min-mireds") + ReadBallastConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlColorTempPhysicalMinMireds() + ~ReadBallastConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + LogNSError("BallastConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97017,25 +112761,25 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMinMireds() - : SubscribeAttribute("color-temp-physical-min-mireds") + SubscribeAttributeBallastConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() + ~SubscribeAttributeBallastConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97046,10 +112790,10 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97062,35 +112806,37 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ColorTempPhysicalMaxMireds + * Attribute EventList */ -class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { +class ReadBallastConfigurationEventList : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMaxMireds() - : ReadAttribute("color-temp-physical-max-mireds") + ReadBallastConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadColorControlColorTempPhysicalMaxMireds() + ~ReadBallastConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + LogNSError("BallastConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97099,25 +112845,25 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMaxMireds() - : SubscribeAttribute("color-temp-physical-max-mireds") + SubscribeAttributeBallastConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() + ~SubscribeAttributeBallastConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97128,10 +112874,10 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97144,35 +112890,37 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute CoupleColorTempToLevelMinMireds + * Attribute AttributeList */ -class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { +class ReadBallastConfigurationAttributeList : public ReadAttribute { public: - ReadColorControlCoupleColorTempToLevelMinMireds() - : ReadAttribute("couple-color-temp-to-level-min-mireds") + ReadBallastConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadColorControlCoupleColorTempToLevelMinMireds() + ~ReadBallastConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + LogNSError("BallastConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97181,25 +112929,25 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() - : SubscribeAttribute("couple-color-temp-to-level-min-mireds") + SubscribeAttributeBallastConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() + ~SubscribeAttributeBallastConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97210,10 +112958,10 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97227,105 +112975,61 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub }; /* - * Attribute StartUpColorTemperatureMireds + * Attribute FeatureMap */ -class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { -public: - ReadColorControlStartUpColorTemperatureMireds() - : ReadAttribute("start-up-color-temperature-mireds") - { - } - - ~ReadColorControlStartUpColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { +class ReadBallastConfigurationFeatureMap : public ReadAttribute { public: - WriteColorControlStartUpColorTemperatureMireds() - : WriteAttribute("start-up-color-temperature-mireds") + ReadBallastConfigurationFeatureMap() + : ReadAttribute("feature-map") { - AddArgument("attr-name", "start-up-color-temperature-mireds"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteColorControlStartUpColorTemperatureMireds() + ~ReadBallastConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedShort:mValue.Value()]; - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; - [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); + 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); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BallastConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlStartUpColorTemperatureMireds() - : SubscribeAttribute("start-up-color-temperature-mireds") + SubscribeAttributeBallastConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() + ~SubscribeAttributeBallastConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97336,10 +113040,10 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97353,34 +113057,34 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc }; /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadColorControlGeneratedCommandList : public ReadAttribute { +class ReadBallastConfigurationClusterRevision : public ReadAttribute { public: - ReadColorControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBallastConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadColorControlGeneratedCommandList() + ~ReadBallastConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl GeneratedCommandList read Error", error); + LogNSError("BallastConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97389,25 +113093,25 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeColorControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBallastConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeColorControlGeneratedCommandList() + ~SubscribeAttributeBallastConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97418,10 +113122,10 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97434,35 +113138,56 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri } }; +/*----------------------------------------------------------------------------*\ +| Cluster IlluminanceMeasurement | 0x0400 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AcceptedCommandList + * Attribute MeasuredValue */ -class ReadColorControlAcceptedCommandList : public ReadAttribute { +class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { public: - ReadColorControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIlluminanceMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadColorControlAcceptedCommandList() + ~ReadIlluminanceMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl AcceptedCommandList read Error", error); + LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97471,25 +113196,25 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIlluminanceMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeColorControlAcceptedCommandList() + ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97500,10 +113225,10 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97516,37 +113241,35 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MinMeasuredValue */ -class ReadColorControlEventList : public ReadAttribute { +class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadColorControlEventList() - : ReadAttribute("event-list") + ReadIlluminanceMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadColorControlEventList() + ~ReadIlluminanceMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl EventList read Error", error); + LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97555,25 +113278,25 @@ class ReadColorControlEventList : public ReadAttribute { } }; -class SubscribeAttributeColorControlEventList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeColorControlEventList() + ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97584,10 +113307,10 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97600,37 +113323,35 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute MaxMeasuredValue */ -class ReadColorControlAttributeList : public ReadAttribute { +class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadColorControlAttributeList() - : ReadAttribute("attribute-list") + ReadIlluminanceMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadColorControlAttributeList() + ~ReadIlluminanceMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl AttributeList read Error", error); + LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97639,25 +113360,25 @@ class ReadColorControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeColorControlAttributeList() + ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97668,10 +113389,10 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97685,34 +113406,34 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute Tolerance */ -class ReadColorControlFeatureMap : public ReadAttribute { +class ReadIlluminanceMeasurementTolerance : public ReadAttribute { public: - ReadColorControlFeatureMap() - : ReadAttribute("feature-map") + ReadIlluminanceMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadColorControlFeatureMap() + ~ReadIlluminanceMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl FeatureMap read Error", error); + LogNSError("IlluminanceMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97721,25 +113442,25 @@ class ReadColorControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeColorControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeIlluminanceMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeColorControlFeatureMap() + ~SubscribeAttributeIlluminanceMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97750,10 +113471,10 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97767,34 +113488,34 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute LightSensorType */ -class ReadColorControlClusterRevision : public ReadAttribute { +class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { public: - ReadColorControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadIlluminanceMeasurementLightSensorType() + : ReadAttribute("light-sensor-type") { } - ~ReadColorControlClusterRevision() + ~ReadIlluminanceMeasurementLightSensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ColorControl ClusterRevision read Error", error); + LogNSError("IlluminanceMeasurement LightSensorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97803,25 +113524,25 @@ class ReadColorControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { public: - SubscribeAttributeColorControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeIlluminanceMeasurementLightSensorType() + : SubscribeAttribute("light-sensor-type") { } - ~SubscribeAttributeColorControlClusterRevision() + ~SubscribeAttributeIlluminanceMeasurementLightSensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::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); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97832,10 +113553,10 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeLightSensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97848,65 +113569,35 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute PhysicalMinLevel + * Attribute GeneratedCommandList */ -class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { +class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMinLevel() - : ReadAttribute("physical-min-level") + ReadIlluminanceMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBallastConfigurationPhysicalMinLevel() + ~ReadIlluminanceMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); + LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97915,25 +113606,25 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMinLevel() - : SubscribeAttribute("physical-min-level") + SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() + ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97944,10 +113635,10 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMinLevelWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97961,34 +113652,34 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA }; /* - * Attribute PhysicalMaxLevel + * Attribute AcceptedCommandList */ -class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { +class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMaxLevel() - : ReadAttribute("physical-max-level") + ReadIlluminanceMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBallastConfigurationPhysicalMaxLevel() + ~ReadIlluminanceMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); + LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97997,25 +113688,25 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMaxLevel() - : SubscribeAttribute("physical-max-level") + SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() + ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98026,10 +113717,10 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMaxLevelWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98042,35 +113733,37 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BallastStatus + * Attribute EventList */ -class ReadBallastConfigurationBallastStatus : public ReadAttribute { +class ReadIlluminanceMeasurementEventList : public ReadAttribute { public: - ReadBallastConfigurationBallastStatus() - : ReadAttribute("ballast-status") + ReadIlluminanceMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadBallastConfigurationBallastStatus() + ~ReadIlluminanceMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration BallastStatus read Error", error); + LogNSError("IlluminanceMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98079,25 +113772,25 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastStatus() - : SubscribeAttribute("ballast-status") + SubscribeAttributeIlluminanceMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBallastConfigurationBallastStatus() + ~SubscribeAttributeIlluminanceMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98108,10 +113801,10 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastStatusWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98124,103 +113817,64 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MinLevel + * Attribute AttributeList */ -class ReadBallastConfigurationMinLevel : public ReadAttribute { +class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { public: - ReadBallastConfigurationMinLevel() - : ReadAttribute("min-level") + ReadIlluminanceMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBallastConfigurationMinLevel() + ~ReadIlluminanceMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration MinLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationMinLevel : public WriteAttribute { -public: - WriteBallastConfigurationMinLevel() - : WriteAttribute("min-level") - { - AddArgument("attr-name", "min-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMinLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); + LogNSError("IlluminanceMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMinLevel() - : SubscribeAttribute("min-level") + SubscribeAttributeIlluminanceMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBallastConfigurationMinLevel() + ~SubscribeAttributeIlluminanceMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98231,10 +113885,10 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinLevelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98248,102 +113902,61 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute }; /* - * Attribute MaxLevel + * Attribute FeatureMap */ -class ReadBallastConfigurationMaxLevel : public ReadAttribute { +class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { public: - ReadBallastConfigurationMaxLevel() - : ReadAttribute("max-level") + ReadIlluminanceMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBallastConfigurationMaxLevel() + ~ReadIlluminanceMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration MaxLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationMaxLevel : public WriteAttribute { -public: - WriteBallastConfigurationMaxLevel() - : WriteAttribute("max-level") - { - AddArgument("attr-name", "max-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMaxLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); + LogNSError("IlluminanceMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMaxLevel() - : SubscribeAttribute("max-level") + SubscribeAttributeIlluminanceMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBallastConfigurationMaxLevel() + ~SubscribeAttributeIlluminanceMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98354,10 +113967,10 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxLevelWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98371,105 +113984,61 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute }; /* - * Attribute IntrinsicBallastFactor + * Attribute ClusterRevision */ -class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { +class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { public: - ReadBallastConfigurationIntrinsicBallastFactor() - : ReadAttribute("intrinsic-ballast-factor") + ReadIlluminanceMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBallastConfigurationIntrinsicBallastFactor() + ~ReadIlluminanceMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { -public: - WriteBallastConfigurationIntrinsicBallastFactor() - : WriteAttribute("intrinsic-ballast-factor") - { - AddArgument("attr-name", "intrinsic-ballast-factor"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationIntrinsicBallastFactor() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() - : SubscribeAttribute("intrinsic-ballast-factor") + SubscribeAttributeIlluminanceMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + ~SubscribeAttributeIlluminanceMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98480,10 +114049,10 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98496,106 +114065,82 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureMeasurement | 0x0402 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute BallastFactorAdjustment + * Attribute MeasuredValue */ -class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { +class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationBallastFactorAdjustment() - : ReadAttribute("ballast-factor-adjustment") + ReadTemperatureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadBallastConfigurationBallastFactorAdjustment() + ~ReadTemperatureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { -public: - WriteBallastConfigurationBallastFactorAdjustment() - : WriteAttribute("ballast-factor-adjustment") - { - AddArgument("attr-name", "ballast-factor-adjustment"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationBallastFactorAdjustment() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); + LogNSError("TemperatureMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastFactorAdjustment() - : SubscribeAttribute("ballast-factor-adjustment") + SubscribeAttributeTemperatureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + ~SubscribeAttributeTemperatureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98606,10 +114151,10 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98623,34 +114168,34 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub }; /* - * Attribute LampQuantity + * Attribute MinMeasuredValue */ -class ReadBallastConfigurationLampQuantity : public ReadAttribute { +class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationLampQuantity() - : ReadAttribute("lamp-quantity") + ReadTemperatureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadBallastConfigurationLampQuantity() + ~ReadTemperatureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampQuantity read Error", error); + LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98659,25 +114204,25 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampQuantity() - : SubscribeAttribute("lamp-quantity") + SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeBallastConfigurationLampQuantity() + ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98688,10 +114233,10 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampQuantityWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98705,102 +114250,61 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri }; /* - * Attribute LampType + * Attribute MaxMeasuredValue */ -class ReadBallastConfigurationLampType : public ReadAttribute { +class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationLampType() - : ReadAttribute("lamp-type") + ReadTemperatureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadBallastConfigurationLampType() + ~ReadTemperatureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampType : public WriteAttribute { -public: - WriteBallastConfigurationLampType() - : WriteAttribute("lamp-type") - { - AddArgument("attr-name", "lamp-type"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); + LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampType() - : SubscribeAttribute("lamp-type") + SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeBallastConfigurationLampType() + ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98811,10 +114315,10 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampTypeWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98828,102 +114332,61 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute }; /* - * Attribute LampManufacturer + * Attribute Tolerance */ -class ReadBallastConfigurationLampManufacturer : public ReadAttribute { +class ReadTemperatureMeasurementTolerance : public ReadAttribute { public: - ReadBallastConfigurationLampManufacturer() - : ReadAttribute("lamp-manufacturer") + ReadTemperatureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadBallastConfigurationLampManufacturer() + ~ReadTemperatureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampManufacturer read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampManufacturer : public WriteAttribute { -public: - WriteBallastConfigurationLampManufacturer() - : WriteAttribute("lamp-manufacturer") - { - AddArgument("attr-name", "lamp-manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampManufacturer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampManufacturerWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); + LogNSError("TemperatureMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampManufacturer() - : SubscribeAttribute("lamp-manufacturer") + SubscribeAttributeTemperatureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeBallastConfigurationLampManufacturer() + ~SubscribeAttributeTemperatureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98934,10 +114397,10 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampManufacturerWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98951,105 +114414,61 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA }; /* - * Attribute LampRatedHours + * Attribute GeneratedCommandList */ -class ReadBallastConfigurationLampRatedHours : public ReadAttribute { +class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadBallastConfigurationLampRatedHours() - : ReadAttribute("lamp-rated-hours") + ReadTemperatureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBallastConfigurationLampRatedHours() + ~ReadTemperatureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampRatedHours read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampRatedHours : public WriteAttribute { -public: - WriteBallastConfigurationLampRatedHours() - : WriteAttribute("lamp-rated-hours") - { - AddArgument("attr-name", "lamp-rated-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampRatedHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); + LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampRatedHours() - : SubscribeAttribute("lamp-rated-hours") + SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBallastConfigurationLampRatedHours() + ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99060,10 +114479,10 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampRatedHoursWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99077,105 +114496,61 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt }; /* - * Attribute LampBurnHours + * Attribute AcceptedCommandList */ -class ReadBallastConfigurationLampBurnHours : public ReadAttribute { +class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHours() - : ReadAttribute("lamp-burn-hours") + ReadTemperatureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBallastConfigurationLampBurnHours() + ~ReadTemperatureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampBurnHours read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampBurnHours : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHours() - : WriteAttribute("lamp-burn-hours") - { - AddArgument("attr-name", "lamp-burn-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); + LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampBurnHours() - : SubscribeAttribute("lamp-burn-hours") + SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBallastConfigurationLampBurnHours() + ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99186,10 +114561,10 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99202,103 +114577,64 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute LampAlarmMode + * Attribute EventList */ -class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { +class ReadTemperatureMeasurementEventList : public ReadAttribute { public: - ReadBallastConfigurationLampAlarmMode() - : ReadAttribute("lamp-alarm-mode") + ReadTemperatureMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadBallastConfigurationLampAlarmMode() + ~ReadTemperatureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampAlarmMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { -public: - WriteBallastConfigurationLampAlarmMode() - : WriteAttribute("lamp-alarm-mode") - { - AddArgument("attr-name", "lamp-alarm-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampAlarmMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLampAlarmModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); + LogNSError("TemperatureMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampAlarmMode() - : SubscribeAttribute("lamp-alarm-mode") + SubscribeAttributeTemperatureMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBallastConfigurationLampAlarmMode() + ~SubscribeAttributeTemperatureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99309,10 +114645,10 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampAlarmModeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99325,106 +114661,64 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute LampBurnHoursTripPoint + * Attribute AttributeList */ -class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { +class ReadTemperatureMeasurementAttributeList : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHoursTripPoint() - : ReadAttribute("lamp-burn-hours-trip-point") + ReadTemperatureMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBallastConfigurationLampBurnHoursTripPoint() + ~ReadTemperatureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHoursTripPoint() - : WriteAttribute("lamp-burn-hours-trip-point") - { - AddArgument("attr-name", "lamp-burn-hours-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHoursTripPoint() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + LogNSError("TemperatureMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() - : SubscribeAttribute("lamp-burn-hours-trip-point") + SubscribeAttributeTemperatureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + ~SubscribeAttributeTemperatureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99435,10 +114729,10 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99452,34 +114746,34 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { public: - ReadBallastConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTemperatureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBallastConfigurationGeneratedCommandList() + ~ReadTemperatureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration GeneratedCommandList read Error", error); + LogNSError("TemperatureMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99488,25 +114782,25 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTemperatureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBallastConfigurationGeneratedCommandList() + ~SubscribeAttributeTemperatureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99517,10 +114811,10 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99534,34 +114828,34 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { public: - ReadBallastConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTemperatureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBallastConfigurationAcceptedCommandList() + ~ReadTemperatureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration AcceptedCommandList read Error", error); + LogNSError("TemperatureMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99570,25 +114864,25 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTemperatureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBallastConfigurationAcceptedCommandList() + ~SubscribeAttributeTemperatureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99599,10 +114893,10 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99615,37 +114909,60 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster PressureMeasurement | 0x0403 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Attribute MeasuredValue */ -class ReadBallastConfigurationEventList : public ReadAttribute { +class ReadPressureMeasurementMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationEventList() - : ReadAttribute("event-list") + ReadPressureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadBallastConfigurationEventList() + ~ReadPressureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration EventList read Error", error); + LogNSError("PressureMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99654,25 +114971,25 @@ class ReadBallastConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePressureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeBallastConfigurationEventList() + ~SubscribeAttributePressureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99683,10 +115000,10 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99699,37 +115016,35 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute MinMeasuredValue */ -class ReadBallastConfigurationAttributeList : public ReadAttribute { +class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadPressureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadBallastConfigurationAttributeList() + ~ReadPressureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration AttributeList read Error", error); + LogNSError("PressureMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99738,25 +115053,25 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePressureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeBallastConfigurationAttributeList() + ~SubscribeAttributePressureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99767,10 +115082,10 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99784,34 +115099,34 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute MaxMeasuredValue */ -class ReadBallastConfigurationFeatureMap : public ReadAttribute { +class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadPressureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadBallastConfigurationFeatureMap() + ~ReadPressureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration FeatureMap read Error", error); + LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99820,25 +115135,25 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePressureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeBallastConfigurationFeatureMap() + ~SubscribeAttributePressureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99849,10 +115164,10 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99866,34 +115181,34 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute Tolerance */ -class ReadBallastConfigurationClusterRevision : public ReadAttribute { +class ReadPressureMeasurementTolerance : public ReadAttribute { public: - ReadBallastConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPressureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadBallastConfigurationClusterRevision() + ~ReadPressureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BallastConfiguration ClusterRevision read Error", error); + LogNSError("PressureMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99902,25 +115217,25 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePressureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeBallastConfigurationClusterRevision() + ~SubscribeAttributePressureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99931,10 +115246,10 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99947,56 +115262,35 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute ScaledValue */ -class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementScaledValue : public ReadAttribute { public: - ReadIlluminanceMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPressureMeasurementScaledValue() + : ReadAttribute("scaled-value") { } - ~ReadIlluminanceMeasurementMeasuredValue() + ~ReadPressureMeasurementScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); + LogNSError("PressureMeasurement ScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100005,25 +115299,25 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePressureMeasurementScaledValue() + : SubscribeAttribute("scaled-value") { } - ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() + ~SubscribeAttributePressureMeasurementScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100034,10 +115328,10 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100051,34 +115345,34 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt }; /* - * Attribute MinMeasuredValue + * Attribute MinScaledValue */ -class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMinScaledValue : public ReadAttribute { public: - ReadIlluminanceMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPressureMeasurementMinScaledValue() + : ReadAttribute("min-scaled-value") { } - ~ReadIlluminanceMeasurementMinMeasuredValue() + ~ReadPressureMeasurementMinScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); + LogNSError("PressureMeasurement MinScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100087,25 +115381,25 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePressureMeasurementMinScaledValue() + : SubscribeAttribute("min-scaled-value") { } - ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() + ~SubscribeAttributePressureMeasurementMinScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100116,10 +115410,10 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMinScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100133,34 +115427,34 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib }; /* - * Attribute MaxMeasuredValue + * Attribute MaxScaledValue */ -class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { public: - ReadIlluminanceMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPressureMeasurementMaxScaledValue() + : ReadAttribute("max-scaled-value") { } - ~ReadIlluminanceMeasurementMaxMeasuredValue() + ~ReadPressureMeasurementMaxScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); + LogNSError("PressureMeasurement MaxScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100169,25 +115463,25 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePressureMeasurementMaxScaledValue() + : SubscribeAttribute("max-scaled-value") { } - ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() + ~SubscribeAttributePressureMeasurementMaxScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100198,10 +115492,10 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeMaxScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100215,34 +115509,34 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib }; /* - * Attribute Tolerance + * Attribute ScaledTolerance */ -class ReadIlluminanceMeasurementTolerance : public ReadAttribute { +class ReadPressureMeasurementScaledTolerance : public ReadAttribute { public: - ReadIlluminanceMeasurementTolerance() - : ReadAttribute("tolerance") + ReadPressureMeasurementScaledTolerance() + : ReadAttribute("scaled-tolerance") { } - ~ReadIlluminanceMeasurementTolerance() + ~ReadPressureMeasurementScaledTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement Tolerance read Error", error); + LogNSError("PressureMeasurement ScaledTolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100251,25 +115545,25 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributePressureMeasurementScaledTolerance() + : SubscribeAttribute("scaled-tolerance") { } - ~SubscribeAttributeIlluminanceMeasurementTolerance() + ~SubscribeAttributePressureMeasurementScaledTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100280,10 +115574,10 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeScaledToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100297,34 +115591,34 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib }; /* - * Attribute LightSensorType + * Attribute Scale */ -class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { +class ReadPressureMeasurementScale : public ReadAttribute { public: - ReadIlluminanceMeasurementLightSensorType() - : ReadAttribute("light-sensor-type") + ReadPressureMeasurementScale() + : ReadAttribute("scale") { } - ~ReadIlluminanceMeasurementLightSensorType() + ~ReadPressureMeasurementScale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + LogNSError("PressureMeasurement Scale read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100333,25 +115627,25 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementLightSensorType() - : SubscribeAttribute("light-sensor-type") + SubscribeAttributePressureMeasurementScale() + : SubscribeAttribute("scale") { } - ~SubscribeAttributeIlluminanceMeasurementLightSensorType() + ~SubscribeAttributePressureMeasurementScale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100362,10 +115656,10 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLightSensorTypeWithParams:params + [cluster subscribeAttributeScaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100381,32 +115675,32 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe /* * Attribute GeneratedCommandList */ -class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { +class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadIlluminanceMeasurementGeneratedCommandList() + ReadPressureMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadIlluminanceMeasurementGeneratedCommandList() + ~ReadPressureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); + LogNSError("PressureMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100415,25 +115709,25 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + SubscribeAttributePressureMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + ~SubscribeAttributePressureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100447,7 +115741,7 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100463,32 +115757,32 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs /* * Attribute AcceptedCommandList */ -class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { +class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadIlluminanceMeasurementAcceptedCommandList() + ReadPressureMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadIlluminanceMeasurementAcceptedCommandList() + ~ReadPressureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); + LogNSError("PressureMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100497,25 +115791,25 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + SubscribeAttributePressureMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + ~SubscribeAttributePressureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100529,7 +115823,7 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100547,32 +115841,32 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc /* * Attribute EventList */ -class ReadIlluminanceMeasurementEventList : public ReadAttribute { +class ReadPressureMeasurementEventList : public ReadAttribute { public: - ReadIlluminanceMeasurementEventList() + ReadPressureMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadIlluminanceMeasurementEventList() + ~ReadPressureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + NSLog(@"PressureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement EventList read Error", error); + LogNSError("PressureMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100581,25 +115875,25 @@ class ReadIlluminanceMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementEventList() + SubscribeAttributePressureMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIlluminanceMeasurementEventList() + ~SubscribeAttributePressureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100613,7 +115907,7 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + NSLog(@"PressureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100631,32 +115925,32 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { +class ReadPressureMeasurementAttributeList : public ReadAttribute { public: - ReadIlluminanceMeasurementAttributeList() + ReadPressureMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadIlluminanceMeasurementAttributeList() + ~ReadPressureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement AttributeList read Error", error); + LogNSError("PressureMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100665,25 +115959,25 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAttributeList() + SubscribeAttributePressureMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeIlluminanceMeasurementAttributeList() + ~SubscribeAttributePressureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100697,7 +115991,7 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100713,32 +116007,32 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt /* * Attribute FeatureMap */ -class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { +class ReadPressureMeasurementFeatureMap : public ReadAttribute { public: - ReadIlluminanceMeasurementFeatureMap() + ReadPressureMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadIlluminanceMeasurementFeatureMap() + ~ReadPressureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement FeatureMap read Error", error); + LogNSError("PressureMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100747,25 +116041,25 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementFeatureMap() + SubscribeAttributePressureMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIlluminanceMeasurementFeatureMap() + ~SubscribeAttributePressureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100779,7 +116073,7 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100795,32 +116089,32 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri /* * Attribute ClusterRevision */ -class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { +class ReadPressureMeasurementClusterRevision : public ReadAttribute { public: - ReadIlluminanceMeasurementClusterRevision() + ReadPressureMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadIlluminanceMeasurementClusterRevision() + ~ReadPressureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); + LogNSError("PressureMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100829,25 +116123,25 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementClusterRevision() + SubscribeAttributePressureMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIlluminanceMeasurementClusterRevision() + ~SubscribeAttributePressureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100861,7 +116155,7 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100875,7 +116169,7 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe }; /*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | +| Cluster FlowMeasurement | 0x0404 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -100897,32 +116191,32 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe /* * Attribute MeasuredValue */ -class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementMeasuredValue() + ReadFlowMeasurementMeasuredValue() : ReadAttribute("measured-value") { } - ~ReadTemperatureMeasurementMeasuredValue() + ~ReadFlowMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement MeasuredValue read Error", error); + LogNSError("FlowMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100931,25 +116225,25 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMeasuredValue() + SubscribeAttributeFlowMeasurementMeasuredValue() : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeTemperatureMeasurementMeasuredValue() + ~SubscribeAttributeFlowMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100963,7 +116257,7 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100979,32 +116273,32 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt /* * Attribute MinMeasuredValue */ -class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementMinMeasuredValue() + ReadFlowMeasurementMinMeasuredValue() : ReadAttribute("min-measured-value") { } - ~ReadTemperatureMeasurementMinMeasuredValue() + ~ReadFlowMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); + LogNSError("FlowMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101013,25 +116307,25 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + SubscribeAttributeFlowMeasurementMinMeasuredValue() : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + ~SubscribeAttributeFlowMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101045,7 +116339,7 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101061,32 +116355,32 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib /* * Attribute MaxMeasuredValue */ -class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementMaxMeasuredValue() + ReadFlowMeasurementMaxMeasuredValue() : ReadAttribute("max-measured-value") { } - ~ReadTemperatureMeasurementMaxMeasuredValue() + ~ReadFlowMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); + LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101095,25 +116389,25 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + SubscribeAttributeFlowMeasurementMaxMeasuredValue() : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101127,7 +116421,7 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101143,32 +116437,32 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib /* * Attribute Tolerance */ -class ReadTemperatureMeasurementTolerance : public ReadAttribute { +class ReadFlowMeasurementTolerance : public ReadAttribute { public: - ReadTemperatureMeasurementTolerance() + ReadFlowMeasurementTolerance() : ReadAttribute("tolerance") { } - ~ReadTemperatureMeasurementTolerance() + ~ReadFlowMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement Tolerance read Error", error); + LogNSError("FlowMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101177,25 +116471,25 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementTolerance() + SubscribeAttributeFlowMeasurementTolerance() : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeTemperatureMeasurementTolerance() + ~SubscribeAttributeFlowMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101209,7 +116503,7 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101225,32 +116519,32 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib /* * Attribute GeneratedCommandList */ -class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureMeasurementGeneratedCommandList() + ReadFlowMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTemperatureMeasurementGeneratedCommandList() + ~ReadFlowMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); + LogNSError("FlowMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101259,25 +116553,25 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + SubscribeAttributeFlowMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + ~SubscribeAttributeFlowMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101291,7 +116585,7 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101307,32 +116601,32 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs /* * Attribute AcceptedCommandList */ -class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureMeasurementAcceptedCommandList() + ReadFlowMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureMeasurementAcceptedCommandList() + ~ReadFlowMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + LogNSError("FlowMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101341,25 +116635,25 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + SubscribeAttributeFlowMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + ~SubscribeAttributeFlowMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101373,7 +116667,7 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101391,32 +116685,32 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc /* * Attribute EventList */ -class ReadTemperatureMeasurementEventList : public ReadAttribute { +class ReadFlowMeasurementEventList : public ReadAttribute { public: - ReadTemperatureMeasurementEventList() + ReadFlowMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadTemperatureMeasurementEventList() + ~ReadFlowMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + NSLog(@"FlowMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement EventList read Error", error); + LogNSError("FlowMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101425,25 +116719,25 @@ class ReadTemperatureMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementEventList() + SubscribeAttributeFlowMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureMeasurementEventList() + ~SubscribeAttributeFlowMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101457,7 +116751,7 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + NSLog(@"FlowMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101475,32 +116769,32 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadTemperatureMeasurementAttributeList : public ReadAttribute { +class ReadFlowMeasurementAttributeList : public ReadAttribute { public: - ReadTemperatureMeasurementAttributeList() + ReadFlowMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTemperatureMeasurementAttributeList() + ~ReadFlowMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement AttributeList read Error", error); + LogNSError("FlowMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101509,25 +116803,25 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementAttributeList() + SubscribeAttributeFlowMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureMeasurementAttributeList() + ~SubscribeAttributeFlowMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101541,7 +116835,7 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101557,32 +116851,32 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt /* * Attribute FeatureMap */ -class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { +class ReadFlowMeasurementFeatureMap : public ReadAttribute { public: - ReadTemperatureMeasurementFeatureMap() + ReadFlowMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTemperatureMeasurementFeatureMap() + ~ReadFlowMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement FeatureMap read Error", error); + LogNSError("FlowMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101591,25 +116885,25 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementFeatureMap() + SubscribeAttributeFlowMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureMeasurementFeatureMap() + ~SubscribeAttributeFlowMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101623,7 +116917,7 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101639,32 +116933,32 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri /* * Attribute ClusterRevision */ -class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { +class ReadFlowMeasurementClusterRevision : public ReadAttribute { public: - ReadTemperatureMeasurementClusterRevision() + ReadFlowMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTemperatureMeasurementClusterRevision() + ~ReadFlowMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureMeasurement ClusterRevision read Error", error); + LogNSError("FlowMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101673,25 +116967,25 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementClusterRevision() + SubscribeAttributeFlowMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureMeasurementClusterRevision() + ~SubscribeAttributeFlowMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101705,7 +116999,7 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101719,7 +117013,7 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe }; /*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | +| Cluster RelativeHumidityMeasurement | 0x0405 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -101728,11 +117022,6 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | | * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -101746,32 +117035,32 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe /* * Attribute MeasuredValue */ -class ReadPressureMeasurementMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { public: - ReadPressureMeasurementMeasuredValue() + ReadRelativeHumidityMeasurementMeasuredValue() : ReadAttribute("measured-value") { } - ~ReadPressureMeasurementMeasuredValue() + ~ReadRelativeHumidityMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement MeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101780,25 +117069,25 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMeasuredValue() + SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePressureMeasurementMeasuredValue() + ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101812,7 +117101,7 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101828,32 +117117,32 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri /* * Attribute MinMeasuredValue */ -class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPressureMeasurementMinMeasuredValue() + ReadRelativeHumidityMeasurementMinMeasuredValue() : ReadAttribute("min-measured-value") { } - ~ReadPressureMeasurementMinMeasuredValue() + ~ReadRelativeHumidityMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement MinMeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101862,25 +117151,25 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMinMeasuredValue() + SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePressureMeasurementMinMeasuredValue() + ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101894,7 +117183,7 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101910,32 +117199,32 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt /* * Attribute MaxMeasuredValue */ -class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPressureMeasurementMaxMeasuredValue() + ReadRelativeHumidityMeasurementMaxMeasuredValue() : ReadAttribute("max-measured-value") { } - ~ReadPressureMeasurementMaxMeasuredValue() + ~ReadRelativeHumidityMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101944,25 +117233,25 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMaxMeasuredValue() + SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePressureMeasurementMaxMeasuredValue() + ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101976,7 +117265,7 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101992,32 +117281,32 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt /* * Attribute Tolerance */ -class ReadPressureMeasurementTolerance : public ReadAttribute { +class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { public: - ReadPressureMeasurementTolerance() + ReadRelativeHumidityMeasurementTolerance() : ReadAttribute("tolerance") { } - ~ReadPressureMeasurementTolerance() + ~ReadRelativeHumidityMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement Tolerance read Error", error); + LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102026,25 +117315,25 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementTolerance() + SubscribeAttributeRelativeHumidityMeasurementTolerance() : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePressureMeasurementTolerance() + ~SubscribeAttributeRelativeHumidityMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102058,7 +117347,7 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102072,34 +117361,34 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute }; /* - * Attribute ScaledValue + * Attribute GeneratedCommandList */ -class ReadPressureMeasurementScaledValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPressureMeasurementScaledValue() - : ReadAttribute("scaled-value") + ReadRelativeHumidityMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPressureMeasurementScaledValue() + ~ReadRelativeHumidityMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement ScaledValue read Error", error); + LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102108,25 +117397,25 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScaledValue() - : SubscribeAttribute("scaled-value") + SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePressureMeasurementScaledValue() + ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102137,10 +117426,10 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102154,34 +117443,34 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu }; /* - * Attribute MinScaledValue + * Attribute AcceptedCommandList */ -class ReadPressureMeasurementMinScaledValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPressureMeasurementMinScaledValue() - : ReadAttribute("min-scaled-value") + ReadRelativeHumidityMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPressureMeasurementMinScaledValue() + ~ReadRelativeHumidityMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement MinScaledValue read Error", error); + LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102190,25 +117479,25 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMinScaledValue() - : SubscribeAttribute("min-scaled-value") + SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePressureMeasurementMinScaledValue() + ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102219,10 +117508,10 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinScaledValueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102235,35 +117524,37 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxScaledValue + * Attribute EventList */ -class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { public: - ReadPressureMeasurementMaxScaledValue() - : ReadAttribute("max-scaled-value") + ReadRelativeHumidityMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPressureMeasurementMaxScaledValue() + ~ReadRelativeHumidityMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement MaxScaledValue read Error", error); + LogNSError("RelativeHumidityMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102272,25 +117563,25 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMaxScaledValue() - : SubscribeAttribute("max-scaled-value") + SubscribeAttributeRelativeHumidityMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePressureMeasurementMaxScaledValue() + ~SubscribeAttributeRelativeHumidityMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102301,10 +117592,10 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxScaledValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102317,35 +117608,37 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ScaledTolerance + * Attribute AttributeList */ -class ReadPressureMeasurementScaledTolerance : public ReadAttribute { +class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { public: - ReadPressureMeasurementScaledTolerance() - : ReadAttribute("scaled-tolerance") + ReadRelativeHumidityMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPressureMeasurementScaledTolerance() + ~ReadRelativeHumidityMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement ScaledTolerance read Error", error); + LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102354,25 +117647,25 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScaledTolerance() - : SubscribeAttribute("scaled-tolerance") + SubscribeAttributeRelativeHumidityMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePressureMeasurementScaledTolerance() + ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102383,10 +117676,10 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledToleranceWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102400,34 +117693,34 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt }; /* - * Attribute Scale + * Attribute FeatureMap */ -class ReadPressureMeasurementScale : public ReadAttribute { +class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { public: - ReadPressureMeasurementScale() - : ReadAttribute("scale") + ReadRelativeHumidityMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPressureMeasurementScale() + ~ReadRelativeHumidityMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement Scale read Error", error); + LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102436,25 +117729,25 @@ class ReadPressureMeasurementScale : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScale() - : SubscribeAttribute("scale") + SubscribeAttributeRelativeHumidityMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePressureMeasurementScale() + ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102465,10 +117758,10 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaleWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102482,34 +117775,34 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { public: - ReadPressureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRelativeHumidityMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPressureMeasurementGeneratedCommandList() + ~ReadRelativeHumidityMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement GeneratedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102518,25 +117811,25 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRelativeHumidityMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePressureMeasurementGeneratedCommandList() + ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102547,10 +117840,10 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102563,35 +117856,63 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri } }; +/*----------------------------------------------------------------------------*\ +| Cluster OccupancySensing | 0x0406 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * PIROccupiedToUnoccupiedDelay | 0x0010 | +| * PIRUnoccupiedToOccupiedDelay | 0x0011 | +| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AcceptedCommandList + * Attribute Occupancy */ -class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingOccupancy : public ReadAttribute { public: - ReadPressureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOccupancySensingOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPressureMeasurementAcceptedCommandList() + ~ReadOccupancySensingOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement AcceptedCommandList read Error", error); + LogNSError("OccupancySensing Occupancy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102600,25 +117921,25 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOccupancySensingOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePressureMeasurementAcceptedCommandList() + ~SubscribeAttributeOccupancySensingOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102629,10 +117950,10 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102645,37 +117966,35 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute OccupancySensorType */ -class ReadPressureMeasurementEventList : public ReadAttribute { +class ReadOccupancySensingOccupancySensorType : public ReadAttribute { public: - ReadPressureMeasurementEventList() - : ReadAttribute("event-list") + ReadOccupancySensingOccupancySensorType() + : ReadAttribute("occupancy-sensor-type") { } - ~ReadPressureMeasurementEventList() + ~ReadOccupancySensingOccupancySensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement EventList read Error", error); + LogNSError("OccupancySensing OccupancySensorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102684,25 +118003,25 @@ class ReadPressureMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOccupancySensingOccupancySensorType() + : SubscribeAttribute("occupancy-sensor-type") { } - ~SubscribeAttributePressureMeasurementEventList() + ~SubscribeAttributeOccupancySensingOccupancySensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102713,10 +118032,10 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOccupancySensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102729,37 +118048,35 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute OccupancySensorTypeBitmap */ -class ReadPressureMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { public: - ReadPressureMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadOccupancySensingOccupancySensorTypeBitmap() + : ReadAttribute("occupancy-sensor-type-bitmap") { } - ~ReadPressureMeasurementAttributeList() + ~ReadOccupancySensingOccupancySensorTypeBitmap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102768,25 +118085,25 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() + : SubscribeAttribute("occupancy-sensor-type-bitmap") { } - ~SubscribeAttributePressureMeasurementAttributeList() + ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102797,10 +118114,10 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102814,34 +118131,34 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute PIROccupiedToUnoccupiedDelay */ -class ReadPressureMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadOccupancySensingPIROccupiedToUnoccupiedDelay() + : ReadAttribute("piroccupied-to-unoccupied-delay") { } - ~ReadPressureMeasurementFeatureMap() + ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102850,25 +118167,66 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { +class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributePressureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + WriteOccupancySensingPIROccupiedToUnoccupiedDelay() + : WriteAttribute("piroccupied-to-unoccupied-delay") { + AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementFeatureMap() + ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + : SubscribeAttribute("piroccupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102879,10 +118237,10 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102896,34 +118254,34 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute PIRUnoccupiedToOccupiedDelay */ -class ReadPressureMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() + : ReadAttribute("pirunoccupied-to-occupied-delay") { } - ~ReadPressureMeasurementClusterRevision() + ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PressureMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102932,25 +118290,66 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributePressureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() + : WriteAttribute("pirunoccupied-to-occupied-delay") { + AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementClusterRevision() + ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + : SubscribeAttribute("pirunoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102961,10 +118360,10 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102977,55 +118376,35 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute PIRUnoccupiedToOccupiedThreshold */ -class ReadFlowMeasurementMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadFlowMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : ReadAttribute("pirunoccupied-to-occupied-threshold") { } - ~ReadFlowMeasurementMeasuredValue() + ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement MeasuredValue read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103034,25 +118413,66 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : WriteAttribute("pirunoccupied-to-occupied-threshold") + { + AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() { } - ~SubscribeAttributeFlowMeasurementMeasuredValue() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103063,10 +118483,10 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103080,34 +118500,34 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute }; /* - * Attribute MinMeasuredValue + * Attribute UltrasonicOccupiedToUnoccupiedDelay */ -class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") { } - ~ReadFlowMeasurementMinMeasuredValue() + ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement MinMeasuredValue read Error", error); + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103116,25 +118536,66 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementMinMeasuredValue() + ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103145,10 +118606,10 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103162,34 +118623,34 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib }; /* - * Attribute MaxMeasuredValue + * Attribute UltrasonicUnoccupiedToOccupiedDelay */ -class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") { } - ~ReadFlowMeasurementMaxMeasuredValue() + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103198,25 +118659,66 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103227,10 +118729,10 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103244,34 +118746,34 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib }; /* - * Attribute Tolerance + * Attribute UltrasonicUnoccupiedToOccupiedThreshold */ -class ReadFlowMeasurementTolerance : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadFlowMeasurementTolerance() - : ReadAttribute("tolerance") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") { } - ~ReadFlowMeasurementTolerance() + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement Tolerance read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103280,25 +118782,66 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementTolerance() - : SubscribeAttribute("tolerance") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementTolerance() + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103309,10 +118852,10 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103326,34 +118869,34 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute PhysicalContactOccupiedToUnoccupiedDelay */ -class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") { } - ~ReadFlowMeasurementGeneratedCommandList() + ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement GeneratedCommandList read Error", error); + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103362,25 +118905,66 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementGeneratedCommandList() + ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103391,10 +118975,10 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103408,34 +118992,34 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute PhysicalContactUnoccupiedToOccupiedDelay */ -class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") { } - ~ReadFlowMeasurementAcceptedCommandList() + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement AcceptedCommandList read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103444,25 +119028,66 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementAcceptedCommandList() + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103473,10 +119098,10 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103489,64 +119114,103 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute PhysicalContactUnoccupiedToOccupiedThreshold */ -class ReadFlowMeasurementEventList : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadFlowMeasurementEventList() - : ReadAttribute("event-list") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") { } - ~ReadFlowMeasurementEventList() + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement EventList read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { +public: + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") + { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") { } - ~SubscribeAttributeFlowMeasurementEventList() + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103557,10 +119221,10 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103573,37 +119237,35 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadFlowMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { public: - ReadFlowMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadOccupancySensingGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFlowMeasurementAttributeList() + ~ReadOccupancySensingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103612,25 +119274,25 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOccupancySensingGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFlowMeasurementAttributeList() + ~SubscribeAttributeOccupancySensingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103641,10 +119303,10 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103658,34 +119320,34 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadFlowMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { public: - ReadFlowMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadOccupancySensingAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFlowMeasurementFeatureMap() + ~ReadOccupancySensingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103694,25 +119356,25 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOccupancySensingAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFlowMeasurementFeatureMap() + ~SubscribeAttributeOccupancySensingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103723,10 +119385,10 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103739,35 +119401,37 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadFlowMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingEventList : public ReadAttribute { public: - ReadFlowMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOccupancySensingEventList() + : ReadAttribute("event-list") { } - ~ReadFlowMeasurementClusterRevision() + ~ReadOccupancySensingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FlowMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103776,25 +119440,25 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOccupancySensingEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFlowMeasurementClusterRevision() + ~SubscribeAttributeOccupancySensingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103805,10 +119469,10 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103821,55 +119485,37 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu } }; -/*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute AttributeList */ -class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { +class ReadOccupancySensingAttributeList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadOccupancySensingAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRelativeHumidityMeasurementMeasuredValue() + ~ReadOccupancySensingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); + LogNSError("OccupancySensing AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103878,25 +119524,25 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeOccupancySensingAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() + ~SubscribeAttributeOccupancySensingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103907,10 +119553,10 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103924,34 +119570,34 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr }; /* - * Attribute MinMeasuredValue + * Attribute FeatureMap */ -class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOccupancySensingFeatureMap : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOccupancySensingFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRelativeHumidityMeasurementMinMeasuredValue() + ~ReadOccupancySensingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); + LogNSError("OccupancySensing FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103960,25 +119606,25 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeOccupancySensingFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() + ~SubscribeAttributeOccupancySensingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103989,10 +119635,10 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104006,34 +119652,34 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub }; /* - * Attribute MaxMeasuredValue + * Attribute ClusterRevision */ -class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOccupancySensingClusterRevision : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOccupancySensingClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRelativeHumidityMeasurementMaxMeasuredValue() + ~ReadOccupancySensingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); + LogNSError("OccupancySensing ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104042,25 +119688,25 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeOccupancySensingClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() + ~SubscribeAttributeOccupancySensingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104071,10 +119717,10 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104087,35 +119733,65 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Tolerance + * Attribute MeasuredValue */ -class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadRelativeHumidityMeasurementTolerance() - : ReadAttribute("tolerance") + ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadRelativeHumidityMeasurementTolerance() + ~ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104124,25 +119800,25 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeRelativeHumidityMeasurementTolerance() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104153,10 +119829,10 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104169,35 +119845,38 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute MinMeasuredValue */ -class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadRelativeHumidityMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadRelativeHumidityMeasurementGeneratedCommandList() + ~ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104206,25 +119885,25 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104235,10 +119914,10 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104251,35 +119930,38 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute MaxMeasuredValue */ -class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadRelativeHumidityMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadRelativeHumidityMeasurementAcceptedCommandList() + ~ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104288,25 +119970,25 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104317,10 +119999,10 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104333,37 +120015,38 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValue */ -class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadRelativeHumidityMeasurementEventList() - : ReadAttribute("event-list") + ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadRelativeHumidityMeasurementEventList() + ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement EventList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104372,25 +120055,25 @@ class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeRelativeHumidityMeasurementEventList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104401,10 +120084,10 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104418,36 +120101,37 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute PeakMeasuredValueWindow */ -class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadRelativeHumidityMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadRelativeHumidityMeasurementAttributeList() + ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104456,25 +120140,25 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104485,10 +120169,10 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104501,35 +120185,38 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute AverageMeasuredValue */ -class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadRelativeHumidityMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadRelativeHumidityMeasurementFeatureMap() + ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104538,25 +120225,25 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104567,10 +120254,10 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104583,35 +120270,38 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AverageMeasuredValueWindow */ -class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadRelativeHumidityMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadRelativeHumidityMeasurementClusterRevision() + ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104620,25 +120310,25 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104649,10 +120339,10 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104665,63 +120355,38 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * PIROccupiedToUnoccupiedDelay | 0x0010 | -| * PIRUnoccupiedToOccupiedDelay | 0x0011 | -| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute Occupancy + * Attribute Uncertainty */ -class ReadOccupancySensingOccupancy : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadOccupancySensingOccupancy() - : ReadAttribute("occupancy") + ReadCarbonMonoxideConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadOccupancySensingOccupancy() + ~ReadCarbonMonoxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing Occupancy read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104730,25 +120395,25 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancy() - : SubscribeAttribute("occupancy") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeOccupancySensingOccupancy() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104759,10 +120424,10 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancyWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104775,35 +120440,38 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OccupancySensorType + * Attribute MeasurementUnit */ -class ReadOccupancySensingOccupancySensorType : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadOccupancySensingOccupancySensorType() - : ReadAttribute("occupancy-sensor-type") + ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadOccupancySensingOccupancySensorType() + ~ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing OccupancySensorType read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104812,25 +120480,25 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorType() - : SubscribeAttribute("occupancy-sensor-type") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeOccupancySensingOccupancySensorType() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104841,10 +120509,10 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancySensorTypeWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104857,35 +120525,38 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OccupancySensorTypeBitmap + * Attribute MeasurementMedium */ -class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadOccupancySensingOccupancySensorTypeBitmap() - : ReadAttribute("occupancy-sensor-type-bitmap") + ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadOccupancySensingOccupancySensorTypeBitmap() + ~ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104894,25 +120565,25 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() - : SubscribeAttribute("occupancy-sensor-type-bitmap") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104923,10 +120594,10 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104939,103 +120610,65 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PIROccupiedToUnoccupiedDelay + * Attribute LevelValue */ -class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadOccupancySensingPIROccupiedToUnoccupiedDelay() - : ReadAttribute("piroccupied-to-unoccupied-delay") + ReadCarbonMonoxideConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() + ~ReadCarbonMonoxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - : WriteAttribute("piroccupied-to-unoccupied-delay") - { - AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() - : SubscribeAttribute("piroccupied-to-unoccupied-delay") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105046,10 +120679,10 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105062,103 +120695,65 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PIRUnoccupiedToOccupiedDelay + * Attribute GeneratedCommandList */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() - : ReadAttribute("pirunoccupied-to-occupied-delay") + ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() + ~ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - : WriteAttribute("pirunoccupied-to-occupied-delay") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() - : SubscribeAttribute("pirunoccupied-to-occupied-delay") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105169,10 +120764,10 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105185,103 +120780,65 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PIRUnoccupiedToOccupiedThreshold + * Attribute AcceptedCommandList */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : ReadAttribute("pirunoccupied-to-occupied-threshold") + ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() + ~ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : WriteAttribute("pirunoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold write Error", error); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105292,10 +120849,10 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105308,103 +120865,65 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UltrasonicOccupiedToUnoccupiedDelay + * Attribute EventList */ -class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") + ReadCarbonMonoxideConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + ~ReadCarbonMonoxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105415,10 +120934,10 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105431,103 +120950,65 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UltrasonicUnoccupiedToOccupiedDelay + * Attribute AttributeList */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") + ReadCarbonMonoxideConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + ~ReadCarbonMonoxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105538,10 +121019,10 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105554,103 +121035,65 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UltrasonicUnoccupiedToOccupiedThreshold + * Attribute FeatureMap */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") + ReadCarbonMonoxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + ~ReadCarbonMonoxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105661,10 +121104,10 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105677,103 +121120,65 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PhysicalContactOccupiedToUnoccupiedDelay + * Attribute ClusterRevision */ -class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") + ReadCarbonMonoxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + ~ReadCarbonMonoxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay write Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105784,10 +121189,10 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105800,103 +121205,94 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PhysicalContactUnoccupiedToOccupiedDelay + * Attribute MeasuredValue */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") + ReadCarbonDioxideConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + ~ReadCarbonDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay write Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105907,10 +121303,10 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105923,103 +121319,65 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PhysicalContactUnoccupiedToOccupiedThreshold + * Attribute MinMeasuredValue */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") + ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + ~ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold write Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106030,10 +121388,10 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106046,35 +121404,38 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadOccupancySensingGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadOccupancySensingGeneratedCommandList() + ~ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing GeneratedCommandList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106083,25 +121444,25 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeOccupancySensingGeneratedCommandList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106112,10 +121473,10 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106128,35 +121489,38 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadOccupancySensingAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadOccupancySensingAcceptedCommandList() + ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing AcceptedCommandList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106165,25 +121529,25 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeOccupancySensingAcceptedCommandList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106194,10 +121558,10 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106210,37 +121574,38 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadOccupancySensingEventList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadOccupancySensingEventList() - : ReadAttribute("event-list") + ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadOccupancySensingEventList() + ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing EventList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106249,25 +121614,25 @@ class ReadOccupancySensingEventList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeOccupancySensingEventList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106278,10 +121643,10 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106295,36 +121660,37 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadOccupancySensingAttributeList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadOccupancySensingAttributeList() - : ReadAttribute("attribute-list") + ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadOccupancySensingAttributeList() + ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing AttributeList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106333,25 +121699,25 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeOccupancySensingAttributeList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106362,10 +121728,10 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106378,35 +121744,38 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadOccupancySensingFeatureMap : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadOccupancySensingFeatureMap() - : ReadAttribute("feature-map") + ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadOccupancySensingFeatureMap() + ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing FeatureMap read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106415,25 +121784,25 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeOccupancySensingFeatureMap() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106444,10 +121813,10 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106460,35 +121829,38 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadOccupancySensingClusterRevision : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadOccupancySensingClusterRevision() - : ReadAttribute("cluster-revision") + ReadCarbonDioxideConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadOccupancySensingClusterRevision() + ~ReadCarbonDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing ClusterRevision read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106497,25 +121869,25 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeOccupancySensingClusterRevision() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106526,10 +121898,10 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106542,65 +121914,38 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() + ~ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106609,25 +121954,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106638,10 +121983,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106658,34 +122003,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + ~ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106694,25 +122039,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106723,10 +122068,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106743,34 +122088,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadCarbonDioxideConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + ~ReadCarbonDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106779,25 +122124,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106808,10 +122153,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106828,34 +122173,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + ~ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106864,25 +122209,25 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadA } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106893,10 +122238,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106913,34 +122258,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { -public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") +class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +public: + ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106949,25 +122294,25 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106978,10 +122323,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106998,34 +122343,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadCarbonDioxideConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + ~ReadCarbonDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107034,25 +122379,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107063,10 +122408,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107083,34 +122428,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadCarbonDioxideConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadCarbonDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107119,25 +122464,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107148,10 +122493,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107168,34 +122513,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadCarbonDioxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadCarbonMonoxideConcentrationMeasurementUncertainty() + ~ReadCarbonDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107204,25 +122549,25 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107233,10 +122578,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107253,34 +122598,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadCarbonDioxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() + ~ReadCarbonDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107289,25 +122634,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAtt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107318,10 +122663,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107335,37 +122680,66 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() + ~ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107374,25 +122748,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107403,10 +122777,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107423,34 +122797,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementLevelValue() + ~ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107459,25 +122833,25 @@ class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribut } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107488,10 +122862,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107508,34 +122882,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107544,25 +122918,25 @@ class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public Re } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107573,10 +122947,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107593,34 +122967,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107629,25 +123003,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public Rea } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107658,10 +123032,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107678,34 +123052,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadCarbonMonoxideConcentrationMeasurementEventList() + ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107714,25 +123088,25 @@ class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107743,10 +123117,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107763,34 +123137,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadCarbonMonoxideConcentrationMeasurementAttributeList() + ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107799,25 +123173,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttri } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107828,10 +123202,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107848,34 +123222,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadCarbonMonoxideConcentrationMeasurementFeatureMap() + ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107884,25 +123258,25 @@ class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribut } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107913,10 +123287,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107933,34 +123307,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadNitrogenDioxideConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadCarbonMonoxideConcentrationMeasurementClusterRevision() + ~ReadNitrogenDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107969,25 +123343,25 @@ class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAtt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107998,10 +123372,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108015,66 +123389,37 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasuredValue() + ~ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108083,25 +123428,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttrib } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108112,10 +123457,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108132,34 +123477,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() + ~ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108168,25 +123513,25 @@ class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAtt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108197,10 +123542,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108217,34 +123562,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadNitrogenDioxideConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + ~ReadNitrogenDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108253,25 +123598,25 @@ class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAtt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108282,10 +123627,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108302,34 +123647,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + ~ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108338,25 +123683,25 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108367,10 +123712,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108387,34 +123732,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108423,25 +123768,25 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108452,10 +123797,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108472,34 +123817,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadNitrogenDioxideConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + ~ReadNitrogenDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108508,25 +123853,25 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108537,10 +123882,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108557,34 +123902,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadNitrogenDioxideConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadNitrogenDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108593,25 +123938,25 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108622,10 +123967,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108642,34 +123987,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadNitrogenDioxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadCarbonDioxideConcentrationMeasurementUncertainty() + ~ReadNitrogenDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108678,25 +124023,25 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108707,10 +124052,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108727,34 +124072,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadNitrogenDioxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() + ~ReadNitrogenDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108763,25 +124108,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108792,10 +124137,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108809,37 +124154,66 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OzoneConcentrationMeasurement | 0x0415 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadOzoneConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() + ~ReadOzoneConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108848,25 +124222,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108877,10 +124251,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108897,34 +124271,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadOzoneConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadCarbonDioxideConcentrationMeasurementLevelValue() + ~ReadOzoneConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108933,25 +124307,25 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() + ~SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -108962,10 +124336,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108982,34 +124356,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOzoneConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() + ~ReadOzoneConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109018,25 +124392,25 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109047,10 +124421,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109067,34 +124441,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOzoneConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() + ~ReadOzoneConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109103,25 +124477,25 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109132,10 +124506,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109152,34 +124526,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadCarbonDioxideConcentrationMeasurementEventList() + ~ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); + LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109188,25 +124562,25 @@ class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() + ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109217,10 +124591,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109237,34 +124611,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadOzoneConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadCarbonDioxideConcentrationMeasurementAttributeList() + ~ReadOzoneConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109273,25 +124647,25 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() + ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109302,10 +124676,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109322,34 +124696,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadCarbonDioxideConcentrationMeasurementFeatureMap() + ~ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109358,25 +124732,25 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() + ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109387,10 +124761,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109407,34 +124781,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOzoneConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadCarbonDioxideConcentrationMeasurementClusterRevision() + ~ReadOzoneConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109443,25 +124817,25 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOzoneConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() + ~SubscribeAttributeOzoneConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109472,10 +124846,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109489,66 +124863,37 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadOzoneConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() + ~ReadOzoneConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109557,25 +124902,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109586,10 +124931,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109606,34 +124951,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOzoneConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + ~ReadOzoneConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109642,25 +124987,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadA } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109671,10 +125016,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109691,34 +125036,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOzoneConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + ~ReadOzoneConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109727,25 +125072,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeOzoneConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeOzoneConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109756,10 +125101,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109776,34 +125121,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadOzoneConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + ~ReadOzoneConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109812,25 +125157,25 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109841,10 +125186,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109861,34 +125206,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadOzoneConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadOzoneConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109897,25 +125242,25 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -109926,10 +125271,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109946,34 +125291,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadOzoneConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + ~ReadOzoneConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("OzoneConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109982,25 +125327,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeOzoneConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeOzoneConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110011,10 +125356,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110031,34 +125376,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadOzoneConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadOzoneConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110067,25 +125412,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeOzoneConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeOzoneConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110096,10 +125441,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110116,34 +125461,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadOzoneConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadNitrogenDioxideConcentrationMeasurementUncertainty() + ~ReadOzoneConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110152,25 +125497,25 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() + ~SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110181,10 +125526,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110201,34 +125546,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadOzoneConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() + ~ReadOzoneConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110237,25 +125582,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110266,10 +125611,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110283,37 +125628,66 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Pm25ConcentrationMeasurement | 0x042A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadPm25ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() + ~ReadPm25ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110322,25 +125696,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110351,10 +125725,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110371,34 +125745,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadPm25ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementLevelValue() + ~ReadPm25ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110407,25 +125781,25 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() + ~SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110436,10 +125810,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110456,34 +125830,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm25ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + ~ReadPm25ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110492,25 +125866,25 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110521,10 +125895,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110541,34 +125915,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm25ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + ~ReadPm25ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110577,25 +125951,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110606,10 +125980,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110626,34 +126000,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadNitrogenDioxideConcentrationMeasurementEventList() + ~ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); + LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110662,25 +126036,25 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() + ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110691,10 +126065,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110711,34 +126085,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadPm25ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadNitrogenDioxideConcentrationMeasurementAttributeList() + ~ReadPm25ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110747,25 +126121,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() + ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110776,10 +126150,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110796,34 +126170,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadNitrogenDioxideConcentrationMeasurementFeatureMap() + ~ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110832,25 +126206,25 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() + ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110861,10 +126235,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110881,34 +126255,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm25ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadNitrogenDioxideConcentrationMeasurementClusterRevision() + ~ReadPm25ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110917,25 +126291,25 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm25ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() + ~SubscribeAttributePm25ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -110946,10 +126320,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110963,66 +126337,37 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster OzoneConcentrationMeasurement | 0x0415 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPm25ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadOzoneConcentrationMeasurementMeasuredValue() + ~ReadPm25ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111031,25 +126376,25 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() + ~SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111060,10 +126405,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111080,34 +126425,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPm25ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadOzoneConcentrationMeasurementMinMeasuredValue() + ~ReadPm25ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111116,25 +126461,25 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111145,10 +126490,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111165,34 +126510,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPm25ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadOzoneConcentrationMeasurementMaxMeasuredValue() + ~ReadPm25ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111201,25 +126546,25 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePm25ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributePm25ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111230,10 +126575,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111250,34 +126595,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadPm25ConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOzoneConcentrationMeasurementPeakMeasuredValue() + ~ReadPm25ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111286,25 +126631,25 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute } }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111315,10 +126660,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111335,34 +126680,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadPm25ConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadPm25ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111371,25 +126716,25 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111400,10 +126745,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111420,34 +126765,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadPm25ConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValue() + ~ReadPm25ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("PM25ConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111456,25 +126801,25 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributePm25ConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributePm25ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111485,10 +126830,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111505,34 +126850,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadPm25ConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadPm25ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111541,25 +126886,25 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributePm25ConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributePm25ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111570,10 +126915,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111590,34 +126935,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadPm25ConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOzoneConcentrationMeasurementUncertainty() + ~ReadPm25ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111626,25 +126971,25 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributePm25ConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOzoneConcentrationMeasurementUncertainty() + ~SubscribeAttributePm25ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111655,10 +127000,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111675,34 +127020,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadPm25ConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOzoneConcentrationMeasurementMeasurementUnit() + ~ReadPm25ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111711,25 +127056,25 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributePm25ConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributePm25ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111740,10 +127085,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111756,38 +127101,67 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster FormaldehydeConcentrationMeasurement | 0x042B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadFormaldehydeConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadOzoneConcentrationMeasurementMeasurementMedium() + ~ReadFormaldehydeConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111796,25 +127170,25 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111825,10 +127199,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111845,34 +127219,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadOzoneConcentrationMeasurementLevelValue() + ~ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111881,25 +127255,25 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementLevelValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111910,10 +127284,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111930,34 +127304,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadOzoneConcentrationMeasurementGeneratedCommandList() + ~ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111966,25 +127340,25 @@ class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -111995,10 +127369,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112015,34 +127389,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadOzoneConcentrationMeasurementAcceptedCommandList() + ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112051,25 +127425,25 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112080,10 +127454,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112100,34 +127474,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadOzoneConcentrationMeasurementEventList() + ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement EventList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112136,25 +127510,25 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeOzoneConcentrationMeasurementEventList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112165,10 +127539,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112185,34 +127559,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadOzoneConcentrationMeasurementAttributeList() + ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112221,25 +127595,25 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAttributeList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112250,10 +127624,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112270,34 +127644,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadOzoneConcentrationMeasurementFeatureMap() + ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112306,25 +127680,25 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112335,10 +127709,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112355,34 +127729,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadFormaldehydeConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadOzoneConcentrationMeasurementClusterRevision() + ~ReadFormaldehydeConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112391,25 +127765,25 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112420,10 +127794,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112437,66 +127811,37 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster Pm25ConcentrationMeasurement | 0x042A | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadFormaldehydeConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadPm25ConcentrationMeasurementMeasuredValue() + ~ReadFormaldehydeConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112505,25 +127850,25 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112534,10 +127879,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112554,34 +127899,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadFormaldehydeConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadPm25ConcentrationMeasurementMinMeasuredValue() + ~ReadFormaldehydeConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112590,25 +127935,25 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112619,10 +127964,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112639,34 +127984,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadFormaldehydeConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadPm25ConcentrationMeasurementMaxMeasuredValue() + ~ReadFormaldehydeConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112675,25 +128020,25 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112704,10 +128049,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112724,34 +128069,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValue() + ~ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112760,25 +128105,25 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112789,10 +128134,10 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112809,34 +128154,34 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112845,25 +128190,25 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112874,10 +128219,10 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112894,34 +128239,34 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadFormaldehydeConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValue() + ~ReadFormaldehydeConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112930,25 +128275,25 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112959,10 +128304,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112979,34 +128324,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadFormaldehydeConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadFormaldehydeConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113015,25 +128360,25 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113044,10 +128389,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113064,34 +128409,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadFormaldehydeConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm25ConcentrationMeasurementUncertainty() + ~ReadFormaldehydeConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113100,25 +128445,25 @@ class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm25ConcentrationMeasurementUncertainty() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113129,10 +128474,10 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113149,34 +128494,34 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadFormaldehydeConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm25ConcentrationMeasurementMeasurementUnit() + ~ReadFormaldehydeConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113185,25 +128530,25 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113214,10 +128559,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113231,37 +128576,66 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Pm1ConcentrationMeasurement | 0x042C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadPm1ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm25ConcentrationMeasurementMeasurementMedium() + ~ReadPm1ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113270,25 +128644,25 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113299,10 +128673,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113319,34 +128693,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadPm1ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm25ConcentrationMeasurementLevelValue() + ~ReadPm1ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113355,25 +128729,25 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementLevelValue() + ~SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113384,10 +128758,10 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113404,34 +128778,34 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm1ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm25ConcentrationMeasurementGeneratedCommandList() + ~ReadPm1ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113440,25 +128814,25 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113469,10 +128843,10 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113489,34 +128863,34 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm1ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadPm25ConcentrationMeasurementAcceptedCommandList() + ~ReadPm1ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113525,25 +128899,25 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113554,10 +128928,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113574,34 +128948,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadPm25ConcentrationMeasurementEventList() + ~ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113610,25 +128984,25 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributePm25ConcentrationMeasurementEventList() + ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113639,10 +129013,10 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113659,34 +129033,34 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadPm1ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadPm25ConcentrationMeasurementAttributeList() + ~ReadPm1ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113695,25 +129069,25 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementAttributeList() + ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113724,10 +129098,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113744,34 +129118,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadPm25ConcentrationMeasurementFeatureMap() + ~ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113780,25 +129154,25 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributePm25ConcentrationMeasurementFeatureMap() + ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113809,10 +129183,10 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113829,34 +129203,34 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm1ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadPm25ConcentrationMeasurementClusterRevision() + ~ReadPm1ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113865,25 +129239,25 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm1ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributePm25ConcentrationMeasurementClusterRevision() + ~SubscribeAttributePm1ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113894,10 +129268,10 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113911,66 +129285,37 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster FormaldehydeConcentrationMeasurement | 0x042B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPm1ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadFormaldehydeConcentrationMeasurementMeasuredValue() + ~ReadPm1ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113979,25 +129324,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() + ~SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114008,10 +129353,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114028,34 +129373,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPm1ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() + ~ReadPm1ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114064,25 +129409,25 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114093,10 +129438,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114113,34 +129458,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPm1ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() + ~ReadPm1ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114149,25 +129494,25 @@ class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttr } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePm1ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributePm1ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114178,10 +129523,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114198,34 +129543,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadPm1ConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() + ~ReadPm1ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114234,25 +129579,25 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114263,10 +129608,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114283,34 +129628,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadPm1ConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadPm1ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114319,25 +129664,25 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114348,10 +129693,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114368,34 +129713,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadPm1ConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() + ~ReadPm1ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("PM1ConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114404,25 +129749,25 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributePm1ConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributePm1ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114433,10 +129778,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114453,34 +129798,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadPm1ConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadPm1ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114489,25 +129834,25 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributePm1ConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributePm1ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114518,10 +129863,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114538,34 +129883,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadPm1ConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadFormaldehydeConcentrationMeasurementUncertainty() + ~ReadPm1ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); + LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114574,25 +129919,25 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributePm1ConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() + ~SubscribeAttributePm1ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114603,10 +129948,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114623,34 +129968,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadPm1ConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementUnit() + ~ReadPm1ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114659,25 +130004,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributePm1ConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributePm1ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114688,10 +130033,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114705,37 +130050,66 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Pm10ConcentrationMeasurement | 0x042D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadPm10ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementMedium() + ~ReadPm10ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114744,25 +130118,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114773,10 +130147,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114793,34 +130167,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadPm10ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementLevelValue() + ~ReadPm10ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); + LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114829,25 +130203,25 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() + ~SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114858,10 +130232,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114878,34 +130252,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm10ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() + ~ReadPm10ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114914,25 +130288,25 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114943,10 +130317,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114963,34 +130337,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm10ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() + ~ReadPm10ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114999,25 +130373,25 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115028,10 +130402,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115048,34 +130422,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadFormaldehydeConcentrationMeasurementEventList() + ~ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); + LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115084,25 +130458,25 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() + ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115113,10 +130487,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115133,34 +130507,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadPm10ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementAttributeList() + ~ReadPm10ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); + LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115169,25 +130543,25 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() + ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115198,10 +130572,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115218,34 +130592,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadFormaldehydeConcentrationMeasurementFeatureMap() + ~ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); + LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115254,25 +130628,25 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() + ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115283,10 +130657,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115303,34 +130677,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm10ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadFormaldehydeConcentrationMeasurementClusterRevision() + ~ReadPm10ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115339,25 +130713,25 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm10ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() + ~SubscribeAttributePm10ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115368,10 +130742,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115385,66 +130759,37 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster Pm1ConcentrationMeasurement | 0x042C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPm10ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadPm1ConcentrationMeasurementMeasuredValue() + ~ReadPm10ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115453,25 +130798,25 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() + ~SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115482,10 +130827,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115502,34 +130847,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPm10ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadPm1ConcentrationMeasurementMinMeasuredValue() + ~ReadPm10ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115538,25 +130883,25 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115567,10 +130912,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115587,34 +130932,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPm10ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadPm1ConcentrationMeasurementMaxMeasuredValue() + ~ReadPm10ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115623,25 +130968,25 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePm10ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributePm10ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115652,10 +130997,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115672,34 +131017,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadPm10ConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValue() + ~ReadPm10ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115708,25 +131053,25 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115737,10 +131082,10 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115757,34 +131102,34 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadPm10ConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadPm10ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115793,25 +131138,25 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115822,10 +131167,10 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115842,34 +131187,34 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadPm10ConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValue() + ~ReadPm10ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("PM10ConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115878,25 +131223,25 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributePm10ConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributePm10ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115907,10 +131252,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -115927,34 +131272,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadPm10ConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadPm10ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -115963,25 +131308,25 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributePm10ConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributePm10ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -115992,10 +131337,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116012,34 +131357,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadPm10ConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm1ConcentrationMeasurementUncertainty() + ~ReadPm10ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116048,25 +131393,25 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributePm10ConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm1ConcentrationMeasurementUncertainty() + ~SubscribeAttributePm10ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116077,10 +131422,10 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116097,34 +131442,34 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadPm10ConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm1ConcentrationMeasurementMeasurementUnit() + ~ReadPm10ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116133,25 +131478,25 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributePm10ConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributePm10ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116162,10 +131507,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116179,37 +131524,66 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm1ConcentrationMeasurementMeasurementMedium() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116218,25 +131592,25 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116247,10 +131621,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116267,34 +131641,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm1ConcentrationMeasurementLevelValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116303,25 +131677,25 @@ class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementLevelValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116332,10 +131706,10 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116352,34 +131726,34 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm1ConcentrationMeasurementGeneratedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116388,25 +131762,25 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116417,10 +131791,10 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116437,34 +131811,34 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadPm1ConcentrationMeasurementAcceptedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116473,25 +131847,25 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116502,10 +131876,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116522,34 +131896,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadPm1ConcentrationMeasurementEventList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement EventList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116558,25 +131932,25 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributePm1ConcentrationMeasurementEventList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116587,10 +131961,10 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116607,34 +131981,34 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadPm1ConcentrationMeasurementAttributeList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116643,25 +132017,25 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementAttributeList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116672,10 +132046,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116692,34 +132066,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadPm1ConcentrationMeasurementFeatureMap() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116728,25 +132102,25 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributePm1ConcentrationMeasurementFeatureMap() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116757,10 +132131,10 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116777,34 +132151,34 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadPm1ConcentrationMeasurementClusterRevision() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116813,25 +132187,25 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributePm1ConcentrationMeasurementClusterRevision() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116842,10 +132216,10 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116854,71 +132228,42 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs SetCommandExitStatus(error); }]; - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster Pm10ConcentrationMeasurement | 0x042D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadPm10ConcentrationMeasurementMeasuredValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -116927,25 +132272,25 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -116956,10 +132301,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -116976,34 +132321,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadPm10ConcentrationMeasurementMinMeasuredValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117012,25 +132357,25 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117041,10 +132386,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117061,34 +132406,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadPm10ConcentrationMeasurementMaxMeasuredValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117097,25 +132442,25 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117126,10 +132471,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117146,34 +132491,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117182,25 +132527,25 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117211,10 +132556,10 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117231,34 +132576,34 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117267,25 +132612,25 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117296,10 +132641,10 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117316,34 +132661,34 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValue() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117352,25 +132697,25 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117381,10 +132726,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117401,34 +132746,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117437,25 +132782,25 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117466,10 +132811,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117486,34 +132831,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm10ConcentrationMeasurementUncertainty() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117522,25 +132867,25 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm10ConcentrationMeasurementUncertainty() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117551,10 +132896,10 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117571,34 +132916,34 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm10ConcentrationMeasurementMeasurementUnit() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117607,25 +132952,25 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117636,10 +132981,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117653,37 +132998,66 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RadonConcentrationMeasurement | 0x042F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadRadonConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm10ConcentrationMeasurementMeasurementMedium() + ~ReadRadonConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117692,25 +133066,25 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117721,10 +133095,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117741,34 +133115,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadRadonConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm10ConcentrationMeasurementLevelValue() + ~ReadRadonConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); + LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117777,25 +133151,25 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementLevelValue() + ~SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117806,10 +133180,10 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117826,34 +133200,34 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRadonConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm10ConcentrationMeasurementGeneratedCommandList() + ~ReadRadonConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117862,25 +133236,25 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117891,10 +133265,10 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117911,34 +133285,34 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValue */ -class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRadonConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadPm10ConcentrationMeasurementAcceptedCommandList() + ~ReadRadonConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -117947,25 +133321,25 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -117976,10 +133350,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -117996,34 +133370,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute PeakMeasuredValueWindow */ -class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { +class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadPm10ConcentrationMeasurementEventList() + ~ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement EventList read Error", error); + LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118032,25 +133406,25 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributePm10ConcentrationMeasurementEventList() + ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118061,10 +133435,10 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118081,34 +133455,34 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AverageMeasuredValue */ -class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadRadonConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadPm10ConcentrationMeasurementAttributeList() + ~ReadRadonConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); + LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118117,25 +133491,25 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementAttributeList() + ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118146,10 +133520,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118166,34 +133540,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AverageMeasuredValueWindow */ -class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadPm10ConcentrationMeasurementFeatureMap() + ~ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118202,25 +133576,25 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributePm10ConcentrationMeasurementFeatureMap() + ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118231,10 +133605,10 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118251,34 +133625,34 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Uncertainty */ -class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadRadonConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadPm10ConcentrationMeasurementClusterRevision() + ~ReadRadonConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118287,25 +133661,25 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRadonConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributePm10ConcentrationMeasurementClusterRevision() + ~SubscribeAttributeRadonConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::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); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118316,10 +133690,10 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118333,66 +133707,37 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute MeasurementUnit */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadRadonConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + ~ReadRadonConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118401,25 +133746,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : p } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118430,10 +133775,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118450,34 +133795,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinMeasuredValue + * Attribute MeasurementMedium */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadRadonConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + ~ReadRadonConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118486,25 +133831,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118515,10 +133860,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118535,34 +133880,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxMeasuredValue + * Attribute LevelValue */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadRadonConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + ~ReadRadonConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118571,25 +133916,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeRadonConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeRadonConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118600,10 +133945,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118620,34 +133965,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadRadonConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + ~ReadRadonConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118656,25 +134001,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118685,10 +134030,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118705,34 +134050,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea #if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadRadonConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadRadonConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118741,25 +134086,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118770,10 +134115,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118790,34 +134135,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadRadonConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + ~ReadRadonConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("RadonConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118826,25 +134171,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeRadonConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeRadonConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118855,10 +134200,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118875,34 +134220,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve #if MTR_ENABLE_PROVISIONAL /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadRadonConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadRadonConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118911,25 +134256,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeRadonConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeRadonConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -118940,10 +134285,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -118960,34 +134305,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve #if MTR_ENABLE_PROVISIONAL /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadRadonConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + ~ReadRadonConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); + LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -118996,25 +134341,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeRadonConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + ~SubscribeAttributeRadonConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119025,10 +134370,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119045,34 +134390,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadRadonConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + ~ReadRadonConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119081,25 +134426,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeRadonConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeRadonConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119110,10 +134455,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119127,37 +134472,54 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster WakeOnLan | 0x0503 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MACAddress | 0x0000 | +| * LinkLocalAddress | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute MeasurementMedium + * Attribute MACAddress */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadWakeOnLanMACAddress : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadWakeOnLanMACAddress() + : ReadAttribute("macaddress") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + ~ReadWakeOnLanMACAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("WakeOnLAN MACAddress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119166,25 +134528,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeWakeOnLanMACAddress() + : SubscribeAttribute("macaddress") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeWakeOnLanMACAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119195,10 +134557,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMACAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119211,38 +134573,37 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute LinkLocalAddress */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadWakeOnLanLinkLocalAddress() + : ReadAttribute("link-local-address") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + ~ReadWakeOnLanLinkLocalAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLinkLocalAddressWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + LogNSError("WakeOnLAN LinkLocalAddress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119251,25 +134612,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeWakeOnLanLinkLocalAddress() + : SubscribeAttribute("link-local-address") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + ~SubscribeAttributeWakeOnLanLinkLocalAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119280,10 +134641,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeLinkLocalAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119297,37 +134658,36 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ReadWakeOnLanGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ~ReadWakeOnLanGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("WakeOnLAN GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119336,25 +134696,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + SubscribeAttributeWakeOnLanGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeWakeOnLanGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119368,7 +134728,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119381,38 +134741,35 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ReadWakeOnLanAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ~ReadWakeOnLanAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("WakeOnLAN AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119421,25 +134778,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + SubscribeAttributeWakeOnLanAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeWakeOnLanAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119453,7 +134810,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119466,38 +134823,37 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public ReadAttribute { +class ReadWakeOnLanEventList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ReadWakeOnLanEventList() : ReadAttribute("event-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ~ReadWakeOnLanEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"WakeOnLAN.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); + LogNSError("WakeOnLAN EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119506,25 +134862,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + SubscribeAttributeWakeOnLanEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ~SubscribeAttributeWakeOnLanEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119538,7 +134894,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"WakeOnLAN.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119552,37 +134908,36 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadWakeOnLanAttributeList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ReadWakeOnLanAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ~ReadWakeOnLanAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); + LogNSError("WakeOnLAN AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119591,25 +134946,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + SubscribeAttributeWakeOnLanAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ~SubscribeAttributeWakeOnLanAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119623,7 +134978,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119636,38 +134991,35 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadWakeOnLanFeatureMap : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ReadWakeOnLanFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ~ReadWakeOnLanFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); + LogNSError("WakeOnLAN FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119676,25 +135028,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + SubscribeAttributeWakeOnLanFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ~SubscribeAttributeWakeOnLanFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119708,7 +135060,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119721,38 +135073,35 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadWakeOnLanClusterRevision : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ReadWakeOnLanClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ~ReadWakeOnLanClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("WakeOnLAN ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -119761,25 +135110,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + SubscribeAttributeWakeOnLanClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ~SubscribeAttributeWakeOnLanClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -119793,7 +135142,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -119806,26 +135155,21 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RadonConcentrationMeasurement | 0x042F | +| Cluster Channel | 0x0504 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x02 | +| * SkipChannel | 0x03 | +| * GetProgramGuide | 0x04 | +| * RecordProgram | 0x06 | +| * CancelRecordProgram | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | +| * ChannelList | 0x0000 | +| * Lineup | 0x0001 | +| * CurrentChannel | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -119836,377 +135180,540 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MeasuredValue + * Command ChangeChannel */ -class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ChannelChangeChannel : public ClusterCommand { public: - ReadRadonConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadRadonConcentrationMeasurementMeasuredValue() + ChannelChangeChannel() + : ClusterCommand("change-channel") { + AddArgument("Match", &mRequest.match); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.match = [[NSString alloc] initWithBytes:mRequest.match.data() length:mRequest.match.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelWithParams:params completion: + ^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; }; -class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +/* + * Command ChangeChannelByNumber + */ +class ChannelChangeChannelByNumber : public ClusterCommand { public: - SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() + ChannelChangeChannelByNumber() + : ClusterCommand("change-channel-by-number") { + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement 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(); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; + params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelByNumberWithParams: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); + } + }]; } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue 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 +private: + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; +}; /* - * Attribute MinMeasuredValue + * Command SkipChannel */ -class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ChannelSkipChannel : public ClusterCommand { public: - ReadRadonConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadRadonConcentrationMeasurementMinMeasuredValue() + ChannelSkipChannel() + : ClusterCommand("skip-channel") { + AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.count = [NSNumber numberWithShort:mRequest.count]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipChannelWithParams: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::Channel::Commands::SkipChannel::Type mRequest; }; -class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetProgramGuide + */ +class ChannelGetProgramGuide : public ClusterCommand { public: - SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() + ChannelGetProgramGuide() + : ClusterCommand("get-program-guide") + , mComplex_ChannelList(&mRequest.channelList) + , mComplex_PageToken(&mRequest.pageToken) + , mComplex_ExternalIDList(&mRequest.externalIDList) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ChannelList", &mComplex_ChannelList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PageToken", &mComplex_PageToken); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::GetProgramGuide::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterGetProgramGuideParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.startTime.HasValue()) { + params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; + } else { + params.startTime = nil; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.endTime.HasValue()) { + params.endTime = [NSNumber numberWithUnsignedInt:mRequest.endTime.Value()]; + } else { + params.endTime = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.channelList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.channelList.Value()) { + MTRChannelClusterChannelInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterChannelInfoStruct new]; + newElement_1.majorNumber = [NSNumber numberWithUnsignedShort:entry_1.majorNumber]; + newElement_1.minorNumber = [NSNumber numberWithUnsignedShort:entry_1.minorNumber]; + if (entry_1.name.HasValue()) { + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.Value().data() length:entry_1.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.name = nil; + } + if (entry_1.callSign.HasValue()) { + newElement_1.callSign = [[NSString alloc] initWithBytes:entry_1.callSign.Value().data() length:entry_1.callSign.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.callSign = nil; + } + if (entry_1.affiliateCallSign.HasValue()) { + newElement_1.affiliateCallSign = [[NSString alloc] initWithBytes:entry_1.affiliateCallSign.Value().data() length:entry_1.affiliateCallSign.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.affiliateCallSign = nil; + } + if (entry_1.identifier.HasValue()) { + newElement_1.identifier = [[NSString alloc] initWithBytes:entry_1.identifier.Value().data() length:entry_1.identifier.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.identifier = nil; + } + if (entry_1.type.HasValue()) { + newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type.Value())]; + } else { + newElement_1.type = nil; + } + [array_1 addObject:newElement_1]; + } + params.channelList = array_1; + } + } else { + params.channelList = nil; } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.pageToken.HasValue()) { + params.pageToken = [MTRChannelClusterPageTokenStruct new]; + if (mRequest.pageToken.Value().limit.HasValue()) { + params.pageToken.limit = [NSNumber numberWithUnsignedShort:mRequest.pageToken.Value().limit.Value()]; + } else { + params.pageToken.limit = nil; + } + if (mRequest.pageToken.Value().after.HasValue()) { + params.pageToken.after = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().after.Value().data() length:mRequest.pageToken.Value().after.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.after = nil; + } + if (mRequest.pageToken.Value().before.HasValue()) { + params.pageToken.before = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().before.Value().data() length:mRequest.pageToken.Value().before.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.before = nil; + } + } else { + params.pageToken = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.recordingFlag.HasValue()) { + params.recordingFlag = [NSNumber numberWithUnsignedInt:mRequest.recordingFlag.Value().Raw()]; + } else { + params.recordingFlag = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.externalIDList.Value()) { + MTRChannelClusterAdditionalInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.data() length:entry_1.name.size() encoding:NSUTF8StringEncoding]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + [array_1 addObject:newElement_1]; } - SetCommandExitStatus(error); - }]; - + params.externalIDList = array_1; + } + } else { + params.externalIDList = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getProgramGuideWithParams:params completion: + ^(MTRChannelClusterProgramGuideResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Channel::Commands::GetProgramGuide::Type mRequest; + TypedComplexArgument>> mComplex_ChannelList; + TypedComplexArgument> mComplex_PageToken; + TypedComplexArgument>> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxMeasuredValue + * Command RecordProgram */ -class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ChannelRecordProgram : public ClusterCommand { public: - ReadRadonConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadRadonConcentrationMeasurementMaxMeasuredValue() + ChannelRecordProgram() + : ClusterCommand("record-program") + , mComplex_ExternalIDList(&mRequest.externalIDList) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::RecordProgram::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterRecordProgramParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.externalIDList) { + MTRChannelClusterAdditionalInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement 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(); + params.externalIDList = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster recordProgramWithParams: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); + } + }]; } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue 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; } + +private: + chip::app::Clusters::Channel::Commands::RecordProgram::Type mRequest; + TypedComplexArgument> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute PeakMeasuredValue + * Command CancelRecordProgram */ -class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ChannelCancelRecordProgram : public ClusterCommand { public: - ReadRadonConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") - { - } - - ~ReadRadonConcentrationMeasurementPeakMeasuredValue() + ChannelCancelRecordProgram() + : ClusterCommand("cancel-record-program") + , mComplex_ExternalIDList(&mRequest.externalIDList) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::CancelRecordProgram::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterCancelRecordProgramParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.externalIDList) { + MTRChannelClusterAdditionalInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") - { - } - - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement 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(); + params.externalIDList = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster cancelRecordProgramWithParams: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); + } + }]; } - [cluster subscribeAttributePeakMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue 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; } + +private: + chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type mRequest; + TypedComplexArgument> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute PeakMeasuredValueWindow + * Attribute ChannelList */ -class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadChannelChannelList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadChannelChannelList() + : ReadAttribute("channel-list") { } - ~ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadChannelChannelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("Channel ChannelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120215,25 +135722,25 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeChannelChannelList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeChannelChannelList() + : SubscribeAttribute("channel-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeChannelChannelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120244,10 +135751,10 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeChannelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120260,38 +135767,35 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AverageMeasuredValue + * Attribute Lineup */ -class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadChannelLineup : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadChannelLineup() + : ReadAttribute("lineup") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValue() + ~ReadChannelLineup() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("Channel Lineup read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120300,25 +135804,25 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeChannelLineup : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeChannelLineup() + : SubscribeAttribute("lineup") { } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeChannelLineup() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120329,10 +135833,10 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeLineupWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120345,38 +135849,35 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AverageMeasuredValueWindow + * Attribute CurrentChannel */ -class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadChannelCurrentChannel : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadChannelCurrentChannel() + : ReadAttribute("current-channel") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadChannelCurrentChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("Channel CurrentChannel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120385,25 +135886,25 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeChannelCurrentChannel() + : SubscribeAttribute("current-channel") { } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeChannelCurrentChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120414,10 +135915,10 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeCurrentChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120430,38 +135931,35 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Uncertainty + * Attribute GeneratedCommandList */ -class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadChannelGeneratedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadChannelGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRadonConcentrationMeasurementUncertainty() + ~ReadChannelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); + LogNSError("Channel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120470,25 +135968,25 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeChannelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementUncertainty() + ~SubscribeAttributeChannelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120499,10 +135997,10 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120515,38 +136013,35 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MeasurementUnit + * Attribute AcceptedCommandList */ -class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadChannelAcceptedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadChannelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRadonConcentrationMeasurementMeasurementUnit() + ~ReadChannelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("Channel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120555,25 +136050,25 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeChannelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeChannelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120584,10 +136079,10 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120600,38 +136095,37 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasurementMedium + * Attribute EventList */ -class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadChannelEventList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadChannelEventList() + : ReadAttribute("event-list") { } - ~ReadRadonConcentrationMeasurementMeasurementMedium() + ~ReadChannelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("Channel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120640,25 +136134,25 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeChannelEventList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeChannelEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeChannelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120669,10 +136163,10 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120686,37 +136180,36 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute LevelValue + * Attribute AttributeList */ -class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadChannelAttributeList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadChannelAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRadonConcentrationMeasurementLevelValue() + ~ReadChannelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); + LogNSError("Channel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120725,25 +136218,25 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeChannelAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementLevelValue() + ~SubscribeAttributeChannelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120754,10 +136247,10 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120770,38 +136263,35 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadChannelFeatureMap : public ReadAttribute { public: - ReadRadonConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadChannelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRadonConcentrationMeasurementGeneratedCommandList() + ~ReadChannelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("Channel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120810,25 +136300,25 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeChannelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeChannelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120839,10 +136329,10 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120855,38 +136345,35 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadChannelClusterRevision : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadChannelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRadonConcentrationMeasurementAcceptedCommandList() + ~ReadChannelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("Channel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120895,25 +136382,25 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeChannelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeChannelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -120924,10 +136411,10 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -120940,38 +136427,114 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster TargetNavigator | 0x0505 | +|------------------------------------------------------------------------------| +| Commands: | | +| * NavigateTarget | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TargetList | 0x0000 | +| * CurrentTarget | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * TargetUpdated | 0x0000 | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Command NavigateTarget */ -class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { +class TargetNavigatorNavigateTarget : public ClusterCommand { public: - ReadRadonConcentrationMeasurementEventList() - : ReadAttribute("event-list") + TargetNavigatorNavigateTarget() + : ClusterCommand("navigate-target") { + AddArgument("Target", 0, UINT8_MAX, &mRequest.target); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~ReadRadonConcentrationMeasurementEventList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::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); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster navigateTargetWithParams:params completion: + ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; +}; + +/* + * Attribute TargetList + */ +class ReadTargetNavigatorTargetList : public ReadAttribute { +public: + ReadTargetNavigatorTargetList() + : ReadAttribute("target-list") + { + } + + ~ReadTargetNavigatorTargetList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement EventList read Error", error); + LogNSError("TargetNavigator TargetList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -120980,25 +136543,25 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTargetNavigatorTargetList() + : SubscribeAttribute("target-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementEventList() + ~SubscribeAttributeTargetNavigatorTargetList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121009,10 +136572,10 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTargetListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121025,38 +136588,35 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute CurrentTarget */ -class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadTargetNavigatorCurrentTarget : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadTargetNavigatorCurrentTarget() + : ReadAttribute("current-target") { } - ~ReadRadonConcentrationMeasurementAttributeList() + ~ReadTargetNavigatorCurrentTarget() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); + LogNSError("TargetNavigator CurrentTarget read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121065,25 +136625,25 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTargetNavigatorCurrentTarget() + : SubscribeAttribute("current-target") { } - ~SubscribeAttributeRadonConcentrationMeasurementAttributeList() + ~SubscribeAttributeTargetNavigatorCurrentTarget() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121094,10 +136654,10 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCurrentTargetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121110,38 +136670,35 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadTargetNavigatorGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRadonConcentrationMeasurementFeatureMap() + ~ReadTargetNavigatorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); + LogNSError("TargetNavigator GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121150,25 +136707,25 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTargetNavigatorGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementFeatureMap() + ~SubscribeAttributeTargetNavigatorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121179,10 +136736,10 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121195,38 +136752,35 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadTargetNavigatorAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRadonConcentrationMeasurementClusterRevision() + ~ReadTargetNavigatorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("TargetNavigator AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121235,25 +136789,25 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTargetNavigatorAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementClusterRevision() + ~SubscribeAttributeTargetNavigatorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121264,10 +136818,10 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121280,55 +136834,37 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster WakeOnLan | 0x0503 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MACAddress | 0x0000 | -| * LinkLocalAddress | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute MACAddress + * Attribute EventList */ -class ReadWakeOnLanMACAddress : public ReadAttribute { +class ReadTargetNavigatorEventList : public ReadAttribute { public: - ReadWakeOnLanMACAddress() - : ReadAttribute("macaddress") + ReadTargetNavigatorEventList() + : ReadAttribute("event-list") { } - ~ReadWakeOnLanMACAddress() + ~ReadTargetNavigatorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN MACAddress read Error", error); + LogNSError("TargetNavigator EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121337,25 +136873,25 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanMACAddress() - : SubscribeAttribute("macaddress") + SubscribeAttributeTargetNavigatorEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWakeOnLanMACAddress() + ~SubscribeAttributeTargetNavigatorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121366,10 +136902,10 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMACAddressWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121382,37 +136918,37 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute LinkLocalAddress + * Attribute AttributeList */ -class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { +class ReadTargetNavigatorAttributeList : public ReadAttribute { public: - ReadWakeOnLanLinkLocalAddress() - : ReadAttribute("link-local-address") + ReadTargetNavigatorAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWakeOnLanLinkLocalAddress() + ~ReadTargetNavigatorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLinkLocalAddressWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN LinkLocalAddress read Error", error); + LogNSError("TargetNavigator AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121421,25 +136957,25 @@ class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanLinkLocalAddress() - : SubscribeAttribute("link-local-address") + SubscribeAttributeTargetNavigatorAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWakeOnLanLinkLocalAddress() + ~SubscribeAttributeTargetNavigatorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121450,10 +136986,10 @@ class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLinkLocalAddressWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121466,37 +137002,35 @@ class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { +class ReadTargetNavigatorFeatureMap : public ReadAttribute { public: - ReadWakeOnLanGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTargetNavigatorFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWakeOnLanGeneratedCommandList() + ~ReadTargetNavigatorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + LogNSError("TargetNavigator FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121505,25 +137039,25 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTargetNavigatorFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWakeOnLanGeneratedCommandList() + ~SubscribeAttributeTargetNavigatorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121534,10 +137068,10 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121551,34 +137085,34 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { +class ReadTargetNavigatorClusterRevision : public ReadAttribute { public: - ReadWakeOnLanAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTargetNavigatorClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWakeOnLanAcceptedCommandList() + ~ReadTargetNavigatorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + LogNSError("TargetNavigator ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -121587,25 +137121,25 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTargetNavigatorClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWakeOnLanAcceptedCommandList() + ~SubscribeAttributeTargetNavigatorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -121616,10 +137150,10 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -121632,538 +137166,817 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster MediaPlayback | 0x0506 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Play | 0x00 | +| * Pause | 0x01 | +| * Stop | 0x02 | +| * StartOver | 0x03 | +| * Previous | 0x04 | +| * Next | 0x05 | +| * Rewind | 0x06 | +| * FastForward | 0x07 | +| * SkipForward | 0x08 | +| * SkipBackward | 0x09 | +| * Seek | 0x0B | +| * ActivateAudioTrack | 0x0C | +| * ActivateTextTrack | 0x0D | +| * DeactivateTextTrack | 0x0E | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentState | 0x0000 | +| * StartTime | 0x0001 | +| * Duration | 0x0002 | +| * SampledPosition | 0x0003 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | +| * ActiveAudioTrack | 0x0007 | +| * AvailableAudioTracks | 0x0008 | +| * ActiveTextTrack | 0x0009 | +| * AvailableTextTracks | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChanged | 0x0000 | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Command Play */ -class ReadWakeOnLanEventList : public ReadAttribute { +class MediaPlaybackPlay : public ClusterCommand { public: - ReadWakeOnLanEventList() - : ReadAttribute("event-list") + MediaPlaybackPlay() + : ClusterCommand("play") { + ClusterCommand::AddArguments(); } - ~ReadWakeOnLanEventList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::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); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPlayParams 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 playWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Pause + */ +class MediaPlaybackPause : public ClusterCommand { +public: + MediaPlaybackPause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WakeOnLAN EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPauseParams 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 pauseWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { +/* + * Command Stop + */ +class MediaPlaybackStop : public ClusterCommand { public: - SubscribeAttributeWakeOnLanEventList() - : SubscribeAttribute("event-list") + MediaPlaybackStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeWakeOnLanEventList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::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); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStopParams 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 stopWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command StartOver + */ +class MediaPlaybackStartOver : public ClusterCommand { +public: + MediaPlaybackStartOver() + : ClusterCommand("start-over") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN 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(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams 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 startOverWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList 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; + } + +private: +}; + +/* + * Command Previous + */ +class MediaPlaybackPrevious : public ClusterCommand { +public: + MediaPlaybackPrevious() + : ClusterCommand("previous") + { + ClusterCommand::AddArguments(); + } + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::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); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams 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 previousWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL +private: +}; /* - * Attribute AttributeList + * Command Next */ -class ReadWakeOnLanAttributeList : public ReadAttribute { +class MediaPlaybackNext : public ClusterCommand { public: - ReadWakeOnLanAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadWakeOnLanAttributeList() + MediaPlaybackNext() + : ClusterCommand("next") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WakeOnLAN AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterNextParams 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 nextWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { +/* + * Command Rewind + */ +class MediaPlaybackRewind : public ClusterCommand { public: - SubscribeAttributeWakeOnLanAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeWakeOnLanAttributeList() + MediaPlaybackRewind() + : ClusterCommand("rewind") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN 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(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.audioAdvanceUnmuted.HasValue()) { + params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; + } else { + params.audioAdvanceUnmuted = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster rewindWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList 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; } + +private: + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; }; /* - * Attribute FeatureMap + * Command FastForward */ -class ReadWakeOnLanFeatureMap : public ReadAttribute { +class MediaPlaybackFastForward : public ClusterCommand { public: - ReadWakeOnLanFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadWakeOnLanFeatureMap() + MediaPlaybackFastForward() + : ClusterCommand("fast-forward") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WakeOnLAN FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.audioAdvanceUnmuted.HasValue()) { + params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; + } else { + params.audioAdvanceUnmuted = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster fastForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; }; -class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { +/* + * Command SkipForward + */ +class MediaPlaybackSkipForward : public ClusterCommand { public: - SubscribeAttributeWakeOnLanFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeWakeOnLanFeatureMap() + MediaPlaybackSkipForward() + : ClusterCommand("skip-forward") { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN 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(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap 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; } + +private: + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; /* - * Attribute ClusterRevision + * Command SkipBackward */ -class ReadWakeOnLanClusterRevision : public ReadAttribute { +class MediaPlaybackSkipBackward : public ClusterCommand { public: - ReadWakeOnLanClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadWakeOnLanClusterRevision() + MediaPlaybackSkipBackward() + : ClusterCommand("skip-backward") { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WakeOnLAN ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipBackwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; -class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { +/* + * Command Seek + */ +class MediaPlaybackSeek : public ClusterCommand { public: - SubscribeAttributeWakeOnLanClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeWakeOnLanClusterRevision() + MediaPlaybackSeek() + : ClusterCommand("seek") { + AddArgument("Position", 0, UINT64_MAX, &mRequest.position); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN 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(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster seekWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision 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; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster Channel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x02 | -| * SkipChannel | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * Lineup | 0x0001 | -| * CurrentChannel | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +private: + chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; +}; +#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeChannel + * Command ActivateAudioTrack */ -class ChannelChangeChannel : public ClusterCommand { +class MediaPlaybackActivateAudioTrack : public ClusterCommand { public: - ChannelChangeChannel() - : ClusterCommand("change-channel") + MediaPlaybackActivateAudioTrack() + : ClusterCommand("activate-audio-track") { - AddArgument("Match", &mRequest.match); +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrackID", &mRequest.trackID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioOutputIndex", 0, UINT8_MAX, &mRequest.audioOutputIndex); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterActivateAudioTrackParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.match = [[NSString alloc] initWithBytes:mRequest.match.data() length:mRequest.match.size() encoding:NSUTF8StringEncoding]; +#if MTR_ENABLE_PROVISIONAL + params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.audioOutputIndex]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeChannelWithParams:params completion: - ^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster activateAudioTrackWithParams: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::Channel::Commands::ChangeChannel::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeChannelByNumber + * Command ActivateTextTrack */ -class ChannelChangeChannelByNumber : public ClusterCommand { +class MediaPlaybackActivateTextTrack : public ClusterCommand { public: - ChannelChangeChannelByNumber() - : ClusterCommand("change-channel-by-number") + MediaPlaybackActivateTextTrack() + : ClusterCommand("activate-text-track") { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrackID", &mRequest.trackID); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterActivateTextTrackParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; - params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; +#if MTR_ENABLE_PROVISIONAL + params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeChannelByNumberWithParams: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); - } - }]; + [cluster activateTextTrackWithParams: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::Channel::Commands::ChangeChannelByNumber::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Command SkipChannel + * Command DeactivateTextTrack */ -class ChannelSkipChannel : public ClusterCommand { +class MediaPlaybackDeactivateTextTrack : public ClusterCommand { public: - ChannelSkipChannel() - : ClusterCommand("skip-channel") + MediaPlaybackDeactivateTextTrack() + : ClusterCommand("deactivate-text-track") { - AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.count = [NSNumber numberWithShort:mRequest.count]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipChannelWithParams: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); - } - }]; + [cluster deactivateTextTrackWithParams: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::Channel::Commands::SkipChannel::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ChannelList + * Attribute CurrentState */ -class ReadChannelChannelList : public ReadAttribute { +class ReadMediaPlaybackCurrentState : public ReadAttribute { public: - ReadChannelChannelList() - : ReadAttribute("channel-list") + ReadMediaPlaybackCurrentState() + : ReadAttribute("current-state") { } - ~ReadChannelChannelList() + ~ReadMediaPlaybackCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel ChannelList read Error", error); + LogNSError("MediaPlayback CurrentState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122172,25 +137985,25 @@ class ReadChannelChannelList : public ReadAttribute { } }; -class SubscribeAttributeChannelChannelList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { public: - SubscribeAttributeChannelChannelList() - : SubscribeAttribute("channel-list") + SubscribeAttributeMediaPlaybackCurrentState() + : SubscribeAttribute("current-state") { } - ~SubscribeAttributeChannelChannelList() + ~SubscribeAttributeMediaPlaybackCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122201,10 +138014,10 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelListWithParams:params + [cluster subscribeAttributeCurrentStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122218,34 +138031,34 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { }; /* - * Attribute Lineup + * Attribute StartTime */ -class ReadChannelLineup : public ReadAttribute { +class ReadMediaPlaybackStartTime : public ReadAttribute { public: - ReadChannelLineup() - : ReadAttribute("lineup") + ReadMediaPlaybackStartTime() + : ReadAttribute("start-time") { } - ~ReadChannelLineup() + ~ReadMediaPlaybackStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel Lineup read Error", error); + LogNSError("MediaPlayback StartTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122254,25 +138067,25 @@ class ReadChannelLineup : public ReadAttribute { } }; -class SubscribeAttributeChannelLineup : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { public: - SubscribeAttributeChannelLineup() - : SubscribeAttribute("lineup") + SubscribeAttributeMediaPlaybackStartTime() + : SubscribeAttribute("start-time") { } - ~SubscribeAttributeChannelLineup() + ~SubscribeAttributeMediaPlaybackStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122283,10 +138096,10 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineupWithParams:params + [cluster subscribeAttributeStartTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122300,34 +138113,34 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { }; /* - * Attribute CurrentChannel + * Attribute Duration */ -class ReadChannelCurrentChannel : public ReadAttribute { +class ReadMediaPlaybackDuration : public ReadAttribute { public: - ReadChannelCurrentChannel() - : ReadAttribute("current-channel") + ReadMediaPlaybackDuration() + : ReadAttribute("duration") { } - ~ReadChannelCurrentChannel() + ~ReadMediaPlaybackDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel CurrentChannel read Error", error); + LogNSError("MediaPlayback Duration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122336,25 +138149,25 @@ class ReadChannelCurrentChannel : public ReadAttribute { } }; -class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { public: - SubscribeAttributeChannelCurrentChannel() - : SubscribeAttribute("current-channel") + SubscribeAttributeMediaPlaybackDuration() + : SubscribeAttribute("duration") { } - ~SubscribeAttributeChannelCurrentChannel() + ~SubscribeAttributeMediaPlaybackDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122365,10 +138178,10 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentChannelWithParams:params + [cluster subscribeAttributeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122382,34 +138195,34 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute SampledPosition */ -class ReadChannelGeneratedCommandList : public ReadAttribute { +class ReadMediaPlaybackSampledPosition : public ReadAttribute { public: - ReadChannelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMediaPlaybackSampledPosition() + : ReadAttribute("sampled-position") { } - ~ReadChannelGeneratedCommandList() + ~ReadMediaPlaybackSampledPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSampledPositionWithCompletion:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel GeneratedCommandList read Error", error); + LogNSError("MediaPlayback SampledPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122418,25 +138231,25 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { public: - SubscribeAttributeChannelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMediaPlaybackSampledPosition() + : SubscribeAttribute("sampled-position") { } - ~SubscribeAttributeChannelGeneratedCommandList() + ~SubscribeAttributeMediaPlaybackSampledPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122447,10 +138260,10 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSampledPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122464,34 +138277,34 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute }; /* - * Attribute AcceptedCommandList + * Attribute PlaybackSpeed */ -class ReadChannelAcceptedCommandList : public ReadAttribute { +class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { public: - ReadChannelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMediaPlaybackPlaybackSpeed() + : ReadAttribute("playback-speed") { } - ~ReadChannelAcceptedCommandList() + ~ReadMediaPlaybackPlaybackSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel AcceptedCommandList read Error", error); + LogNSError("MediaPlayback PlaybackSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122500,25 +138313,25 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { public: - SubscribeAttributeChannelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMediaPlaybackPlaybackSpeed() + : SubscribeAttribute("playback-speed") { } - ~SubscribeAttributeChannelAcceptedCommandList() + ~SubscribeAttributeMediaPlaybackPlaybackSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122529,10 +138342,10 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePlaybackSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122545,37 +138358,35 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute SeekRangeEnd */ -class ReadChannelEventList : public ReadAttribute { +class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { public: - ReadChannelEventList() - : ReadAttribute("event-list") + ReadMediaPlaybackSeekRangeEnd() + : ReadAttribute("seek-range-end") { } - ~ReadChannelEventList() + ~ReadMediaPlaybackSeekRangeEnd() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel EventList read Error", error); + LogNSError("MediaPlayback SeekRangeEnd read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122584,25 +138395,25 @@ class ReadChannelEventList : public ReadAttribute { } }; -class SubscribeAttributeChannelEventList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { public: - SubscribeAttributeChannelEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMediaPlaybackSeekRangeEnd() + : SubscribeAttribute("seek-range-end") { } - ~SubscribeAttributeChannelEventList() + ~SubscribeAttributeMediaPlaybackSeekRangeEnd() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122613,10 +138424,10 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSeekRangeEndWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122629,37 +138440,35 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute SeekRangeStart */ -class ReadChannelAttributeList : public ReadAttribute { +class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { public: - ReadChannelAttributeList() - : ReadAttribute("attribute-list") + ReadMediaPlaybackSeekRangeStart() + : ReadAttribute("seek-range-start") { } - ~ReadChannelAttributeList() + ~ReadMediaPlaybackSeekRangeStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel AttributeList read Error", error); + LogNSError("MediaPlayback SeekRangeStart read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122668,25 +138477,25 @@ class ReadChannelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { public: - SubscribeAttributeChannelAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeMediaPlaybackSeekRangeStart() + : SubscribeAttribute("seek-range-start") { } - ~SubscribeAttributeChannelAttributeList() + ~SubscribeAttributeMediaPlaybackSeekRangeStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122697,10 +138506,10 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSeekRangeStartWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122713,35 +138522,37 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute ActiveAudioTrack */ -class ReadChannelFeatureMap : public ReadAttribute { +class ReadMediaPlaybackActiveAudioTrack : public ReadAttribute { public: - ReadChannelFeatureMap() - : ReadAttribute("feature-map") + ReadMediaPlaybackActiveAudioTrack() + : ReadAttribute("active-audio-track") { } - ~ReadChannelFeatureMap() + ~ReadMediaPlaybackActiveAudioTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveAudioTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel FeatureMap read Error", error); + LogNSError("MediaPlayback ActiveAudioTrack read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122750,25 +138561,25 @@ class ReadChannelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackActiveAudioTrack : public SubscribeAttribute { public: - SubscribeAttributeChannelFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMediaPlaybackActiveAudioTrack() + : SubscribeAttribute("active-audio-track") { } - ~SubscribeAttributeChannelFeatureMap() + ~SubscribeAttributeMediaPlaybackActiveAudioTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -122779,10 +138590,10 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeActiveAudioTrackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -122795,35 +138606,38 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AvailableAudioTracks */ -class ReadChannelClusterRevision : public ReadAttribute { +class ReadMediaPlaybackAvailableAudioTracks : public ReadAttribute { public: - ReadChannelClusterRevision() - : ReadAttribute("cluster-revision") + ReadMediaPlaybackAvailableAudioTracks() + : ReadAttribute("available-audio-tracks") { } - ~ReadChannelClusterRevision() + ~ReadMediaPlaybackAvailableAudioTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::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); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAvailableAudioTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableAudioTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel ClusterRevision read Error", error); + LogNSError("MediaPlayback AvailableAudioTracks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122832,158 +138646,83 @@ class ReadChannelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAvailableAudioTracks : public SubscribeAttribute { public: - SubscribeAttributeChannelClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeChannelClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeMediaPlaybackAvailableAudioTracks() + : SubscribeAttribute("available-audio-tracks") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterChannel 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 subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision 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; } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster TargetNavigator | 0x0505 | -|------------------------------------------------------------------------------| -| Commands: | | -| * NavigateTarget | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TargetList | 0x0000 | -| * CurrentTarget | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ -/* - * Command NavigateTarget - */ -class TargetNavigatorNavigateTarget : public ClusterCommand { -public: - TargetNavigatorNavigateTarget() - : ClusterCommand("navigate-target") + ~SubscribeAttributeMediaPlaybackAvailableAudioTracks() { - AddArgument("Target", 0, UINT8_MAX, &mRequest.target); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::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); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster navigateTargetWithParams:params completion: - ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAvailableAudioTracksWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableAudioTracks 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; } - -private: - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TargetList + * Attribute ActiveTextTrack */ -class ReadTargetNavigatorTargetList : public ReadAttribute { +class ReadMediaPlaybackActiveTextTrack : public ReadAttribute { public: - ReadTargetNavigatorTargetList() - : ReadAttribute("target-list") + ReadMediaPlaybackActiveTextTrack() + : ReadAttribute("active-text-track") { } - ~ReadTargetNavigatorTargetList() + ~ReadMediaPlaybackActiveTextTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveTextTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator TargetList read Error", error); + LogNSError("MediaPlayback ActiveTextTrack read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -122992,25 +138731,25 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackActiveTextTrack : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorTargetList() - : SubscribeAttribute("target-list") + SubscribeAttributeMediaPlaybackActiveTextTrack() + : SubscribeAttribute("active-text-track") { } - ~SubscribeAttributeTargetNavigatorTargetList() + ~SubscribeAttributeMediaPlaybackActiveTextTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123021,10 +138760,10 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetListWithParams:params + [cluster subscribeAttributeActiveTextTrackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123037,35 +138776,38 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentTarget + * Attribute AvailableTextTracks */ -class ReadTargetNavigatorCurrentTarget : public ReadAttribute { +class ReadMediaPlaybackAvailableTextTracks : public ReadAttribute { public: - ReadTargetNavigatorCurrentTarget() - : ReadAttribute("current-target") + ReadMediaPlaybackAvailableTextTracks() + : ReadAttribute("available-text-tracks") { } - ~ReadTargetNavigatorCurrentTarget() + ~ReadMediaPlaybackAvailableTextTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAvailableTextTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator CurrentTarget read Error", error); + LogNSError("MediaPlayback AvailableTextTracks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123074,25 +138816,25 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAvailableTextTracks : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorCurrentTarget() - : SubscribeAttribute("current-target") + SubscribeAttributeMediaPlaybackAvailableTextTracks() + : SubscribeAttribute("available-text-tracks") { } - ~SubscribeAttributeTargetNavigatorCurrentTarget() + ~SubscribeAttributeMediaPlaybackAvailableTextTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123103,10 +138845,10 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentTargetWithParams:params + [cluster subscribeAttributeAvailableTextTracksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123119,35 +138861,37 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { +class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { public: - ReadTargetNavigatorGeneratedCommandList() + ReadMediaPlaybackGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTargetNavigatorGeneratedCommandList() + ~ReadMediaPlaybackGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator GeneratedCommandList read Error", error); + LogNSError("MediaPlayback GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123156,25 +138900,25 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorGeneratedCommandList() + SubscribeAttributeMediaPlaybackGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTargetNavigatorGeneratedCommandList() + ~SubscribeAttributeMediaPlaybackGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123188,7 +138932,7 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123204,32 +138948,32 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt /* * Attribute AcceptedCommandList */ -class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { +class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { public: - ReadTargetNavigatorAcceptedCommandList() + ReadMediaPlaybackAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTargetNavigatorAcceptedCommandList() + ~ReadMediaPlaybackAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator AcceptedCommandList read Error", error); + LogNSError("MediaPlayback AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123238,25 +138982,25 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAcceptedCommandList() + SubscribeAttributeMediaPlaybackAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTargetNavigatorAcceptedCommandList() + ~SubscribeAttributeMediaPlaybackAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123270,7 +139014,7 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123288,32 +139032,32 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt /* * Attribute EventList */ -class ReadTargetNavigatorEventList : public ReadAttribute { +class ReadMediaPlaybackEventList : public ReadAttribute { public: - ReadTargetNavigatorEventList() + ReadMediaPlaybackEventList() : ReadAttribute("event-list") { } - ~ReadTargetNavigatorEventList() + ~ReadMediaPlaybackEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); + NSLog(@"MediaPlayback.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator EventList read Error", error); + LogNSError("MediaPlayback EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123322,25 +139066,25 @@ class ReadTargetNavigatorEventList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorEventList() + SubscribeAttributeMediaPlaybackEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTargetNavigatorEventList() + ~SubscribeAttributeMediaPlaybackEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123354,7 +139098,7 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); + NSLog(@"MediaPlayback.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123372,32 +139116,32 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadTargetNavigatorAttributeList : public ReadAttribute { +class ReadMediaPlaybackAttributeList : public ReadAttribute { public: - ReadTargetNavigatorAttributeList() + ReadMediaPlaybackAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTargetNavigatorAttributeList() + ~ReadMediaPlaybackAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator AttributeList read Error", error); + LogNSError("MediaPlayback AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123406,25 +139150,25 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAttributeList() + SubscribeAttributeMediaPlaybackAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTargetNavigatorAttributeList() + ~SubscribeAttributeMediaPlaybackAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123438,7 +139182,7 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123454,32 +139198,32 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadTargetNavigatorFeatureMap : public ReadAttribute { +class ReadMediaPlaybackFeatureMap : public ReadAttribute { public: - ReadTargetNavigatorFeatureMap() + ReadMediaPlaybackFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTargetNavigatorFeatureMap() + ~ReadMediaPlaybackFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator FeatureMap read Error", error); + LogNSError("MediaPlayback FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123488,25 +139232,25 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorFeatureMap() + SubscribeAttributeMediaPlaybackFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTargetNavigatorFeatureMap() + ~SubscribeAttributeMediaPlaybackFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123520,7 +139264,7 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123536,32 +139280,32 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadTargetNavigatorClusterRevision : public ReadAttribute { +class ReadMediaPlaybackClusterRevision : public ReadAttribute { public: - ReadTargetNavigatorClusterRevision() + ReadMediaPlaybackClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTargetNavigatorClusterRevision() + ~ReadMediaPlaybackClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator ClusterRevision read Error", error); + LogNSError("MediaPlayback ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -123570,25 +139314,25 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorClusterRevision() + SubscribeAttributeMediaPlaybackClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTargetNavigatorClusterRevision() + ~SubscribeAttributeMediaPlaybackClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -123602,7 +139346,7 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -123616,29 +139360,17 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu }; /*----------------------------------------------------------------------------*\ -| Cluster MediaPlayback | 0x0506 | +| Cluster MediaInput | 0x0507 | |------------------------------------------------------------------------------| | Commands: | | -| * Play | 0x00 | -| * Pause | 0x01 | -| * Stop | 0x02 | -| * StartOver | 0x03 | -| * Previous | 0x04 | -| * Next | 0x05 | -| * Rewind | 0x06 | -| * FastForward | 0x07 | -| * SkipForward | 0x08 | -| * SkipBackward | 0x09 | -| * Seek | 0x0B | +| * SelectInput | 0x00 | +| * ShowInputStatus | 0x01 | +| * HideInputStatus | 0x02 | +| * RenameInput | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * CurrentState | 0x0000 | -| * StartTime | 0x0001 | -| * Duration | 0x0002 | -| * SampledPosition | 0x0003 | -| * PlaybackSpeed | 0x0004 | -| * SeekRangeEnd | 0x0005 | -| * SeekRangeStart | 0x0006 | +| * InputList | 0x0000 | +| * CurrentInput | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -123650,98 +139382,89 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu \*----------------------------------------------------------------------------*/ /* - * Command Play + * Command SelectInput */ -class MediaPlaybackPlay : public ClusterCommand { +class MediaInputSelectInput : public ClusterCommand { public: - MediaPlaybackPlay() - : ClusterCommand("play") + MediaInputSelectInput() + : ClusterCommand("select-input") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster playWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster selectInputWithParams: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::MediaInput::Commands::SelectInput::Type mRequest; }; /* - * Command Pause + * Command ShowInputStatus */ -class MediaPlaybackPause : public ClusterCommand { +class MediaInputShowInputStatus : public ClusterCommand { public: - MediaPlaybackPause() - : ClusterCommand("pause") + MediaInputShowInputStatus() + : ClusterCommand("show-input-status") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams 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 pauseWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster showInputStatusWithParams: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; } @@ -123750,48 +139473,42 @@ class MediaPlaybackPause : public ClusterCommand { }; /* - * Command Stop + * Command HideInputStatus */ -class MediaPlaybackStop : public ClusterCommand { +class MediaInputHideInputStatus : public ClusterCommand { public: - MediaPlaybackStop() - : ClusterCommand("stop") + MediaInputHideInputStatus() + : ClusterCommand("hide-input-status") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams 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 stopWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster hideInputStatusWithParams: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; } @@ -123800,443 +139517,661 @@ class MediaPlaybackStop : public ClusterCommand { }; /* - * Command StartOver + * Command RenameInput */ -class MediaPlaybackStartOver : public ClusterCommand { +class MediaInputRenameInput : public ClusterCommand { public: - MediaPlaybackStartOver() - : ClusterCommand("start-over") + MediaInputRenameInput() + : ClusterCommand("rename-input") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startOverWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster renameInputWithParams: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::MediaInput::Commands::RenameInput::Type mRequest; }; /* - * Command Previous + * Attribute InputList */ -class MediaPlaybackPrevious : public ClusterCommand { +class ReadMediaInputInputList : public ReadAttribute { public: - MediaPlaybackPrevious() - : ClusterCommand("previous") + ReadMediaInputInputList() + : ReadAttribute("input-list") + { + } + + ~ReadMediaInputInputList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams 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 previousWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.InputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput InputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; + +class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputInputList() + : SubscribeAttribute("input-list") + { + } -private: + ~SubscribeAttributeMediaInputInputList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeInputListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.InputList 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; + } }; /* - * Command Next + * Attribute CurrentInput */ -class MediaPlaybackNext : public ClusterCommand { +class ReadMediaInputCurrentInput : public ReadAttribute { public: - MediaPlaybackNext() - : ClusterCommand("next") + ReadMediaInputCurrentInput() + : ReadAttribute("current-input") + { + } + + ~ReadMediaInputCurrentInput() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterNextParams 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 nextWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.CurrentInput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput CurrentInput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: +class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputCurrentInput() + : SubscribeAttribute("current-input") + { + } + + ~SubscribeAttributeMediaInputCurrentInput() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeCurrentInputWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.CurrentInput 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; + } }; /* - * Command Rewind + * Attribute GeneratedCommandList */ -class MediaPlaybackRewind : public ClusterCommand { +class ReadMediaInputGeneratedCommandList : public ReadAttribute { public: - MediaPlaybackRewind() - : ClusterCommand("rewind") + ReadMediaInputGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadMediaInputGeneratedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterRewindParams 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 rewindWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; + +class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } -private: + ~SubscribeAttributeMediaInputGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList 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; + } }; /* - * Command FastForward + * Attribute AcceptedCommandList */ -class MediaPlaybackFastForward : public ClusterCommand { +class ReadMediaInputAcceptedCommandList : public ReadAttribute { public: - MediaPlaybackFastForward() - : ClusterCommand("fast-forward") + ReadMediaInputAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadMediaInputAcceptedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams 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 fastForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeMediaInputAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AcceptedCommandList 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; } +}; -private: +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute EventList + */ +class ReadMediaInputEventList : public ReadAttribute { +public: + ReadMediaInputEventList() + : ReadAttribute("event-list") + { + } + + ~ReadMediaInputEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeMediaInputEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.EventList 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 + /* - * Command SkipForward + * Attribute AttributeList */ -class MediaPlaybackSkipForward : public ClusterCommand { +class ReadMediaInputAttributeList : public ReadAttribute { +public: + ReadMediaInputAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadMediaInputAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { public: - MediaPlaybackSkipForward() - : ClusterCommand("skip-forward") + SubscribeAttributeMediaInputAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeMediaInputAttributeList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AttributeList 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; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; /* - * Command SkipBackward + * Attribute FeatureMap */ -class MediaPlaybackSkipBackward : public ClusterCommand { +class ReadMediaInputFeatureMap : public ReadAttribute { public: - MediaPlaybackSkipBackward() - : ClusterCommand("skip-backward") + ReadMediaInputFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadMediaInputFeatureMap() { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipBackwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MediaInput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; -/* - * Command Seek - */ -class MediaPlaybackSeek : public ClusterCommand { +class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { public: - MediaPlaybackSeek() - : ClusterCommand("seek") + SubscribeAttributeMediaInputFeatureMap() + : SubscribeAttribute("feature-map") { - AddArgument("Position", 0, UINT64_MAX, &mRequest.position); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeMediaInputFeatureMap() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster seekWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterMediaInput 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.FeatureMap 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; } - -private: - chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; }; /* - * Attribute CurrentState + * Attribute ClusterRevision */ -class ReadMediaPlaybackCurrentState : public ReadAttribute { +class ReadMediaInputClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackCurrentState() - : ReadAttribute("current-state") + ReadMediaInputClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackCurrentState() + ~ReadMediaInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback CurrentState read Error", error); + LogNSError("MediaInput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124245,25 +140180,25 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { +class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackCurrentState() - : SubscribeAttribute("current-state") + SubscribeAttributeMediaInputClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackCurrentState() + ~SubscribeAttributeMediaInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124274,10 +140209,10 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124290,35 +140225,96 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster LowPower | 0x0508 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Sleep | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command Sleep + */ +class LowPowerSleep : public ClusterCommand { +public: + LowPowerSleep() + : ClusterCommand("sleep") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::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); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLowPowerClusterSleepParams 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 sleepWithParams: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: +}; + /* - * Attribute StartTime + * Attribute GeneratedCommandList */ -class ReadMediaPlaybackStartTime : public ReadAttribute { +class ReadLowPowerGeneratedCommandList : public ReadAttribute { public: - ReadMediaPlaybackStartTime() - : ReadAttribute("start-time") + ReadLowPowerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadMediaPlaybackStartTime() + ~ReadLowPowerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback StartTime read Error", error); + LogNSError("LowPower GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124327,25 +140323,25 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { +class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackStartTime() - : SubscribeAttribute("start-time") + SubscribeAttributeLowPowerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaPlaybackStartTime() + ~SubscribeAttributeLowPowerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124356,10 +140352,10 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartTimeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124373,34 +140369,34 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { }; /* - * Attribute Duration + * Attribute AcceptedCommandList */ -class ReadMediaPlaybackDuration : public ReadAttribute { +class ReadLowPowerAcceptedCommandList : public ReadAttribute { public: - ReadMediaPlaybackDuration() - : ReadAttribute("duration") + ReadLowPowerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMediaPlaybackDuration() + ~ReadLowPowerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback Duration read Error", error); + LogNSError("LowPower AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124409,25 +140405,25 @@ class ReadMediaPlaybackDuration : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { +class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackDuration() - : SubscribeAttribute("duration") + SubscribeAttributeLowPowerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaPlaybackDuration() + ~SubscribeAttributeLowPowerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124438,10 +140434,10 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDurationWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124454,35 +140450,37 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SampledPosition + * Attribute EventList */ -class ReadMediaPlaybackSampledPosition : public ReadAttribute { +class ReadLowPowerEventList : public ReadAttribute { public: - ReadMediaPlaybackSampledPosition() - : ReadAttribute("sampled-position") + ReadLowPowerEventList() + : ReadAttribute("event-list") { } - ~ReadMediaPlaybackSampledPosition() + ~ReadLowPowerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSampledPositionWithCompletion:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SampledPosition read Error", error); + LogNSError("LowPower EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124491,25 +140489,25 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { +class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSampledPosition() - : SubscribeAttribute("sampled-position") + SubscribeAttributeLowPowerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaPlaybackSampledPosition() + ~SubscribeAttributeLowPowerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124520,10 +140518,10 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSampledPositionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124536,35 +140534,37 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute PlaybackSpeed + * Attribute AttributeList */ -class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { +class ReadLowPowerAttributeList : public ReadAttribute { public: - ReadMediaPlaybackPlaybackSpeed() - : ReadAttribute("playback-speed") + ReadLowPowerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMediaPlaybackPlaybackSpeed() + ~ReadLowPowerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback PlaybackSpeed read Error", error); + LogNSError("LowPower AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124573,25 +140573,25 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { +class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackPlaybackSpeed() - : SubscribeAttribute("playback-speed") + SubscribeAttributeLowPowerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaPlaybackPlaybackSpeed() + ~SubscribeAttributeLowPowerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124602,10 +140602,10 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePlaybackSpeedWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124619,34 +140619,34 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { }; /* - * Attribute SeekRangeEnd + * Attribute FeatureMap */ -class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { +class ReadLowPowerFeatureMap : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeEnd() - : ReadAttribute("seek-range-end") + ReadLowPowerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMediaPlaybackSeekRangeEnd() + ~ReadLowPowerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SeekRangeEnd read Error", error); + LogNSError("LowPower FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124655,25 +140655,25 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { +class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeEnd() - : SubscribeAttribute("seek-range-end") + SubscribeAttributeLowPowerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaPlaybackSeekRangeEnd() + ~SubscribeAttributeLowPowerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124684,10 +140684,10 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeEndWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124701,34 +140701,34 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { }; /* - * Attribute SeekRangeStart + * Attribute ClusterRevision */ -class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { +class ReadLowPowerClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeStart() - : ReadAttribute("seek-range-start") + ReadLowPowerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackSeekRangeStart() + ~ReadLowPowerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SeekRangeStart read Error", error); + LogNSError("LowPower ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124737,25 +140737,25 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { +class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeStart() - : SubscribeAttribute("seek-range-start") + SubscribeAttributeLowPowerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackSeekRangeStart() + ~SubscribeAttributeLowPowerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124766,10 +140766,10 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeStartWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124782,35 +140782,105 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| Cluster KeypadInput | 0x0509 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SendKey | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SendKey + */ +class KeypadInputSendKey : public ClusterCommand { +public: + KeypadInputSendKey() + : ClusterCommand("send-key") + { + AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::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); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster sendKeyWithParams:params completion: + ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; +}; + /* * Attribute GeneratedCommandList */ -class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { +class ReadKeypadInputGeneratedCommandList : public ReadAttribute { public: - ReadMediaPlaybackGeneratedCommandList() + ReadKeypadInputGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadMediaPlaybackGeneratedCommandList() + ~ReadKeypadInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback GeneratedCommandList read Error", error); + LogNSError("KeypadInput GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124819,25 +140889,25 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackGeneratedCommandList() + SubscribeAttributeKeypadInputGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaPlaybackGeneratedCommandList() + ~SubscribeAttributeKeypadInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124851,7 +140921,7 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124867,32 +140937,32 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr /* * Attribute AcceptedCommandList */ -class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { +class ReadKeypadInputAcceptedCommandList : public ReadAttribute { public: - ReadMediaPlaybackAcceptedCommandList() + ReadKeypadInputAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadMediaPlaybackAcceptedCommandList() + ~ReadKeypadInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AcceptedCommandList read Error", error); + LogNSError("KeypadInput AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124901,25 +140971,25 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAcceptedCommandList() + SubscribeAttributeKeypadInputAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaPlaybackAcceptedCommandList() + ~SubscribeAttributeKeypadInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -124933,7 +141003,7 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -124951,32 +141021,32 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri /* * Attribute EventList */ -class ReadMediaPlaybackEventList : public ReadAttribute { +class ReadKeypadInputEventList : public ReadAttribute { public: - ReadMediaPlaybackEventList() + ReadKeypadInputEventList() : ReadAttribute("event-list") { } - ~ReadMediaPlaybackEventList() + ~ReadKeypadInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); + NSLog(@"KeypadInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback EventList read Error", error); + LogNSError("KeypadInput EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -124985,25 +141055,25 @@ class ReadMediaPlaybackEventList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackEventList() + SubscribeAttributeKeypadInputEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaPlaybackEventList() + ~SubscribeAttributeKeypadInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125017,7 +141087,7 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); + NSLog(@"KeypadInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125035,32 +141105,32 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadMediaPlaybackAttributeList : public ReadAttribute { +class ReadKeypadInputAttributeList : public ReadAttribute { public: - ReadMediaPlaybackAttributeList() + ReadKeypadInputAttributeList() : ReadAttribute("attribute-list") { } - ~ReadMediaPlaybackAttributeList() + ~ReadKeypadInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AttributeList read Error", error); + LogNSError("KeypadInput AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125069,25 +141139,25 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAttributeList() + SubscribeAttributeKeypadInputAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaPlaybackAttributeList() + ~SubscribeAttributeKeypadInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125101,7 +141171,7 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125117,32 +141187,32 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadMediaPlaybackFeatureMap : public ReadAttribute { +class ReadKeypadInputFeatureMap : public ReadAttribute { public: - ReadMediaPlaybackFeatureMap() + ReadKeypadInputFeatureMap() : ReadAttribute("feature-map") { } - ~ReadMediaPlaybackFeatureMap() + ~ReadKeypadInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback FeatureMap read Error", error); + LogNSError("KeypadInput FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125151,25 +141221,25 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { +class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackFeatureMap() + SubscribeAttributeKeypadInputFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaPlaybackFeatureMap() + ~SubscribeAttributeKeypadInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125183,7 +141253,7 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125199,32 +141269,32 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadMediaPlaybackClusterRevision : public ReadAttribute { +class ReadKeypadInputClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackClusterRevision() + ReadKeypadInputClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackClusterRevision() + ~ReadKeypadInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback ClusterRevision read Error", error); + LogNSError("KeypadInput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125233,25 +141303,25 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { +class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackClusterRevision() + SubscribeAttributeKeypadInputClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackClusterRevision() + ~SubscribeAttributeKeypadInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125265,7 +141335,7 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125279,17 +141349,15 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute }; /*----------------------------------------------------------------------------*\ -| Cluster MediaInput | 0x0507 | +| Cluster ContentLauncher | 0x050A | |------------------------------------------------------------------------------| | Commands: | | -| * SelectInput | 0x00 | -| * ShowInputStatus | 0x01 | -| * HideInputStatus | 0x02 | -| * RenameInput | 0x03 | +| * LaunchContent | 0x00 | +| * LaunchURL | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * InputList | 0x0000 | -| * CurrentInput | 0x0001 | +| * AcceptHeader | 0x0000 | +| * SupportedStreamingProtocols | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -125301,218 +141369,373 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute \*----------------------------------------------------------------------------*/ /* - * Command SelectInput + * Command LaunchContent */ -class MediaInputSelectInput : public ClusterCommand { +class ContentLauncherLaunchContent : public ClusterCommand { public: - MediaInputSelectInput() - : ClusterCommand("select-input") + ContentLauncherLaunchContent() + : ClusterCommand("launch-content") + , mComplex_Search(&mRequest.search) + , mComplex_PlaybackPreferences(&mRequest.playbackPreferences) { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Search", &mComplex_Search); + AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Data", &mRequest.data); +#if MTR_ENABLE_PROVISIONAL + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("UseCurrentContext", 0, 1, &mRequest.useCurrentContext); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectInputWithParams: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); - } - }]; + params.search = [MTRContentLauncherClusterContentSearchStruct new]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.search.parameterList) { + MTRContentLauncherClusterParameterStruct * newElement_1; + newElement_1 = [MTRContentLauncherClusterParameterStruct new]; + newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + if (entry_1.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : entry_1.externalIDList.Value()) { + MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; + newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; + newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() length:entry_4.name.size() encoding:NSUTF8StringEncoding]; + newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() length:entry_4.value.size() encoding:NSUTF8StringEncoding]; + [array_4 addObject:newElement_4]; + } + newElement_1.externalIDList = array_4; + } + } else { + newElement_1.externalIDList = nil; + } + [array_1 addObject:newElement_1]; + } + params.search.parameterList = array_1; } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; -}; - -/* - * Command ShowInputStatus - */ -class MediaInputShowInputStatus : public ClusterCommand { -public: - MediaInputShowInputStatus() - : ClusterCommand("show-input-status") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams 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 showInputStatusWithParams: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); - } - }]; + params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command HideInputStatus - */ -class MediaInputHideInputStatus : public ClusterCommand { -public: - MediaInputHideInputStatus() - : ClusterCommand("hide-input-status") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.playbackPreferences.HasValue()) { + params.playbackPreferences = [MTRContentLauncherClusterPlaybackPreferencesStruct new]; + params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition]; + params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.languageCode.size() encoding:NSUTF8StringEncoding]; + if (mRequest.playbackPreferences.Value().textTrack.characteristics.HasValue()) { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : mRequest.playbackPreferences.Value().textTrack.characteristics.Value()) { + NSNumber * newElement_4; + newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; + [array_4 addObject:newElement_4]; + } + params.playbackPreferences.textTrack.characteristics = array_4; + } + } else { + params.playbackPreferences.textTrack.characteristics = nil; + } + params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.audioOutputIndex]; + if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + for (auto & entry_3 : mRequest.playbackPreferences.Value().audioTracks.Value()) { + MTRContentLauncherClusterTrackPreferenceStruct * newElement_3; + newElement_3 = [MTRContentLauncherClusterTrackPreferenceStruct new]; + newElement_3.languageCode = [[NSString alloc] initWithBytes:entry_3.languageCode.data() length:entry_3.languageCode.size() encoding:NSUTF8StringEncoding]; + if (entry_3.characteristics.HasValue()) { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + for (auto & entry_6 : entry_3.characteristics.Value()) { + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + newElement_3.characteristics = array_6; + } + } else { + newElement_3.characteristics = nil; + } + newElement_3.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_3.audioOutputIndex]; + [array_3 addObject:newElement_3]; + } + params.playbackPreferences.audioTracks = array_3; + } + } else { + params.playbackPreferences.audioTracks = nil; + } + } else { + params.playbackPreferences = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.useCurrentContext.HasValue()) { + params.useCurrentContext = [NSNumber numberWithBool:mRequest.useCurrentContext.Value()]; + } else { + params.useCurrentContext = nil; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster hideInputStatusWithParams: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); - } - }]; + [cluster launchContentWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; + TypedComplexArgument mComplex_Search; + TypedComplexArgument> mComplex_PlaybackPreferences; }; /* - * Command RenameInput + * Command LaunchURL */ -class MediaInputRenameInput : public ClusterCommand { +class ContentLauncherLaunchURL : public ClusterCommand { public: - MediaInputRenameInput() - : ClusterCommand("rename-input") + ContentLauncherLaunchURL() + : ClusterCommand("launch-url") + , mComplex_BrandingInformation(&mRequest.brandingInformation) { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); + AddArgument("ContentURL", &mRequest.contentURL); + AddArgument("DisplayString", &mRequest.displayString); + AddArgument("BrandingInformation", &mComplex_BrandingInformation); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; + params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() length:mRequest.contentURL.size() encoding:NSUTF8StringEncoding]; + if (mRequest.displayString.HasValue()) { + params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() length:mRequest.displayString.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.displayString = nil; + } + if (mRequest.brandingInformation.HasValue()) { + params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; + params.brandingInformation.providerName = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() length:mRequest.brandingInformation.Value().providerName.size() encoding:NSUTF8StringEncoding]; + if (mRequest.brandingInformation.Value().background.HasValue()) { + params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { + params.brandingInformation.background.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.background.imageURL = nil; + } + if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { + params.brandingInformation.background.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() length:mRequest.brandingInformation.Value().background.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.background.color = nil; + } + if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { + params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.background.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; + params.brandingInformation.background.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; + params.brandingInformation.background.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; + } else { + params.brandingInformation.background.size = nil; + } + } else { + params.brandingInformation.background = nil; + } + if (mRequest.brandingInformation.Value().logo.HasValue()) { + params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { + params.brandingInformation.logo.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.imageURL = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { + params.brandingInformation.logo.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.color = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { + params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.logo.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; + params.brandingInformation.logo.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; + params.brandingInformation.logo.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; + } else { + params.brandingInformation.logo.size = nil; + } + } else { + params.brandingInformation.logo = nil; + } + if (mRequest.brandingInformation.Value().progressBar.HasValue()) { + params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { + params.brandingInformation.progressBar.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.imageURL = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { + params.brandingInformation.progressBar.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.color = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { + params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.progressBar.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; + params.brandingInformation.progressBar.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; + params.brandingInformation.progressBar.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; + } else { + params.brandingInformation.progressBar.size = nil; + } + } else { + params.brandingInformation.progressBar = nil; + } + if (mRequest.brandingInformation.Value().splash.HasValue()) { + params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { + params.brandingInformation.splash.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.imageURL = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { + params.brandingInformation.splash.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.color = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { + params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.splash.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; + params.brandingInformation.splash.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; + params.brandingInformation.splash.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; + } else { + params.brandingInformation.splash.size = nil; + } + } else { + params.brandingInformation.splash = nil; + } + if (mRequest.brandingInformation.Value().waterMark.HasValue()) { + params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { + params.brandingInformation.waterMark.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.imageURL = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { + params.brandingInformation.waterMark.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.color = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { + params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.waterMark.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; + params.brandingInformation.waterMark.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; + params.brandingInformation.waterMark.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; + } else { + params.brandingInformation.waterMark.size = nil; + } + } else { + params.brandingInformation.waterMark = nil; + } + } else { + params.brandingInformation = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster renameInputWithParams: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); - } - }]; + [cluster launchURLWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; + TypedComplexArgument> mComplex_BrandingInformation; }; /* - * Attribute InputList + * Attribute AcceptHeader */ -class ReadMediaInputInputList : public ReadAttribute { +class ReadContentLauncherAcceptHeader : public ReadAttribute { public: - ReadMediaInputInputList() - : ReadAttribute("input-list") + ReadContentLauncherAcceptHeader() + : ReadAttribute("accept-header") { } - ~ReadMediaInputInputList() + ~ReadContentLauncherAcceptHeader() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput InputList read Error", error); + LogNSError("ContentLauncher AcceptHeader read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125521,25 +141744,25 @@ class ReadMediaInputInputList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { public: - SubscribeAttributeMediaInputInputList() - : SubscribeAttribute("input-list") + SubscribeAttributeContentLauncherAcceptHeader() + : SubscribeAttribute("accept-header") { } - ~SubscribeAttributeMediaInputInputList() + ~SubscribeAttributeContentLauncherAcceptHeader() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125550,10 +141773,10 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInputListWithParams:params + [cluster subscribeAttributeAcceptHeaderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125567,34 +141790,34 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { }; /* - * Attribute CurrentInput + * Attribute SupportedStreamingProtocols */ -class ReadMediaInputCurrentInput : public ReadAttribute { +class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { public: - ReadMediaInputCurrentInput() - : ReadAttribute("current-input") + ReadContentLauncherSupportedStreamingProtocols() + : ReadAttribute("supported-streaming-protocols") { } - ~ReadMediaInputCurrentInput() + ~ReadContentLauncherSupportedStreamingProtocols() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput CurrentInput read Error", error); + LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125603,25 +141826,25 @@ class ReadMediaInputCurrentInput : public ReadAttribute { } }; -class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { +class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { public: - SubscribeAttributeMediaInputCurrentInput() - : SubscribeAttribute("current-input") + SubscribeAttributeContentLauncherSupportedStreamingProtocols() + : SubscribeAttribute("supported-streaming-protocols") { } - ~SubscribeAttributeMediaInputCurrentInput() + ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125632,10 +141855,10 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentInputWithParams:params + [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125651,32 +141874,32 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadMediaInputGeneratedCommandList : public ReadAttribute { +class ReadContentLauncherGeneratedCommandList : public ReadAttribute { public: - ReadMediaInputGeneratedCommandList() + ReadContentLauncherGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadMediaInputGeneratedCommandList() + ~ReadContentLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput GeneratedCommandList read Error", error); + LogNSError("ContentLauncher GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125685,25 +141908,25 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputGeneratedCommandList() + SubscribeAttributeContentLauncherGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaInputGeneratedCommandList() + ~SubscribeAttributeContentLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125717,7 +141940,7 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125733,32 +141956,32 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadMediaInputAcceptedCommandList : public ReadAttribute { +class ReadContentLauncherAcceptedCommandList : public ReadAttribute { public: - ReadMediaInputAcceptedCommandList() + ReadContentLauncherAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadMediaInputAcceptedCommandList() + ~ReadContentLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput AcceptedCommandList read Error", error); + LogNSError("ContentLauncher AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125767,25 +141990,25 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAcceptedCommandList() + SubscribeAttributeContentLauncherAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaInputAcceptedCommandList() + ~SubscribeAttributeContentLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125799,7 +142022,7 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125817,32 +142040,32 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadMediaInputEventList : public ReadAttribute { +class ReadContentLauncherEventList : public ReadAttribute { public: - ReadMediaInputEventList() + ReadContentLauncherEventList() : ReadAttribute("event-list") { } - ~ReadMediaInputEventList() + ~ReadContentLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); + NSLog(@"ContentLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput EventList read Error", error); + LogNSError("ContentLauncher EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125851,25 +142074,25 @@ class ReadMediaInputEventList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputEventList() + SubscribeAttributeContentLauncherEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaInputEventList() + ~SubscribeAttributeContentLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125883,7 +142106,7 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); + NSLog(@"ContentLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125901,32 +142124,32 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadMediaInputAttributeList : public ReadAttribute { +class ReadContentLauncherAttributeList : public ReadAttribute { public: - ReadMediaInputAttributeList() + ReadContentLauncherAttributeList() : ReadAttribute("attribute-list") { } - ~ReadMediaInputAttributeList() + ~ReadContentLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput AttributeList read Error", error); + LogNSError("ContentLauncher AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -125935,25 +142158,25 @@ class ReadMediaInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAttributeList() + SubscribeAttributeContentLauncherAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaInputAttributeList() + ~SubscribeAttributeContentLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -125967,7 +142190,7 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -125983,32 +142206,32 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadMediaInputFeatureMap : public ReadAttribute { +class ReadContentLauncherFeatureMap : public ReadAttribute { public: - ReadMediaInputFeatureMap() + ReadContentLauncherFeatureMap() : ReadAttribute("feature-map") { } - ~ReadMediaInputFeatureMap() + ~ReadContentLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput FeatureMap read Error", error); + LogNSError("ContentLauncher FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126017,25 +142240,25 @@ class ReadMediaInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaInputFeatureMap() + SubscribeAttributeContentLauncherFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaInputFeatureMap() + ~SubscribeAttributeContentLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126049,7 +142272,7 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126065,32 +142288,32 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadMediaInputClusterRevision : public ReadAttribute { +class ReadContentLauncherClusterRevision : public ReadAttribute { public: - ReadMediaInputClusterRevision() + ReadContentLauncherClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadMediaInputClusterRevision() + ~ReadContentLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput ClusterRevision read Error", error); + LogNSError("ContentLauncher ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126099,25 +142322,25 @@ class ReadMediaInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaInputClusterRevision() + SubscribeAttributeContentLauncherClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaInputClusterRevision() + ~SubscribeAttributeContentLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126131,7 +142354,7 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126145,12 +142368,15 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster LowPower | 0x0508 | +| Cluster AudioOutput | 0x050B | |------------------------------------------------------------------------------| | Commands: | | -| * Sleep | 0x00 | +| * SelectOutput | 0x00 | +| * RenameOutput | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | +| * OutputList | 0x0000 | +| * CurrentOutput | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -126162,78 +142388,294 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command Sleep + * Command SelectOutput */ -class LowPowerSleep : public ClusterCommand { +class AudioOutputSelectOutput : public ClusterCommand { public: - LowPowerSleep() - : ClusterCommand("sleep") + AudioOutputSelectOutput() + : ClusterCommand("select-output") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster sleepWithParams: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); - } - }]; + [cluster selectOutputWithParams: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::AudioOutput::Commands::SelectOutput::Type mRequest; +}; + +/* + * Command RenameOutput + */ +class AudioOutputRenameOutput : public ClusterCommand { +public: + AudioOutputRenameOutput() + : ClusterCommand("rename-output") + { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::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); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster renameOutputWithParams: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::AudioOutput::Commands::RenameOutput::Type mRequest; +}; + +/* + * Attribute OutputList + */ +class ReadAudioOutputOutputList : public ReadAttribute { +public: + ReadAudioOutputOutputList() + : ReadAttribute("output-list") + { + } + + ~ReadAudioOutputOutputList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::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); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.OutputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AudioOutput OutputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { +public: + SubscribeAttributeAudioOutputOutputList() + : SubscribeAttribute("output-list") + { + } + + ~SubscribeAttributeAudioOutputOutputList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::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); + __auto_type * cluster = [[MTRBaseClusterAudioOutput 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 subscribeAttributeOutputListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.OutputList 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; + } +}; + +/* + * Attribute CurrentOutput + */ +class ReadAudioOutputCurrentOutput : public ReadAttribute { +public: + ReadAudioOutputCurrentOutput() + : ReadAttribute("current-output") + { + } + + ~ReadAudioOutputCurrentOutput() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::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); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AudioOutput CurrentOutput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { +public: + SubscribeAttributeAudioOutputCurrentOutput() + : SubscribeAttribute("current-output") + { + } + + ~SubscribeAttributeAudioOutputCurrentOutput() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::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); + __auto_type * cluster = [[MTRBaseClusterAudioOutput 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 subscribeAttributeCurrentOutputWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.CurrentOutput 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; + } }; /* * Attribute GeneratedCommandList */ -class ReadLowPowerGeneratedCommandList : public ReadAttribute { +class ReadAudioOutputGeneratedCommandList : public ReadAttribute { public: - ReadLowPowerGeneratedCommandList() + ReadAudioOutputGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLowPowerGeneratedCommandList() + ~ReadAudioOutputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower GeneratedCommandList read Error", error); + LogNSError("AudioOutput GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126242,25 +142684,25 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerGeneratedCommandList() + SubscribeAttributeAudioOutputGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLowPowerGeneratedCommandList() + ~SubscribeAttributeAudioOutputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126274,7 +142716,7 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126290,32 +142732,32 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute /* * Attribute AcceptedCommandList */ -class ReadLowPowerAcceptedCommandList : public ReadAttribute { +class ReadAudioOutputAcceptedCommandList : public ReadAttribute { public: - ReadLowPowerAcceptedCommandList() + ReadAudioOutputAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLowPowerAcceptedCommandList() + ~ReadAudioOutputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower AcceptedCommandList read Error", error); + LogNSError("AudioOutput AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126324,25 +142766,25 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerAcceptedCommandList() + SubscribeAttributeAudioOutputAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLowPowerAcceptedCommandList() + ~SubscribeAttributeAudioOutputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126356,7 +142798,7 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126374,32 +142816,32 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute /* * Attribute EventList */ -class ReadLowPowerEventList : public ReadAttribute { +class ReadAudioOutputEventList : public ReadAttribute { public: - ReadLowPowerEventList() + ReadAudioOutputEventList() : ReadAttribute("event-list") { } - ~ReadLowPowerEventList() + ~ReadAudioOutputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); + NSLog(@"AudioOutput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower EventList read Error", error); + LogNSError("AudioOutput EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126408,25 +142850,25 @@ class ReadLowPowerEventList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerEventList() + SubscribeAttributeAudioOutputEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLowPowerEventList() + ~SubscribeAttributeAudioOutputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126440,7 +142882,7 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); + NSLog(@"AudioOutput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126458,32 +142900,32 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadLowPowerAttributeList : public ReadAttribute { +class ReadAudioOutputAttributeList : public ReadAttribute { public: - ReadLowPowerAttributeList() + ReadAudioOutputAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLowPowerAttributeList() + ~ReadAudioOutputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower AttributeList read Error", error); + LogNSError("AudioOutput AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126492,25 +142934,25 @@ class ReadLowPowerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerAttributeList() + SubscribeAttributeAudioOutputAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLowPowerAttributeList() + ~SubscribeAttributeAudioOutputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126524,7 +142966,7 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126540,32 +142982,32 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadLowPowerFeatureMap : public ReadAttribute { +class ReadAudioOutputFeatureMap : public ReadAttribute { public: - ReadLowPowerFeatureMap() + ReadAudioOutputFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLowPowerFeatureMap() + ~ReadAudioOutputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower FeatureMap read Error", error); + LogNSError("AudioOutput FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126574,25 +143016,25 @@ class ReadLowPowerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLowPowerFeatureMap() + SubscribeAttributeAudioOutputFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLowPowerFeatureMap() + ~SubscribeAttributeAudioOutputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126606,7 +143048,7 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126622,32 +143064,32 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadLowPowerClusterRevision : public ReadAttribute { +class ReadAudioOutputClusterRevision : public ReadAttribute { public: - ReadLowPowerClusterRevision() + ReadAudioOutputClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLowPowerClusterRevision() + ~ReadAudioOutputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower ClusterRevision read Error", error); + LogNSError("AudioOutput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126656,25 +143098,25 @@ class ReadLowPowerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLowPowerClusterRevision() + SubscribeAttributeAudioOutputClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLowPowerClusterRevision() + ~SubscribeAttributeAudioOutputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126688,7 +143130,7 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126702,12 +143144,16 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster KeypadInput | 0x0509 | +| Cluster ApplicationLauncher | 0x050C | |------------------------------------------------------------------------------| | Commands: | | -| * SendKey | 0x00 | +| * LaunchApp | 0x00 | +| * StopApp | 0x01 | +| * HideApp | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | +| * CatalogList | 0x0000 | +| * CurrentApp | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -126719,44 +143165,179 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command SendKey + * Command LaunchApp */ -class KeypadInputSendKey : public ClusterCommand { +class ApplicationLauncherLaunchApp : public ClusterCommand { public: - KeypadInputSendKey() - : ClusterCommand("send-key") + ApplicationLauncherLaunchApp() + : ClusterCommand("launch-app") + , mComplex_Application(&mRequest.application) { - AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); + AddArgument("Application", &mComplex_Application); + AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + TypedComplexArgument> mComplex_Application; +}; + +/* + * Command StopApp + */ +class ApplicationLauncherStopApp : public ClusterCommand { +public: + ApplicationLauncherStopApp() + : ClusterCommand("stop-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::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); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; + TypedComplexArgument> mComplex_Application; +}; + +/* + * Command HideApp + */ +class ApplicationLauncherHideApp : public ClusterCommand { +public: + ApplicationLauncherHideApp() + : ClusterCommand("hide-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster sendKeyWithParams:params completion: - ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { + [cluster hideAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -126768,38 +143349,39 @@ class KeypadInputSendKey : public ClusterCommand { } private: - chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; + TypedComplexArgument> mComplex_Application; }; /* - * Attribute GeneratedCommandList + * Attribute CatalogList */ -class ReadKeypadInputGeneratedCommandList : public ReadAttribute { +class ReadApplicationLauncherCatalogList : public ReadAttribute { public: - ReadKeypadInputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadApplicationLauncherCatalogList() + : ReadAttribute("catalog-list") { } - ~ReadKeypadInputGeneratedCommandList() + ~ReadApplicationLauncherCatalogList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput GeneratedCommandList read Error", error); + LogNSError("ApplicationLauncher CatalogList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126808,25 +143390,25 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeApplicationLauncherCatalogList() + : SubscribeAttribute("catalog-list") { } - ~SubscribeAttributeKeypadInputGeneratedCommandList() + ~SubscribeAttributeApplicationLauncherCatalogList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126837,10 +143419,10 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCatalogListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126854,34 +143436,34 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib }; /* - * Attribute AcceptedCommandList + * Attribute CurrentApp */ -class ReadKeypadInputAcceptedCommandList : public ReadAttribute { +class ReadApplicationLauncherCurrentApp : public ReadAttribute { public: - ReadKeypadInputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadApplicationLauncherCurrentApp() + : ReadAttribute("current-app") { } - ~ReadKeypadInputAcceptedCommandList() + ~ReadApplicationLauncherCurrentApp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentAppWithCompletion:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput AcceptedCommandList read Error", error); + LogNSError("ApplicationLauncher CurrentApp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126890,25 +143472,25 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeApplicationLauncherCurrentApp() + : SubscribeAttribute("current-app") { } - ~SubscribeAttributeKeypadInputAcceptedCommandList() + ~SubscribeAttributeApplicationLauncherCurrentApp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -126919,10 +143501,10 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentAppWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -126935,37 +143517,35 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadKeypadInputEventList : public ReadAttribute { +class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { public: - ReadKeypadInputEventList() - : ReadAttribute("event-list") + ReadApplicationLauncherGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadKeypadInputEventList() + ~ReadApplicationLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput EventList read Error", error); + LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -126974,25 +143554,25 @@ class ReadKeypadInputEventList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeApplicationLauncherGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeKeypadInputEventList() + ~SubscribeAttributeApplicationLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127003,10 +143583,10 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.EventList response %@", [value description]); + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127019,37 +143599,35 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadKeypadInputAttributeList : public ReadAttribute { +class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { public: - ReadKeypadInputAttributeList() - : ReadAttribute("attribute-list") + ReadApplicationLauncherAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadKeypadInputAttributeList() + ~ReadApplicationLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput AttributeList read Error", error); + LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127058,25 +143636,25 @@ class ReadKeypadInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeApplicationLauncherAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeKeypadInputAttributeList() + ~SubscribeAttributeApplicationLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127087,10 +143665,10 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127103,35 +143681,37 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadKeypadInputFeatureMap : public ReadAttribute { +class ReadApplicationLauncherEventList : public ReadAttribute { public: - ReadKeypadInputFeatureMap() - : ReadAttribute("feature-map") + ReadApplicationLauncherEventList() + : ReadAttribute("event-list") { } - ~ReadKeypadInputFeatureMap() + ~ReadApplicationLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput FeatureMap read Error", error); + LogNSError("ApplicationLauncher EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127140,25 +143720,25 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeApplicationLauncherEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeKeypadInputFeatureMap() + ~SubscribeAttributeApplicationLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127169,10 +143749,10 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127185,35 +143765,37 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadKeypadInputClusterRevision : public ReadAttribute { +class ReadApplicationLauncherAttributeList : public ReadAttribute { public: - ReadKeypadInputClusterRevision() - : ReadAttribute("cluster-revision") + ReadApplicationLauncherAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadKeypadInputClusterRevision() + ~ReadApplicationLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput ClusterRevision read Error", error); + LogNSError("ApplicationLauncher AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127222,25 +143804,25 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeApplicationLauncherAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeKeypadInputClusterRevision() + ~SubscribeAttributeApplicationLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127251,10 +143833,10 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127267,327 +143849,35 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ContentLauncher | 0x050A | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchContent | 0x00 | -| * LaunchURL | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AcceptHeader | 0x0000 | -| * SupportedStreamingProtocols | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command LaunchContent - */ -class ContentLauncherLaunchContent : public ClusterCommand { -public: - ContentLauncherLaunchContent() - : ClusterCommand("launch-content") - , mComplex_Search(&mRequest.search) - { - AddArgument("Search", &mComplex_Search); - AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.search = [MTRContentLauncherClusterContentSearchStruct new]; - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.search.parameterList) { - MTRContentLauncherClusterParameterStruct * newElement_1; - newElement_1 = [MTRContentLauncherClusterParameterStruct new]; - newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; - newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; - if (entry_1.externalIDList.HasValue()) { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - for (auto & entry_4 : entry_1.externalIDList.Value()) { - MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; - newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; - newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() length:entry_4.name.size() encoding:NSUTF8StringEncoding]; - newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() length:entry_4.value.size() encoding:NSUTF8StringEncoding]; - [array_4 addObject:newElement_4]; - } - newElement_1.externalIDList = array_4; - } - } else { - newElement_1.externalIDList = nil; - } - [array_1 addObject:newElement_1]; - } - params.search.parameterList = array_1; - } - params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchContentWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; - TypedComplexArgument mComplex_Search; -}; - -/* - * Command LaunchURL - */ -class ContentLauncherLaunchURL : public ClusterCommand { -public: - ContentLauncherLaunchURL() - : ClusterCommand("launch-url") - , mComplex_BrandingInformation(&mRequest.brandingInformation) - { - AddArgument("ContentURL", &mRequest.contentURL); - AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() length:mRequest.contentURL.size() encoding:NSUTF8StringEncoding]; - if (mRequest.displayString.HasValue()) { - params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() length:mRequest.displayString.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.displayString = nil; - } - if (mRequest.brandingInformation.HasValue()) { - params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; - params.brandingInformation.providerName = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() length:mRequest.brandingInformation.Value().providerName.size() encoding:NSUTF8StringEncoding]; - if (mRequest.brandingInformation.Value().background.HasValue()) { - params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { - params.brandingInformation.background.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.imageURL = nil; - } - if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { - params.brandingInformation.background.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() length:mRequest.brandingInformation.Value().background.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.color = nil; - } - if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { - params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.background.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; - params.brandingInformation.background.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; - params.brandingInformation.background.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; - } else { - params.brandingInformation.background.size = nil; - } - } else { - params.brandingInformation.background = nil; - } - if (mRequest.brandingInformation.Value().logo.HasValue()) { - params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { - params.brandingInformation.logo.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.imageURL = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { - params.brandingInformation.logo.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.color = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { - params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.logo.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; - params.brandingInformation.logo.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; - params.brandingInformation.logo.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; - } else { - params.brandingInformation.logo.size = nil; - } - } else { - params.brandingInformation.logo = nil; - } - if (mRequest.brandingInformation.Value().progressBar.HasValue()) { - params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { - params.brandingInformation.progressBar.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.imageURL = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { - params.brandingInformation.progressBar.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.color = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { - params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.progressBar.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; - params.brandingInformation.progressBar.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; - params.brandingInformation.progressBar.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; - } else { - params.brandingInformation.progressBar.size = nil; - } - } else { - params.brandingInformation.progressBar = nil; - } - if (mRequest.brandingInformation.Value().splash.HasValue()) { - params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { - params.brandingInformation.splash.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.imageURL = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { - params.brandingInformation.splash.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.color = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { - params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.splash.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; - params.brandingInformation.splash.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; - params.brandingInformation.splash.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; - } else { - params.brandingInformation.splash.size = nil; - } - } else { - params.brandingInformation.splash = nil; - } - if (mRequest.brandingInformation.Value().waterMark.HasValue()) { - params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { - params.brandingInformation.waterMark.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.imageURL = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { - params.brandingInformation.waterMark.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.color = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { - params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.waterMark.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; - params.brandingInformation.waterMark.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; - params.brandingInformation.waterMark.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; - } else { - params.brandingInformation.waterMark.size = nil; - } - } else { - params.brandingInformation.waterMark = nil; - } - } else { - params.brandingInformation = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchURLWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; - TypedComplexArgument> mComplex_BrandingInformation; -}; - /* - * Attribute AcceptHeader + * Attribute FeatureMap */ -class ReadContentLauncherAcceptHeader : public ReadAttribute { +class ReadApplicationLauncherFeatureMap : public ReadAttribute { public: - ReadContentLauncherAcceptHeader() - : ReadAttribute("accept-header") + ReadApplicationLauncherFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadContentLauncherAcceptHeader() + ~ReadApplicationLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AcceptHeader read Error", error); + LogNSError("ApplicationLauncher FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127596,25 +143886,25 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptHeader() - : SubscribeAttribute("accept-header") + SubscribeAttributeApplicationLauncherFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeContentLauncherAcceptHeader() + ~SubscribeAttributeApplicationLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127625,10 +143915,10 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptHeaderWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127642,34 +143932,34 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute }; /* - * Attribute SupportedStreamingProtocols + * Attribute ClusterRevision */ -class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { +class ReadApplicationLauncherClusterRevision : public ReadAttribute { public: - ReadContentLauncherSupportedStreamingProtocols() - : ReadAttribute("supported-streaming-protocols") + ReadApplicationLauncherClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadContentLauncherSupportedStreamingProtocols() + ~ReadApplicationLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + LogNSError("ApplicationLauncher ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127678,25 +143968,25 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherSupportedStreamingProtocols() - : SubscribeAttribute("supported-streaming-protocols") + SubscribeAttributeApplicationLauncherClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() + ~SubscribeAttributeApplicationLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127707,10 +143997,10 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127723,35 +144013,59 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationBasic | 0x050D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0000 | +| * VendorID | 0x0001 | +| * ApplicationName | 0x0002 | +| * ProductID | 0x0003 | +| * Application | 0x0004 | +| * Status | 0x0005 | +| * ApplicationVersion | 0x0006 | +| * AllowedVendorList | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Attribute VendorName */ -class ReadContentLauncherGeneratedCommandList : public ReadAttribute { +class ReadApplicationBasicVendorName : public ReadAttribute { public: - ReadContentLauncherGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadApplicationBasicVendorName() + : ReadAttribute("vendor-name") { } - ~ReadContentLauncherGeneratedCommandList() + ~ReadApplicationBasicVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher GeneratedCommandList read Error", error); + LogNSError("ApplicationBasic VendorName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127760,25 +144074,25 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeApplicationBasicVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeContentLauncherGeneratedCommandList() + ~SubscribeAttributeApplicationBasicVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127789,10 +144103,10 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127806,34 +144120,34 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute VendorID */ -class ReadContentLauncherAcceptedCommandList : public ReadAttribute { +class ReadApplicationBasicVendorID : public ReadAttribute { public: - ReadContentLauncherAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadApplicationBasicVendorID() + : ReadAttribute("vendor-id") { } - ~ReadContentLauncherAcceptedCommandList() + ~ReadApplicationBasicVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AcceptedCommandList read Error", error); + LogNSError("ApplicationBasic VendorID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127842,25 +144156,25 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeApplicationBasicVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeContentLauncherAcceptedCommandList() + ~SubscribeAttributeApplicationBasicVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127871,10 +144185,10 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127887,37 +144201,35 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ApplicationName */ -class ReadContentLauncherEventList : public ReadAttribute { +class ReadApplicationBasicApplicationName : public ReadAttribute { public: - ReadContentLauncherEventList() - : ReadAttribute("event-list") + ReadApplicationBasicApplicationName() + : ReadAttribute("application-name") { } - ~ReadContentLauncherEventList() + ~ReadApplicationBasicApplicationName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher EventList read Error", error); + LogNSError("ApplicationBasic ApplicationName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -127926,25 +144238,25 @@ class ReadContentLauncherEventList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeApplicationBasicApplicationName() + : SubscribeAttribute("application-name") { } - ~SubscribeAttributeContentLauncherEventList() + ~SubscribeAttributeApplicationBasicApplicationName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -127955,10 +144267,10 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeApplicationNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -127971,37 +144283,35 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ProductID */ -class ReadContentLauncherAttributeList : public ReadAttribute { +class ReadApplicationBasicProductID : public ReadAttribute { public: - ReadContentLauncherAttributeList() - : ReadAttribute("attribute-list") + ReadApplicationBasicProductID() + : ReadAttribute("product-id") { } - ~ReadContentLauncherAttributeList() + ~ReadApplicationBasicProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AttributeList read Error", error); + LogNSError("ApplicationBasic ProductID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128010,25 +144320,25 @@ class ReadContentLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeApplicationBasicProductID() + : SubscribeAttribute("product-id") { } - ~SubscribeAttributeContentLauncherAttributeList() + ~SubscribeAttributeApplicationBasicProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128039,10 +144349,10 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128056,34 +144366,34 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute Application */ -class ReadContentLauncherFeatureMap : public ReadAttribute { +class ReadApplicationBasicApplication : public ReadAttribute { public: - ReadContentLauncherFeatureMap() - : ReadAttribute("feature-map") + ReadApplicationBasicApplication() + : ReadAttribute("application") { } - ~ReadContentLauncherFeatureMap() + ~ReadApplicationBasicApplication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationWithCompletion:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher FeatureMap read Error", error); + LogNSError("ApplicationBasic Application read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128092,25 +144402,25 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeApplicationBasicApplication() + : SubscribeAttribute("application") { } - ~SubscribeAttributeContentLauncherFeatureMap() + ~SubscribeAttributeApplicationBasicApplication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128121,10 +144431,10 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeApplicationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128138,232 +144448,116 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute Status */ -class ReadContentLauncherClusterRevision : public ReadAttribute { +class ReadApplicationBasicStatus : public ReadAttribute { public: - ReadContentLauncherClusterRevision() - : ReadAttribute("cluster-revision") + ReadApplicationBasicStatus() + : ReadAttribute("status") { } - ~ReadContentLauncherClusterRevision() + ~ReadApplicationBasicStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher ClusterRevision read Error", error); + LogNSError("ApplicationBasic Status read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeContentLauncherClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeContentLauncherClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterContentLauncher 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 subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision 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; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster AudioOutput | 0x050B | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectOutput | 0x00 | -| * RenameOutput | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OutputList | 0x0000 | -| * CurrentOutput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SelectOutput - */ -class AudioOutputSelectOutput : public ClusterCommand { -public: - AudioOutputSelectOutput() - : ClusterCommand("select-output") - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectOutputWithParams: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); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; }; -/* - * Command RenameOutput - */ -class AudioOutputRenameOutput : public ClusterCommand { +class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { public: - AudioOutputRenameOutput() - : ClusterCommand("rename-output") + SubscribeAttributeApplicationBasicStatus() + : SubscribeAttribute("status") { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeApplicationBasicStatus() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster renameOutputWithParams: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); - } - }]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic 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 subscribeAttributeStatusWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Status 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; } - -private: - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; /* - * Attribute OutputList + * Attribute ApplicationVersion */ -class ReadAudioOutputOutputList : public ReadAttribute { +class ReadApplicationBasicApplicationVersion : public ReadAttribute { public: - ReadAudioOutputOutputList() - : ReadAttribute("output-list") + ReadApplicationBasicApplicationVersion() + : ReadAttribute("application-version") { } - ~ReadAudioOutputOutputList() + ~ReadApplicationBasicApplicationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput OutputList read Error", error); + LogNSError("ApplicationBasic ApplicationVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128372,25 +144566,25 @@ class ReadAudioOutputOutputList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputOutputList() - : SubscribeAttribute("output-list") + SubscribeAttributeApplicationBasicApplicationVersion() + : SubscribeAttribute("application-version") { } - ~SubscribeAttributeAudioOutputOutputList() + ~SubscribeAttributeApplicationBasicApplicationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128401,10 +144595,10 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutputListWithParams:params + [cluster subscribeAttributeApplicationVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128418,34 +144612,34 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { }; /* - * Attribute CurrentOutput + * Attribute AllowedVendorList */ -class ReadAudioOutputCurrentOutput : public ReadAttribute { +class ReadApplicationBasicAllowedVendorList : public ReadAttribute { public: - ReadAudioOutputCurrentOutput() - : ReadAttribute("current-output") + ReadApplicationBasicAllowedVendorList() + : ReadAttribute("allowed-vendor-list") { } - ~ReadAudioOutputCurrentOutput() + ~ReadApplicationBasicAllowedVendorList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput CurrentOutput read Error", error); + LogNSError("ApplicationBasic AllowedVendorList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128454,25 +144648,25 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputCurrentOutput() - : SubscribeAttribute("current-output") + SubscribeAttributeApplicationBasicAllowedVendorList() + : SubscribeAttribute("allowed-vendor-list") { } - ~SubscribeAttributeAudioOutputCurrentOutput() + ~SubscribeAttributeApplicationBasicAllowedVendorList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128483,10 +144677,10 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentOutputWithParams:params + [cluster subscribeAttributeAllowedVendorListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128502,32 +144696,32 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadAudioOutputGeneratedCommandList : public ReadAttribute { +class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { public: - ReadAudioOutputGeneratedCommandList() + ReadApplicationBasicGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAudioOutputGeneratedCommandList() + ~ReadApplicationBasicGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput GeneratedCommandList read Error", error); + LogNSError("ApplicationBasic GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128536,25 +144730,25 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputGeneratedCommandList() + SubscribeAttributeApplicationBasicGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAudioOutputGeneratedCommandList() + ~SubscribeAttributeApplicationBasicGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128568,7 +144762,7 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128584,32 +144778,32 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib /* * Attribute AcceptedCommandList */ -class ReadAudioOutputAcceptedCommandList : public ReadAttribute { +class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { public: - ReadAudioOutputAcceptedCommandList() + ReadApplicationBasicAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAudioOutputAcceptedCommandList() + ~ReadApplicationBasicAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput AcceptedCommandList read Error", error); + LogNSError("ApplicationBasic AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128618,25 +144812,25 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAcceptedCommandList() + SubscribeAttributeApplicationBasicAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAudioOutputAcceptedCommandList() + ~SubscribeAttributeApplicationBasicAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128650,7 +144844,7 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128668,32 +144862,32 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu /* * Attribute EventList */ -class ReadAudioOutputEventList : public ReadAttribute { +class ReadApplicationBasicEventList : public ReadAttribute { public: - ReadAudioOutputEventList() + ReadApplicationBasicEventList() : ReadAttribute("event-list") { } - ~ReadAudioOutputEventList() + ~ReadApplicationBasicEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.EventList response %@", [value description]); + NSLog(@"ApplicationBasic.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput EventList read Error", error); + LogNSError("ApplicationBasic EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128702,25 +144896,25 @@ class ReadAudioOutputEventList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputEventList() + SubscribeAttributeApplicationBasicEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAudioOutputEventList() + ~SubscribeAttributeApplicationBasicEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128734,7 +144928,7 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.EventList response %@", [value description]); + NSLog(@"ApplicationBasic.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128752,32 +144946,32 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadAudioOutputAttributeList : public ReadAttribute { +class ReadApplicationBasicAttributeList : public ReadAttribute { public: - ReadAudioOutputAttributeList() + ReadApplicationBasicAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAudioOutputAttributeList() + ~ReadApplicationBasicAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput AttributeList read Error", error); + LogNSError("ApplicationBasic AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128786,25 +144980,25 @@ class ReadAudioOutputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAttributeList() + SubscribeAttributeApplicationBasicAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAudioOutputAttributeList() + ~SubscribeAttributeApplicationBasicAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128818,7 +145012,7 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128834,32 +145028,32 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadAudioOutputFeatureMap : public ReadAttribute { +class ReadApplicationBasicFeatureMap : public ReadAttribute { public: - ReadAudioOutputFeatureMap() + ReadApplicationBasicFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAudioOutputFeatureMap() + ~ReadApplicationBasicFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput FeatureMap read Error", error); + LogNSError("ApplicationBasic FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128868,25 +145062,25 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputFeatureMap() + SubscribeAttributeApplicationBasicFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAudioOutputFeatureMap() + ~SubscribeAttributeApplicationBasicFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128900,7 +145094,7 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128916,32 +145110,32 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadAudioOutputClusterRevision : public ReadAttribute { +class ReadApplicationBasicClusterRevision : public ReadAttribute { public: - ReadAudioOutputClusterRevision() + ReadApplicationBasicClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAudioOutputClusterRevision() + ~ReadApplicationBasicClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput ClusterRevision read Error", error); + LogNSError("ApplicationBasic ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -128950,25 +145144,25 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputClusterRevision() + SubscribeAttributeApplicationBasicClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAudioOutputClusterRevision() + ~SubscribeAttributeApplicationBasicClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -128982,7 +145176,7 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -128996,16 +145190,14 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster ApplicationLauncher | 0x050C | +| Cluster AccountLogin | 0x050E | |------------------------------------------------------------------------------| | Commands: | | -| * LaunchApp | 0x00 | -| * StopApp | 0x01 | -| * HideApp | 0x02 | +| * GetSetupPIN | 0x00 | +| * Login | 0x02 | +| * Logout | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * CatalogList | 0x0000 | -| * CurrentApp | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -129014,226 +145206,205 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * LoggedOut | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command LaunchApp + * Command GetSetupPIN */ -class ApplicationLauncherLaunchApp : public ClusterCommand { +class AccountLoginGetSetupPIN : public ClusterCommand { public: - ApplicationLauncherLaunchApp() - : ClusterCommand("launch-app") - , mComplex_Application(&mRequest.application) + AccountLoginGetSetupPIN() + : ClusterCommand("get-setup-pin") { - AddArgument("Application", &mComplex_Application); - AddArgument("Data", &mRequest.data); + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; - } - if (mRequest.data.HasValue()) { - params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; - } else { - params.data = nil; - } + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getSetupPINWithParams:params completion: + ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; - TypedComplexArgument> mComplex_Application; + chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; }; /* - * Command StopApp + * Command Login */ -class ApplicationLauncherStopApp : public ClusterCommand { +class AccountLoginLogin : public ClusterCommand { public: - ApplicationLauncherStopApp() - : ClusterCommand("stop-app") - , mComplex_Application(&mRequest.application) + AccountLoginLogin() + : ClusterCommand("login") { - AddArgument("Application", &mComplex_Application); + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + AddArgument("SetupPIN", &mRequest.setupPIN); +#if MTR_ENABLE_PROVISIONAL + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; + params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() length:mRequest.setupPIN.size() encoding:NSUTF8StringEncoding]; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.node.HasValue()) { + params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; } else { - params.application = nil; + params.node = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster loginWithParams: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::ApplicationLauncher::Commands::StopApp::Type mRequest; - TypedComplexArgument> mComplex_Application; + chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; }; /* - * Command HideApp + * Command Logout */ -class ApplicationLauncherHideApp : public ClusterCommand { +class AccountLoginLogout : public ClusterCommand { public: - ApplicationLauncherHideApp() - : ClusterCommand("hide-app") - , mComplex_Application(&mRequest.application) + AccountLoginLogout() + : ClusterCommand("logout") { - AddArgument("Application", &mComplex_Application); +#if MTR_ENABLE_PROVISIONAL + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.node.HasValue()) { + params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; } else { - params.application = nil; + params.node = nil; } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster hideAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster logoutWithParams: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::ApplicationLauncher::Commands::HideApp::Type mRequest; - TypedComplexArgument> mComplex_Application; + chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; }; /* - * Attribute CatalogList + * Attribute GeneratedCommandList */ -class ReadApplicationLauncherCatalogList : public ReadAttribute { +class ReadAccountLoginGeneratedCommandList : public ReadAttribute { public: - ReadApplicationLauncherCatalogList() - : ReadAttribute("catalog-list") + ReadAccountLoginGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadApplicationLauncherCatalogList() + ~ReadAccountLoginGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher CatalogList read Error", error); + LogNSError("AccountLogin GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129242,25 +145413,25 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { +class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCatalogList() - : SubscribeAttribute("catalog-list") + SubscribeAttributeAccountLoginGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeApplicationLauncherCatalogList() + ~SubscribeAttributeAccountLoginGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129271,10 +145442,10 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCatalogListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129288,34 +145459,34 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu }; /* - * Attribute CurrentApp + * Attribute AcceptedCommandList */ -class ReadApplicationLauncherCurrentApp : public ReadAttribute { +class ReadAccountLoginAcceptedCommandList : public ReadAttribute { public: - ReadApplicationLauncherCurrentApp() - : ReadAttribute("current-app") + ReadAccountLoginAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadApplicationLauncherCurrentApp() + ~ReadAccountLoginAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentAppWithCompletion:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher CurrentApp read Error", error); + LogNSError("AccountLogin AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129324,25 +145495,25 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCurrentApp() - : SubscribeAttribute("current-app") + SubscribeAttributeAccountLoginAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationLauncherCurrentApp() + ~SubscribeAttributeAccountLoginAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129353,10 +145524,10 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentAppWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129369,35 +145540,37 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { +class ReadAccountLoginEventList : public ReadAttribute { public: - ReadApplicationLauncherGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadAccountLoginEventList() + : ReadAttribute("event-list") { } - ~ReadApplicationLauncherGeneratedCommandList() + ~ReadAccountLoginEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); + LogNSError("AccountLogin EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129406,25 +145579,25 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeAccountLoginEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationLauncherGeneratedCommandList() + ~SubscribeAttributeAccountLoginEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129435,10 +145608,10 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"AccountLogin.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129451,35 +145624,37 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { +class ReadAccountLoginAttributeList : public ReadAttribute { public: - ReadApplicationLauncherAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadAccountLoginAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadApplicationLauncherAcceptedCommandList() + ~ReadAccountLoginAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); + LogNSError("AccountLogin AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129488,25 +145663,25 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAccountLoginAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationLauncherAcceptedCommandList() + ~SubscribeAttributeAccountLoginAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129517,10 +145692,10 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129533,37 +145708,35 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadApplicationLauncherEventList : public ReadAttribute { +class ReadAccountLoginFeatureMap : public ReadAttribute { public: - ReadApplicationLauncherEventList() - : ReadAttribute("event-list") + ReadAccountLoginFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadApplicationLauncherEventList() + ~ReadAccountLoginFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher EventList read Error", error); + LogNSError("AccountLogin FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129572,25 +145745,25 @@ class ReadApplicationLauncherEventList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { +class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeAccountLoginFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationLauncherEventList() + ~SubscribeAttributeAccountLoginFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129601,10 +145774,10 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129617,37 +145790,35 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadApplicationLauncherAttributeList : public ReadAttribute { +class ReadAccountLoginClusterRevision : public ReadAttribute { public: - ReadApplicationLauncherAttributeList() - : ReadAttribute("attribute-list") + ReadAccountLoginClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadApplicationLauncherAttributeList() + ~ReadAccountLoginClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher AttributeList read Error", error); + LogNSError("AccountLogin ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129656,25 +145827,25 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAccountLoginClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationLauncherAttributeList() + ~SubscribeAttributeAccountLoginClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129685,10 +145856,10 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129701,223 +145872,599 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ContentControl | 0x050F | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpdatePIN | 0x00 | +| * ResetPIN | 0x01 | +| * Enable | 0x03 | +| * Disable | 0x04 | +| * AddBonusTime | 0x05 | +| * SetScreenDailyTime | 0x06 | +| * BlockUnratedContent | 0x07 | +| * UnblockUnratedContent | 0x08 | +| * SetOnDemandRatingThreshold | 0x09 | +| * SetScheduledContentRatingThreshold | 0x0A | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Enabled | 0x0000 | +| * OnDemandRatings | 0x0001 | +| * OnDemandRatingThreshold | 0x0002 | +| * ScheduledContentRatings | 0x0003 | +| * ScheduledContentRatingThreshold | 0x0004 | +| * ScreenDailyTime | 0x0005 | +| * RemainingScreenTime | 0x0006 | +| * BlockUnrated | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * RemainingScreenTimeExpired | 0x0000 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command UpdatePIN + */ +class ContentControlUpdatePIN : public ClusterCommand { +public: + ContentControlUpdatePIN() + : ClusterCommand("update-pin") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("OldPIN", &mRequest.oldPIN); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewPIN", &mRequest.newPIN); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UpdatePIN::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterUpdatePINParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.oldPIN.HasValue()) { + params.oldPIN = [[NSString alloc] initWithBytes:mRequest.oldPIN.Value().data() length:mRequest.oldPIN.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.oldPIN = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.newPIN = [[NSString alloc] initWithBytes:mRequest.newPIN.data() length:mRequest.newPIN.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updatePINWithParams: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::ContentControl::Commands::UpdatePIN::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResetPIN + */ +class ContentControlResetPIN : public ClusterCommand { +public: + ContentControlResetPIN() + : ClusterCommand("reset-pin") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::ResetPIN::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterResetPINParams 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 resetPINWithParams:params completion: + ^(MTRContentControlClusterResetPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Enable + */ +class ContentControlEnable : public ClusterCommand { +public: + ContentControlEnable() + : ClusterCommand("enable") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Enable::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterEnableParams 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 enableWithParams: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 +/* + * Command Disable + */ +class ContentControlDisable : public ClusterCommand { +public: + ContentControlDisable() + : ClusterCommand("disable") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Disable::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterDisableParams 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 disableWithParams: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 +/* + * Command AddBonusTime + */ +class ContentControlAddBonusTime : public ClusterCommand { +public: + ContentControlAddBonusTime() + : ClusterCommand("add-bonus-time") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PINCode", &mRequest.PINCode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("BonusTime", 0, UINT32_MAX, &mRequest.bonusTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBonusTime::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterAddBonusTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.PINCode.HasValue()) { + params.pinCode = [[NSString alloc] initWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pinCode = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.bonusTime.HasValue()) { + params.bonusTime = [NSNumber numberWithUnsignedInt:mRequest.bonusTime.Value()]; + } else { + params.bonusTime = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addBonusTimeWithParams: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::ContentControl::Commands::AddBonusTime::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Command SetScreenDailyTime */ -class ReadApplicationLauncherFeatureMap : public ReadAttribute { +class ContentControlSetScreenDailyTime : public ClusterCommand { public: - ReadApplicationLauncherFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadApplicationLauncherFeatureMap() + ContentControlSetScreenDailyTime() + : ClusterCommand("set-screen-daily-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ScreenTime", 0, UINT32_MAX, &mRequest.screenTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ApplicationLauncher FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetScreenDailyTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.screenTime = [NSNumber numberWithUnsignedInt:mRequest.screenTime]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setScreenDailyTimeWithParams: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::ContentControl::Commands::SetScreenDailyTime::Type mRequest; }; -class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command BlockUnratedContent + */ +class ContentControlBlockUnratedContent : public ClusterCommand { public: - SubscribeAttributeApplicationLauncherFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeApplicationLauncherFeatureMap() + ContentControlBlockUnratedContent() + : ClusterCommand("block-unrated-content") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher 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(); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterBlockUnratedContentParams 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 blockUnratedContentWithParams: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); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap 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; } + +private: }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Command UnblockUnratedContent */ -class ReadApplicationLauncherClusterRevision : public ReadAttribute { +class ContentControlUnblockUnratedContent : public ClusterCommand { public: - ReadApplicationLauncherClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadApplicationLauncherClusterRevision() + ContentControlUnblockUnratedContent() + : ClusterCommand("unblock-unrated-content") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + 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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ApplicationLauncher ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterUnblockUnratedContentParams 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 unblockUnratedContentWithParams: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: }; -class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetOnDemandRatingThreshold + */ +class ContentControlSetOnDemandRatingThreshold : public ClusterCommand { public: - SubscribeAttributeApplicationLauncherClusterRevision() - : SubscribeAttribute("cluster-revision") + ContentControlSetOnDemandRatingThreshold() + : ClusterCommand("set-on-demand-rating-threshold") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Rating", &mRequest.rating); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~SubscribeAttributeApplicationLauncherClusterRevision() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::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); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setOnDemandRatingThresholdWithParams: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::ContentControl::Commands::SetOnDemandRatingThreshold::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetScheduledContentRatingThreshold + */ +class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand { +public: + ContentControlSetScheduledContentRatingThreshold() + : ClusterCommand("set-scheduled-content-rating-threshold") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Rating", &mRequest.rating); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - 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); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher 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(); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setScheduledContentRatingThresholdWithParams: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); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision 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; } + +private: + chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationBasic | 0x050D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * VendorName | 0x0000 | -| * VendorID | 0x0001 | -| * ApplicationName | 0x0002 | -| * ProductID | 0x0003 | -| * Application | 0x0004 | -| * Status | 0x0005 | -| * ApplicationVersion | 0x0006 | -| * AllowedVendorList | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute VendorName + * Attribute Enabled */ -class ReadApplicationBasicVendorName : public ReadAttribute { +class ReadContentControlEnabled : public ReadAttribute { public: - ReadApplicationBasicVendorName() - : ReadAttribute("vendor-name") + ReadContentControlEnabled() + : ReadAttribute("enabled") { } - ~ReadApplicationBasicVendorName() + ~ReadContentControlEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.Enabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic VendorName read Error", error); + LogNSError("ContentControl Enabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -129926,25 +146473,25 @@ class ReadApplicationBasicVendorName : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { +class SubscribeAttributeContentControlEnabled : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeContentControlEnabled() + : SubscribeAttribute("enabled") { } - ~SubscribeAttributeApplicationBasicVendorName() + ~SubscribeAttributeContentControlEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -129955,10 +146502,10 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.Enabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -129971,35 +146518,38 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute VendorID + * Attribute OnDemandRatings */ -class ReadApplicationBasicVendorID : public ReadAttribute { +class ReadContentControlOnDemandRatings : public ReadAttribute { public: - ReadApplicationBasicVendorID() - : ReadAttribute("vendor-id") + ReadContentControlOnDemandRatings() + : ReadAttribute("on-demand-ratings") { } - ~ReadApplicationBasicVendorID() + ~ReadContentControlOnDemandRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnDemandRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic VendorID read Error", error); + LogNSError("ContentControl OnDemandRatings read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130008,25 +146558,25 @@ class ReadApplicationBasicVendorID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { +class SubscribeAttributeContentControlOnDemandRatings : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeContentControlOnDemandRatings() + : SubscribeAttribute("on-demand-ratings") { } - ~SubscribeAttributeApplicationBasicVendorID() + ~SubscribeAttributeContentControlOnDemandRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130037,10 +146587,10 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeOnDemandRatingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130053,35 +146603,38 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ApplicationName + * Attribute OnDemandRatingThreshold */ -class ReadApplicationBasicApplicationName : public ReadAttribute { +class ReadContentControlOnDemandRatingThreshold : public ReadAttribute { public: - ReadApplicationBasicApplicationName() - : ReadAttribute("application-name") + ReadContentControlOnDemandRatingThreshold() + : ReadAttribute("on-demand-rating-threshold") { } - ~ReadApplicationBasicApplicationName() + ~ReadContentControlOnDemandRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnDemandRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ApplicationName read Error", error); + LogNSError("ContentControl OnDemandRatingThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130090,25 +146643,25 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { +class SubscribeAttributeContentControlOnDemandRatingThreshold : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationName() - : SubscribeAttribute("application-name") + SubscribeAttributeContentControlOnDemandRatingThreshold() + : SubscribeAttribute("on-demand-rating-threshold") { } - ~SubscribeAttributeApplicationBasicApplicationName() + ~SubscribeAttributeContentControlOnDemandRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130119,10 +146672,10 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationNameWithParams:params + [cluster subscribeAttributeOnDemandRatingThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130135,35 +146688,38 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ProductID + * Attribute ScheduledContentRatings */ -class ReadApplicationBasicProductID : public ReadAttribute { +class ReadContentControlScheduledContentRatings : public ReadAttribute { public: - ReadApplicationBasicProductID() - : ReadAttribute("product-id") + ReadContentControlScheduledContentRatings() + : ReadAttribute("scheduled-content-ratings") { } - ~ReadApplicationBasicProductID() + ~ReadContentControlScheduledContentRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduledContentRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ProductID read Error", error); + LogNSError("ContentControl ScheduledContentRatings read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130172,25 +146728,25 @@ class ReadApplicationBasicProductID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { +class SubscribeAttributeContentControlScheduledContentRatings : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeContentControlScheduledContentRatings() + : SubscribeAttribute("scheduled-content-ratings") { } - ~SubscribeAttributeApplicationBasicProductID() + ~SubscribeAttributeContentControlScheduledContentRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130201,10 +146757,10 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeScheduledContentRatingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130217,35 +146773,38 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Application + * Attribute ScheduledContentRatingThreshold */ -class ReadApplicationBasicApplication : public ReadAttribute { +class ReadContentControlScheduledContentRatingThreshold : public ReadAttribute { public: - ReadApplicationBasicApplication() - : ReadAttribute("application") + ReadContentControlScheduledContentRatingThreshold() + : ReadAttribute("scheduled-content-rating-threshold") { } - ~ReadApplicationBasicApplication() + ~ReadContentControlScheduledContentRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationWithCompletion:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduledContentRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic Application read Error", error); + LogNSError("ContentControl ScheduledContentRatingThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130254,25 +146813,25 @@ class ReadApplicationBasicApplication : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { +class SubscribeAttributeContentControlScheduledContentRatingThreshold : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplication() - : SubscribeAttribute("application") + SubscribeAttributeContentControlScheduledContentRatingThreshold() + : SubscribeAttribute("scheduled-content-rating-threshold") { } - ~SubscribeAttributeApplicationBasicApplication() + ~SubscribeAttributeContentControlScheduledContentRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130283,10 +146842,10 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationWithParams:params + [cluster subscribeAttributeScheduledContentRatingThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130299,35 +146858,38 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Status + * Attribute ScreenDailyTime */ -class ReadApplicationBasicStatus : public ReadAttribute { +class ReadContentControlScreenDailyTime : public ReadAttribute { public: - ReadApplicationBasicStatus() - : ReadAttribute("status") + ReadContentControlScreenDailyTime() + : ReadAttribute("screen-daily-time") { } - ~ReadApplicationBasicStatus() + ~ReadContentControlScreenDailyTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScreenDailyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic Status read Error", error); + LogNSError("ContentControl ScreenDailyTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130336,25 +146898,25 @@ class ReadApplicationBasicStatus : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { +class SubscribeAttributeContentControlScreenDailyTime : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicStatus() - : SubscribeAttribute("status") + SubscribeAttributeContentControlScreenDailyTime() + : SubscribeAttribute("screen-daily-time") { } - ~SubscribeAttributeApplicationBasicStatus() + ~SubscribeAttributeContentControlScreenDailyTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130365,10 +146927,10 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusWithParams:params + [cluster subscribeAttributeScreenDailyTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130381,35 +146943,38 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ApplicationVersion + * Attribute RemainingScreenTime */ -class ReadApplicationBasicApplicationVersion : public ReadAttribute { +class ReadContentControlRemainingScreenTime : public ReadAttribute { public: - ReadApplicationBasicApplicationVersion() - : ReadAttribute("application-version") + ReadContentControlRemainingScreenTime() + : ReadAttribute("remaining-screen-time") { } - ~ReadApplicationBasicApplicationVersion() + ~ReadContentControlRemainingScreenTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingScreenTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ApplicationVersion read Error", error); + LogNSError("ContentControl RemainingScreenTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130418,25 +146983,25 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { +class SubscribeAttributeContentControlRemainingScreenTime : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationVersion() - : SubscribeAttribute("application-version") + SubscribeAttributeContentControlRemainingScreenTime() + : SubscribeAttribute("remaining-screen-time") { } - ~SubscribeAttributeApplicationBasicApplicationVersion() + ~SubscribeAttributeContentControlRemainingScreenTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130447,10 +147012,10 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationVersionWithParams:params + [cluster subscribeAttributeRemainingScreenTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130463,35 +147028,38 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AllowedVendorList + * Attribute BlockUnrated */ -class ReadApplicationBasicAllowedVendorList : public ReadAttribute { +class ReadContentControlBlockUnrated : public ReadAttribute { public: - ReadApplicationBasicAllowedVendorList() - : ReadAttribute("allowed-vendor-list") + ReadContentControlBlockUnrated() + : ReadAttribute("block-unrated") { } - ~ReadApplicationBasicAllowedVendorList() + ~ReadContentControlBlockUnrated() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBlockUnratedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockUnrated response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AllowedVendorList read Error", error); + LogNSError("ContentControl BlockUnrated read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130500,25 +147068,25 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { +class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAllowedVendorList() - : SubscribeAttribute("allowed-vendor-list") + SubscribeAttributeContentControlBlockUnrated() + : SubscribeAttribute("block-unrated") { } - ~SubscribeAttributeApplicationBasicAllowedVendorList() + ~SubscribeAttributeContentControlBlockUnrated() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130529,10 +147097,10 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAllowedVendorListWithParams:params + [cluster subscribeAttributeBlockUnratedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockUnrated response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130545,35 +147113,38 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { +class ReadContentControlGeneratedCommandList : public ReadAttribute { public: - ReadApplicationBasicGeneratedCommandList() + ReadContentControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadApplicationBasicGeneratedCommandList() + ~ReadContentControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + LogNSError("ContentControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130582,25 +147153,25 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicGeneratedCommandList() + SubscribeAttributeContentControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeApplicationBasicGeneratedCommandList() + ~SubscribeAttributeContentControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130614,7 +147185,7 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130627,35 +147198,38 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { +class ReadContentControlAcceptedCommandList : public ReadAttribute { public: - ReadApplicationBasicAcceptedCommandList() + ReadContentControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadApplicationBasicAcceptedCommandList() + ~ReadContentControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AcceptedCommandList read Error", error); + LogNSError("ContentControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130664,25 +147238,25 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAcceptedCommandList() + SubscribeAttributeContentControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationBasicAcceptedCommandList() + ~SubscribeAttributeContentControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130696,7 +147270,7 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130709,37 +147283,38 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadApplicationBasicEventList : public ReadAttribute { +class ReadContentControlEventList : public ReadAttribute { public: - ReadApplicationBasicEventList() + ReadContentControlEventList() : ReadAttribute("event-list") { } - ~ReadApplicationBasicEventList() + ~ReadContentControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); + NSLog(@"ContentControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic EventList read Error", error); + LogNSError("ContentControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130748,25 +147323,25 @@ class ReadApplicationBasicEventList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { +class SubscribeAttributeContentControlEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicEventList() + SubscribeAttributeContentControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationBasicEventList() + ~SubscribeAttributeContentControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130780,7 +147355,7 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); + NSLog(@"ContentControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130794,36 +147369,37 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadApplicationBasicAttributeList : public ReadAttribute { +class ReadContentControlAttributeList : public ReadAttribute { public: - ReadApplicationBasicAttributeList() + ReadContentControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadApplicationBasicAttributeList() + ~ReadContentControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + NSLog(@"ContentControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AttributeList read Error", error); + LogNSError("ContentControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130832,25 +147408,25 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { +class SubscribeAttributeContentControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAttributeList() + SubscribeAttributeContentControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationBasicAttributeList() + ~SubscribeAttributeContentControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130864,7 +147440,7 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + NSLog(@"ContentControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130877,35 +147453,38 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadApplicationBasicFeatureMap : public ReadAttribute { +class ReadContentControlFeatureMap : public ReadAttribute { public: - ReadApplicationBasicFeatureMap() + ReadContentControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadApplicationBasicFeatureMap() + ~ReadContentControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + NSLog(@"ContentControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic FeatureMap read Error", error); + LogNSError("ContentControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130914,25 +147493,25 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { +class SubscribeAttributeContentControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicFeatureMap() + SubscribeAttributeContentControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationBasicFeatureMap() + ~SubscribeAttributeContentControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -130946,7 +147525,7 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + NSLog(@"ContentControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -130959,35 +147538,38 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadApplicationBasicClusterRevision : public ReadAttribute { +class ReadContentControlClusterRevision : public ReadAttribute { public: - ReadApplicationBasicClusterRevision() + ReadContentControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadApplicationBasicClusterRevision() + ~ReadContentControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + NSLog(@"ContentControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ClusterRevision read Error", error); + LogNSError("ContentControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -130996,25 +147578,25 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { +class SubscribeAttributeContentControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicClusterRevision() + SubscribeAttributeContentControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationBasicClusterRevision() + ~SubscribeAttributeContentControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131028,7 +147610,7 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + NSLog(@"ContentControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131041,13 +147623,14 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster AccountLogin | 0x050E | +| Cluster ContentAppObserver | 0x0510 | |------------------------------------------------------------------------------| | Commands: | | -| * GetSetupPIN | 0x00 | -| * Login | 0x02 | -| * Logout | 0x03 | +| * ContentAppMessage | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * GeneratedCommandList | 0xFFF8 | @@ -131060,181 +147643,107 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command GetSetupPIN + * Command ContentAppMessage */ -class AccountLoginGetSetupPIN : public ClusterCommand { +class ContentAppObserverContentAppMessage : public ClusterCommand { public: - AccountLoginGetSetupPIN() - : ClusterCommand("get-setup-pin") + ContentAppObserverContentAppMessage() + : ClusterCommand("content-app-message") { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("EncodingHint", &mRequest.encodingHint); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getSetupPINWithParams:params completion: - ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; -}; - -/* - * Command Login - */ -class AccountLoginLogin : public ClusterCommand { -public: - AccountLoginLogin() - : ClusterCommand("login") - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - AddArgument("SetupPIN", &mRequest.setupPIN); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; - params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() length:mRequest.setupPIN.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.encodingHint = [[NSString alloc] initWithBytes:mRequest.encodingHint.data() length:mRequest.encodingHint.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster loginWithParams: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); - } - }]; + [cluster contentAppMessageWithParams:params completion: + ^(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type mRequest; }; -/* - * Command Logout - */ -class AccountLoginLogout : public ClusterCommand { -public: - AccountLoginLogout() - : ClusterCommand("logout") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLogoutParams 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 logoutWithParams: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; - } +#endif // MTR_ENABLE_PROVISIONAL -private: -}; +#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadAccountLoginGeneratedCommandList : public ReadAttribute { +class ReadContentAppObserverGeneratedCommandList : public ReadAttribute { public: - ReadAccountLoginGeneratedCommandList() + ReadContentAppObserverGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAccountLoginGeneratedCommandList() + ~ReadContentAppObserverGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin GeneratedCommandList read Error", error); + LogNSError("ContentAppObserver GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131243,25 +147752,25 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginGeneratedCommandList() + SubscribeAttributeContentAppObserverGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAccountLoginGeneratedCommandList() + ~SubscribeAttributeContentAppObserverGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131275,7 +147784,7 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131288,35 +147797,38 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadAccountLoginAcceptedCommandList : public ReadAttribute { +class ReadContentAppObserverAcceptedCommandList : public ReadAttribute { public: - ReadAccountLoginAcceptedCommandList() + ReadContentAppObserverAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAccountLoginAcceptedCommandList() + ~ReadContentAppObserverAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin AcceptedCommandList read Error", error); + LogNSError("ContentAppObserver AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131325,25 +147837,25 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAcceptedCommandList() + SubscribeAttributeContentAppObserverAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAccountLoginAcceptedCommandList() + ~SubscribeAttributeContentAppObserverAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131357,7 +147869,7 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131370,37 +147882,38 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadAccountLoginEventList : public ReadAttribute { +class ReadContentAppObserverEventList : public ReadAttribute { public: - ReadAccountLoginEventList() + ReadContentAppObserverEventList() : ReadAttribute("event-list") { } - ~ReadAccountLoginEventList() + ~ReadContentAppObserverEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.EventList response %@", [value description]); + NSLog(@"ContentAppObserver.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin EventList read Error", error); + LogNSError("ContentAppObserver EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131409,25 +147922,25 @@ class ReadAccountLoginEventList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverEventList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginEventList() + SubscribeAttributeContentAppObserverEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAccountLoginEventList() + ~SubscribeAttributeContentAppObserverEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131441,7 +147954,7 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.EventList response %@", [value description]); + NSLog(@"ContentAppObserver.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131455,36 +147968,37 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadAccountLoginAttributeList : public ReadAttribute { +class ReadContentAppObserverAttributeList : public ReadAttribute { public: - ReadAccountLoginAttributeList() + ReadContentAppObserverAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAccountLoginAttributeList() + ~ReadContentAppObserverAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin AttributeList read Error", error); + LogNSError("ContentAppObserver AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131493,25 +148007,25 @@ class ReadAccountLoginAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAttributeList() + SubscribeAttributeContentAppObserverAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAccountLoginAttributeList() + ~SubscribeAttributeContentAppObserverAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131525,7 +148039,7 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131538,35 +148052,38 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadAccountLoginFeatureMap : public ReadAttribute { +class ReadContentAppObserverFeatureMap : public ReadAttribute { public: - ReadAccountLoginFeatureMap() + ReadContentAppObserverFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAccountLoginFeatureMap() + ~ReadContentAppObserverFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin FeatureMap read Error", error); + LogNSError("ContentAppObserver FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131575,25 +148092,25 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginFeatureMap() + SubscribeAttributeContentAppObserverFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAccountLoginFeatureMap() + ~SubscribeAttributeContentAppObserverFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131607,7 +148124,7 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131620,35 +148137,38 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadAccountLoginClusterRevision : public ReadAttribute { +class ReadContentAppObserverClusterRevision : public ReadAttribute { public: - ReadAccountLoginClusterRevision() + ReadContentAppObserverClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAccountLoginClusterRevision() + ~ReadContentAppObserverClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin ClusterRevision read Error", error); + LogNSError("ContentAppObserver ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -131657,25 +148177,25 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginClusterRevision() + SubscribeAttributeContentAppObserverClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAccountLoginClusterRevision() + ~SubscribeAttributeContentAppObserverClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::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); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -131689,7 +148209,7 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -131702,6 +148222,8 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster ElectricalMeasurement | 0x0B04 | |------------------------------------------------------------------------------| @@ -155936,6 +172458,7 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * PingCountEvent | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL @@ -156802,8 +173325,8 @@ void registerClusterScenes(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -157293,6 +173816,14 @@ void registerClusterBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // @@ -157593,10 +174124,8 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // @@ -158632,77 +175161,142 @@ void registerClusterIcdManagement(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } -void registerClusterOvenOperationalState(Commands & commands) +void registerClusterTimer(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::Timer; + + const char * clusterName = "Timer"; + + commands_list clusterCommands = { + make_unique(Id), // +#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 +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#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 + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterOvenCavityOperationalState(Commands & commands) { #if MTR_ENABLE_PROVISIONAL - using namespace chip::app::Clusters::OvenOperationalState; + using namespace chip::app::Clusters::OvenCavityOperationalState; - const char * clusterName = "OvenOperationalState"; + const char * clusterName = "OvenCavityOperationalState"; commands_list clusterCommands = { make_unique(Id), // #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 make_unique(Id), // make_unique(Id), // make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -158711,6 +175305,118 @@ void registerClusterOvenOperationalState(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } +void registerClusterOvenMode(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::OvenMode; + + const char * clusterName = "OvenMode"; + + commands_list clusterCommands = { + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#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 + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterLaundryDryerControls(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::LaundryDryerControls; + + const char * clusterName = "LaundryDryerControls"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#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 + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} void registerClusterModeSelect(Commands & commands) { using namespace chip::app::Clusters::ModeSelect; @@ -158940,117 +175646,77 @@ void registerClusterLaundryWasherControls(Commands & commands) } void registerClusterRvcRunMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::RvcRunMode; const char * clusterName = "RvcRunMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#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(), // 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(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterRvcCleanMode(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::RvcCleanMode; const char * clusterName = "RvcCleanMode"; commands_list clusterCommands = { make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#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(), // 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(), // -#endif // MTR_ENABLE_PROVISIONAL }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterTemperatureControl(Commands & commands) { @@ -159564,161 +176230,101 @@ void registerClusterMicrowaveOvenControl(Commands & commands) } void registerClusterOperationalState(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::OperationalState; const char * clusterName = "OperationalState"; commands_list clusterCommands = { make_unique(Id), // -#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 -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#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(), // -#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(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterRvcOperationalState(Commands & commands) { -#if MTR_ENABLE_PROVISIONAL using namespace chip::app::Clusters::RvcOperationalState; const char * clusterName = "RvcOperationalState"; commands_list clusterCommands = { make_unique(Id), // -#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 -#if MTR_ENABLE_PROVISIONAL make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // -#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(), // -#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(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); -#endif // MTR_ENABLE_PROVISIONAL } void registerClusterHepaFilterMonitoring(Commands & commands) { @@ -159858,6 +176464,593 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } +void registerClusterBooleanStateConfiguration(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::BooleanStateConfiguration; + + const char * clusterName = "BooleanStateConfiguration"; + + commands_list clusterCommands = { + make_unique(Id), // +#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), // + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + 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(), // +#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(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterValveConfigurationAndControl(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ValveConfigurationAndControl; + + const char * clusterName = "ValveConfigurationAndControl"; + + commands_list clusterCommands = { + make_unique(Id), // +#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), // + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#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(), // + 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(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterElectricalEnergyMeasurement(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ElectricalEnergyMeasurement; + + const char * clusterName = "ElectricalEnergyMeasurement"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#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 + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterDemandResponseLoadControl(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::DemandResponseLoadControl; + + const char * clusterName = "DemandResponseLoadControl"; + + commands_list clusterCommands = { + make_unique(Id), // +#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 +#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), // + make_unique(Id), // +#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(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + 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(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterDeviceEnergyManagement(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::DeviceEnergyManagement; + + const char * clusterName = "DeviceEnergyManagement"; + + commands_list clusterCommands = { + make_unique(Id), // +#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 +#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 +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#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(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterEnergyEvse(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::EnergyEvse; + + const char * clusterName = "EnergyEvse"; + + commands_list clusterCommands = { + make_unique(Id), // +#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 +#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 +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#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(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#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(), // + 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(), // +#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(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} void registerClusterDoorLock(Commands & commands) { using namespace chip::app::Clusters::DoorLock; @@ -161866,6 +179059,15 @@ void registerClusterChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#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), // make_unique(Id), // @@ -161923,6 +179125,8 @@ void registerClusterTargetNavigator(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -161946,6 +179150,15 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#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), // make_unique(Id), // @@ -161963,6 +179176,22 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#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 make_unique(), // make_unique(), // make_unique(), // @@ -161977,6 +179206,8 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -162257,10 +179488,161 @@ void registerClusterAccountLogin(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); } +void registerClusterContentControl(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ContentControl; + + const char * clusterName = "ContentControl"; + + commands_list clusterCommands = { + make_unique(Id), // +#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 +#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 +#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 +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#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(), // +#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 + make_unique(Id), // + make_unique(Id), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} +void registerClusterContentAppObserver(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ContentAppObserver; + + const char * clusterName = "ContentAppObserver"; + + commands_list clusterCommands = { + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#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(), // +#endif // MTR_ENABLE_PROVISIONAL + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} void registerClusterElectricalMeasurement(Commands & commands) { using namespace chip::app::Clusters::ElectricalMeasurement; @@ -162902,6 +180284,8 @@ void registerClusterSampleMei(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -162966,7 +180350,10 @@ void registerClusters(Commands & commands) registerClusterUserLabel(commands); registerClusterBooleanState(commands); registerClusterIcdManagement(commands); - registerClusterOvenOperationalState(commands); + registerClusterTimer(commands); + registerClusterOvenCavityOperationalState(commands); + registerClusterOvenMode(commands); + registerClusterLaundryDryerControls(commands); registerClusterModeSelect(commands); registerClusterLaundryWasherMode(commands); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands); @@ -162985,6 +180372,12 @@ void registerClusters(Commands & commands) registerClusterRvcOperationalState(commands); registerClusterHepaFilterMonitoring(commands); registerClusterActivatedCarbonFilterMonitoring(commands); + registerClusterBooleanStateConfiguration(commands); + registerClusterValveConfigurationAndControl(commands); + registerClusterElectricalEnergyMeasurement(commands); + registerClusterDemandResponseLoadControl(commands); + registerClusterDeviceEnergyManagement(commands); + registerClusterEnergyEvse(commands); registerClusterDoorLock(commands); registerClusterWindowCovering(commands); registerClusterBarrierControl(commands); @@ -163022,6 +180415,8 @@ void registerClusters(Commands & commands) registerClusterApplicationLauncher(commands); registerClusterApplicationBasic(commands); registerClusterAccountLogin(commands); + registerClusterContentControl(commands); + registerClusterContentAppObserver(commands); registerClusterElectricalMeasurement(commands); registerClusterUnitTesting(commands); registerClusterSampleMei(commands);